-
Notifications
You must be signed in to change notification settings - Fork 155
Added support for copying files to init Containers. #971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Added support for copying files to init Containers. #971
Conversation
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 16s |
8b04927
to
b240b03
Compare
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 21s |
b240b03
to
1af0ee6
Compare
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 33s |
Hi @yorick1989, Thanks for your PR, could you please add changelog fragment, you can find documentation here And it will be nice, if you would update the integration test to ensure that support of init containers is not broken |
4795133
to
851aebd
Compare
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 14s |
Hi @yurnov , I've updated the PR. Hopefully, this is as expected. By the way, I had to make the following changes to get the $ cat playbook.yaml
---
- connection: local
gather_facts: false
hosts: localhost
environment:
K8S_AUTH_KUBECONFIG: "{{ lookup('ansible.builtin.env', 'K8S_AUTH_KUBECONFIG', default='~/.kube/config') }}"
roles:
- k8s_copy Do you have any idea why I had to do this? And is there a better way to get it to work in a virtual Python environment? Thanks! |
851aebd
to
7db5b96
Compare
I saw the error during the sanity test. I've patched the errors that came up during this sanity test. |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 26s |
Just wanted to say that I ran this on my cluster and it worked for me! Thanks
|
tests/integration/targets/k8s_copy/templates/pods_definition_init.j2
Outdated
Show resolved
Hide resolved
7db5b96
to
310f1fc
Compare
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 18s |
310f1fc
to
bf1293c
Compare
These test errors are keep coming up. =) I ran |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 23s |
SUMMARY
Was going trough the list with issues and found 958; which seemed a quick fix.
What I fixed with with this PR:
ISSUE TYPE
COMPONENT NAME
copy.py module
ADDITIONAL INFORMATION
Some testing.
Verify that the pod does not exist:
Output:
Run the playbook to create the file, create the deployment, wait for the init container to be ready, copy the created file to the init container,
cat
the copied file (usingkubernetes.core.k8s_exec
) that is now in the init container and try to copy the created file to the (not started) container (which fails - to see the new error message for it):Output: