I was trying to override the image tag in Helm3 using upgrade command by setting the variable at command line but it did not work. Has someone tried this feature in Helm3. Stuck for last couple of days, would be helpful to know your views.
Deployment manifest file looks like this:-
containers: - image: {{ .Values.image.repository }}:{{.Values.image.tag}} imagePullPolicy: Always
Executing this command from command line:-
> helm upgrade resources-dev resources --set image.tag=72615 --dry-run --debug
does not override image tag value from 72626 to 72615
containers:
- image: aksresourcesapi.azurecr.io/microservicesinitiative:72626
imagePullPolicy: Always
Command Results:- helm upgrade resources-dev resources --set image.tag=72615 --reuse-values Command Results of helm upgrade resources-dev resources --set-string image.tag=72615
Issue is identified, it's not with a --set flag but with the kind of directory structure I have for charts.
while executing the command
helm upgrade resources-dev resources --set image.tag=72615
one level up where resources (charts) folder is, it looks for image.tag in "Values.yaml" file of resources folder and not the "Values.yaml" file of backend folder and thus the tags are not replaced.
By executing the below command with backend.imge.tag worked helm upgrade resources-dev resources --install --set backend.image.tag=72615
You should specify to helm that it is a string value. It is done with --set-string
flag.
Also use --reuse-values
in order to reuse the last release’s values and merge in any overrides from the command line via — set and -f
Executing the following command will solve the problem:
helm upgrade resources-dev resources --reuse-values --set-string image.tag=72615 --dry-run --debug