Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Helm3 : Overriding image tag value

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

Deployment file enter image description here

Command Results:- helm upgrade resources-dev resources --set image.tag=72615 --reuse-values enter image description here Command Results of helm upgrade resources-dev resources --set-string image.tag=72615 enter image description here

like image 760
fortanu82 Avatar asked Sep 06 '25 21:09

fortanu82


1 Answers

Issue is identified, it's not with a --set flag but with the kind of directory structure I have for charts.

enter image description here

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

like image 52
fortanu82 Avatar answered Sep 10 '25 09:09

fortanu82