-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Kustomize does not merge images from resources #5041
Comments
Hi @MaurGi,
Yes, you are correct! Please see #4581 (comment) for further explanation.
All kustomizations, including |
Canonically, you'd override the base image by specifying in the overlay
I might be able to help if you clarify what you mean by "override the image directly in the resources kustomization with".
Could you also clarify what you mean by "make a sresources for my base case"? You can override the image if you know the path to this image. For example, in your case, if you only want to change the |
/kind support |
Hi @MaurGi, I've spent some more time thinking and consulted @KnVerey about workarounds for your use case. I'd like to propose the following, in addition to my earlier comments. If you know the field paths that reference your image, you can either
If you don't know the field paths that reference your image, you can either
The ability for /remove-kind bug |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What happened?
In the
kustomization.yaml
, theimages
tag of the bases folder is winning over theimages:
defined in the resources folder.Why is that? This is the opposite of the other resources when we do strategic merge - can we force this with a patchStrategicMerge?
To repro, run:
kustomize build resources/dev
with the files below.
What did you expect to happen?
Since images is defined in resources, it should win over the images in the base.
How can you override that otherwise?
If I try to override the image directly in the resources kustomization with, I get the following error:
I assume kustomization happens on the image and then the images: tag does not find the nginx:latest to replace.
This makes it impossible to have a default image and then override in the resources, I have to make a resources for my base case?
thx.
How can we reproduce it (as minimally and precisely as possible)?
Expected output
Actual output
Kustomize version
{Version:kustomize/v4.5.4 GitCommit:cf3a452ddd6f83945d39d582243b8592ec627ae3 BuildDate:2022-03-28T23:12:45Z GoOs:linux GoArch:amd64}
Operating system
Linux
The text was updated successfully, but these errors were encountered: