Skip to content

fix: use image of container in MigratorSpec #14

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

Merged
merged 1 commit into from
Jun 15, 2022

Conversation

DWSR
Copy link
Contributor

@DWSR DWSR commented Jun 15, 2022

Previous to this commit, the operator would inject an waiter container
that would poll for the image of the first container in the target Pod
rather than the image of the specified container. This is surprising
behaviour and also potentially problematic when combined with Istio's
holdApplicationUntilProxyStart functionality, which injects the Istio
sidecar at the beginning of the list of containers.

This commit ensures the operator uses the container specified in the
MigratorSpec, if supplied and present. If the target container name is
specified and not present, it falls back to using the image from the
first container in the Pod (the previous behaviour). If the target
container name is not present, it also uses the previous behaviour.

Previous to this commit, the operator would inject an waiter container
that would poll for the image of the first container in the target Pod
rather than the image of the specified container. This is surprising
behaviour and also potentially problematic when combined with Istio's
`holdApplicationUntilProxyStart` functionality, which injects the Istio
sidecar at the beginning of the list of containers.

This commit ensures the operator uses the container specified in the
MigratorSpec, if supplied and present. If the target container name is
specified and not present, it falls back to using the image from the
first container in the Pod (the previous behaviour). If the target
container name is not present, it also uses the previous behaviour.
@coderanger
Copy link
Owner

Good catch, thanks!

@coderanger coderanger merged commit 623b844 into coderanger:main Jun 15, 2022
@DWSR DWSR deleted the use-specified-container-image branch June 15, 2022 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants