File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,3 +48,15 @@ Dynamically calculates safe truncation to ensure total name length <= 63 chars.
4848{{- printf " %s -%s " $fullname $suffix | trunc 63 | trimSuffix " -" }}
4949{{- end }}
5050{{- end }}
51+
52+ {{/*
53+ Util function for generating the image URL based on the provided options.
54+ Cribbed from the cert-manager organization.
55+ */ }}
56+ {{- define " clickhouse-operator.image" -}}
57+ {{- $defaultTag := index . 1 -}}
58+ {{- with index . 0 -}}
59+ {{ printf .repository }}
60+ {{- if .digest -}}{{ printf " @%s " .digest }}{{- else -}}{{ printf " :%s " (default $defaultTag .tag ) }}{{- end -}}
61+ {{- end }}
62+ {{- end }}
Original file line number Diff line number Diff line change 6565 {{- $env = append $env (dict "name" "WATCH_NAMESPACE" "value" (join "," .Values.watchNamespaces)) }}
6666 {{- end }}
6767 env : {{ toYaml $env | nindent 22 }}
68- image : " {{ .Values.manager. image.repository }}:{{ default .Chart.AppVersion . Values.manager.image.tag }}"
68+ image : " {{ include " clickhouse-operator. image" (tuple . Values.manager.image $.Chart.AppVersion) }}"
6969 imagePullPolicy : {{ .Values.manager.image.pullPolicy }}
7070 livenessProbe :
7171 httpGet :
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ manager:
1717
1818 image :
1919 repository : ghcr.io/clickhouse/clickhouse-operator
20+ # # Digest of the image to use. Tag is used if unset.
21+ # #
22+ # # digest: sha256:abc123
2023 # # Tag of the image to use. Defaults to the chart's appVersion if not set.
2124 # #
2225 # # tag: latest
You can’t perform that action at this time.
0 commit comments