Skip to content

Commit bb3ff8d

Browse files
committed
chore(helm): Add operator.image template helper
1 parent 211ed38 commit bb3ff8d

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

deploy/helm/airflow-operator/templates/_helpers.tpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,10 @@ Labels for Kubernetes objects created by helm test
7777
{{- define "operator.testLabels" -}}
7878
helm.sh/test: {{ include "operator.chart" . }}
7979
{{- end }}
80+
81+
{{/*
82+
Build the full container image reference.
83+
*/}}
84+
{{- define "operator.image" -}}
85+
{{- printf "%s/%s:%s" .Values.image.registry .Values.image.repository (.Values.image.tag | default .Chart.AppVersion) -}}
86+
{{- end }}

deploy/helm/airflow-operator/templates/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
template:
1616
metadata:
1717
annotations:
18-
internal.stackable.tech/image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
18+
internal.stackable.tech/image: {{ include "operator.image" . }}
1919
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
2020
{{- with .Values.podAnnotations }}
2121
{{- toYaml . | nindent 8 }}
@@ -37,7 +37,7 @@ spec:
3737
- name: {{ include "operator.appname" . }}
3838
securityContext:
3939
{{- toYaml .Values.securityContext | nindent 12 }}
40-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
40+
image: {{ include "operator.image" . }}
4141
imagePullPolicy: {{ .Values.image.pullPolicy }}
4242
resources:
4343
{{- toYaml .Values.resources | nindent 12 }}

0 commit comments

Comments
 (0)