-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
The image name in initContainers should automatically resolve to a image stream name. #17504
Comments
@pweil- this is a deploymentconfig RFE, not an image RFE. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/lifecycle frozen |
+1 |
We are stuck with this as well. It means that you have to hard-code the image URI for the init-container in a template, which will fail if you don't match the project name to the template. This limits the usefulness of init-containers in a template, as there is no way to explicitly reference the namespace either: https://trello.com/c/zcRQFri0/916-2-namespace-template-parameter-templates. |
@riekrh If the name of the image for the init container is the same as the main container, have you tried adding the name of the init container to the container names under
For the case where same image is used as main container, this works fine. |
I'm still having this issue, even with declaring imageChangeParams + containerNames. @GrahamDumpleton can you post a complete example of the yaml where this approach works? edit: nevermind, I was missing the image field having the image stream name as its value. now it looks to be working.
|
When using
dc.spec.template.spec.initContainers
and you set theimage
field to an image stream name, it isn't automatically resolved to an image stream name in the project as occurs fordc.spec.template.spec.containers
. Being in aDeploymentConfig
, I would expect it to, just like with normal containers in the pod. Instead it is necessary to set thelookupPolicy
on the image stream to belocal
, or add theresolve-names
annotation to the pod template.Version
Steps To Reproduce
Use a
oc patch --type=json
patch such as:and the deployment will get stuck when trying to start the init container as it can't work out what image is.
Instead use:
or run:
which adds the annotation on the pod template, then works okay.
Current Result
Doesn't resolve image name to image stream in init containers.
Expected Result
Since part of DeploymentConfig, expect it to resolve to image stream name like it does for containers in same pod.
Additional Information
None.
The text was updated successfully, but these errors were encountered: