https://pulumi.com logo
Title
s

sticky-match-71841

03/30/2021, 11:37 AM
If i wanted to ignore changes to the image of a container in a deployment, which is a part of a config group, what would i have to do? I've read this article: https://www.pulumi.com/docs/intro/concepts/resources/#ignorechanges. I am unsure what shape the "root" is in the scenario where i am passing multiple yaml files in a config group. Would the root be an array? 🤔
Just to clarify my example a bit: I have a config group consisting of a deployment and a configmap. How do i write the ignoreChanges selector to consistently target the image of one of the containers in the deployment?
a

ancient-megabyte-79588

03/30/2021, 2:03 PM
I'm not 100% I understand what you are asking for, but if you are suggesting that you "ignore" the
image: <image-name-here>
property of a
deployment
, I'm not sure that is going to stop changes. If your image name does not contain a
:latest
or
:5.1
or some sort of tag denoting what image version you want, k8s will check for and get the latest image every time it provisions the pod completely separately from anything pulumi does. Simply deleting a pod that is a part of a deployment will cause k8s to look for a new "latest" version of that
imagename:tag
.
s

sticky-match-71841

03/31/2021, 8:04 AM
The image will contain the tag too. But developers will manage it "outside" of pulumi. We just set the image the first time for bootstrapping purposes and then we want pulumi to stop touching it moving forward (as not overwrite the developers changes). I am aware of the conventions around latest, but i don't think it applies to my situation. We will always set the tag specifically for that reason.