Skip to content

Commit

Permalink
Add back support for .image.tag Helm value but default to empty and t…
Browse files Browse the repository at this point in the history
…hen set .Chart.AppVersion instead
  • Loading branch information
uvegla committed Nov 7, 2024
1 parent 7f4f99e commit ac0243c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions helm/app-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,14 @@ Selector labels
app.kubernetes.io/name: {{ include "name" . | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
{{- end -}}

{{/*
Define image tag.
*/}}
{{- define "image.tag" -}}
{{- if .Values.image.tag }}
{{- .Values.image.tag }}
{{- else }}
{{- .Chart.AppVersion }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion helm/app-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
{{- end }}
containers:
- name: {{ include "name" . }}
image: "{{ .Values.registry.domain }}/{{ .Values.image.repository }}:{{ .Chart.Version }}"
image: "{{ .Values.registry.domain }}/{{ .Values.image.repository }}:{{ include "image.tag" }}"
volumeMounts:
- name: {{ include "name" . }}-configmap
mountPath: /var/run/{{ include "name" . }}/configmap/
Expand Down
1 change: 1 addition & 0 deletions helm/app-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ registry:

image:
repository: giantswarm/app-operator
tag: ""

operatorkit:
resyncPeriod: "5m"
Expand Down

0 comments on commit ac0243c

Please sign in to comment.