Skip to content
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

Update k8s_exec and k8s_cp to include container name #1858

Merged
merged 1 commit into from
May 16, 2024

Conversation

fluzzykitten
Copy link
Contributor

SUMMARY

We need to specify a container in environments that use sidecar injection, like in the case of istio service mesh. If the container is not specified, and a side car is injected so there are multiple containers running in the pod, this task will fail because a container was not specified in a pod with multiple containers.

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
    Bug preventing backups in environments that use Istio service mesh or other automatic side-car injection
ADDITIONAL INFORMATION

Container that we create is the same name as the pod, so we just need to tell the backup to use the container we created, to differentiate it from any sidecars containers that might've been injected

@rooftopcellist
Copy link
Member

Good point, thanks for the PR @fluzzykitten !

I checked that the container name is indeed correct:

However, I expect you will also need to specify the container here as well right @fluzzykitten ?

Actually, pretty much all of these places:

@rooftopcellist
Copy link
Member

While looking at this PR, I noticed this typo:

We need to specify a container in environments that use sidecar injection, like in the case of istio service mesh. If the container is not specified, and a side car is injected so there are multiple containers running in the pod, this task will fail because a container was not specified in a pod with multiple containers.
@fluzzykitten
Copy link
Contributor Author

@rooftopcellist Shoot! You're right, I only pushed one of the files. My bad. MR updated with the other instances of the k8s_exec and k8s_cp modules that didn't set a container, and would be affected by sidecar container injection.

@fluzzykitten fluzzykitten changed the title Update secrets.yml Update k8s_exec and k8s_cp to include container name May 16, 2024
@rooftopcellist
Copy link
Member

@fluzzykitten thanks for the quick update! I just tested out a backup and restore and didn't run into any issues. Thanks for the contribution!

@rooftopcellist rooftopcellist enabled auto-merge (squash) May 16, 2024 20:32
@rooftopcellist rooftopcellist merged commit 4720d29 into ansible:devel May 16, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants