jedcunningham commented on code in PR #30214:
URL: https://github.com/apache/airflow/pull/30214#discussion_r1161141054
##########
chart/templates/_helpers.yaml:
##########
@@ -248,16 +248,30 @@ If release name contains chart name it will be used as a
full name.
{{/* This helper will change when customers deploy a new image */}}
{{- define "airflow_image" -}}
- {{- printf "%s:%s" (.Values.images.airflow.repository | default
.Values.defaultAirflowRepository) (.Values.images.airflow.tag | default
.Values.defaultAirflowTag) }}
+{{- $repository := .Values.images.airflow.repository | default
.Values.defaultAirflowRepository -}}
+{{- $tag := .Values.images.airflow.tag | default .Values.defaultAirflowTag -}}
+{{- $digest := .Values.images.airflow.digest | default
.Values.defaultAirflowDigest -}}
+{{- if $digest }}
+{{- printf "%s@%s" $repository $digest -}}
+{{- else }}
+{{- printf "%s:%s" $repository $tag -}}
+{{- end }}
Review Comment:
```suggestion
{{- $repository := .Values.images.airflow.repository | default
.Values.defaultAirflowRepository -}}
{{- $tag := .Values.images.airflow.tag | default .Values.defaultAirflowTag
-}}
{{- $digest := .Values.images.airflow.digest | default
.Values.defaultAirflowDigest -}}
{{- if $digest }}
{{- printf "%s@%s" $repository $digest -}}
{{- else }}
{{- printf "%s:%s" $repository $tag -}}
{{- end }}
```
We just had a few PRs to do some formatting cleanup, let's try and keep it 👍
##########
chart/templates/_helpers.yaml:
##########
@@ -248,16 +248,30 @@ If release name contains chart name it will be used as a
full name.
{{/* This helper will change when customers deploy a new image */}}
{{- define "airflow_image" -}}
- {{- printf "%s:%s" (.Values.images.airflow.repository | default
.Values.defaultAirflowRepository) (.Values.images.airflow.tag | default
.Values.defaultAirflowTag) }}
+{{- $repository := .Values.images.airflow.repository | default
.Values.defaultAirflowRepository -}}
+{{- $tag := .Values.images.airflow.tag | default .Values.defaultAirflowTag -}}
+{{- $digest := .Values.images.airflow.digest | default
.Values.defaultAirflowDigest -}}
+{{- if $digest }}
+{{- printf "%s@%s" $repository $digest -}}
+{{- else }}
+{{- printf "%s:%s" $repository $tag -}}
+{{- end }}
{{- end }}
{{- define "pod_template_image" -}}
{{- printf "%s:%s" (.Values.images.pod_template.repository | default
.Values.defaultAirflowRepository) (.Values.images.pod_template.tag | default
.Values.defaultAirflowTag) }}
{{- end }}
{{/* This helper is used for airflow containers that do not need the users
code */}}
-{{- define "default_airflow_image" -}}
- {{- printf "%s:%s" .Values.defaultAirflowRepository
.Values.defaultAirflowTag }}
+{{ define "default_airflow_image" -}}
+{{- $repository := .Values.defaultAirflowRepository -}}
+{{- $tag := .Values.defaultAirflowTag -}}
+{{- $digest := .Values.defaultAirflowDigest -}}
+{{- if $digest }}
+{{- printf "%s@%s" $repository $digest -}}
+{{- else }}
+{{- printf "%s:%s" $repository $tag -}}
+{{- end }}
Review Comment:
```suggestion
{{- $repository := .Values.defaultAirflowRepository -}}
{{- $tag := .Values.defaultAirflowTag -}}
{{- $digest := .Values.defaultAirflowDigest -}}
{{- if $digest }}
{{- printf "%s@%s" $repository $digest -}}
{{- else }}
{{- printf "%s:%s" $repository $tag -}}
{{- end }}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]