Skip to content

Commit

Permalink
further simplify
Browse files Browse the repository at this point in the history
Signed-off-by: Steven <[email protected]>
  • Loading branch information
Stevenpc3 committed May 29, 2024
1 parent c18e3c3 commit ace35a9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions charts/cloudnative-pg/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,3 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Renders a value that contains template
Usage:
{{ include "cloudnative-pg.extraEnv" ( dict "value" .Values.example.value "context" $ ) }}
*/}}
{{- define "cloudnative-pg.extraEnv" -}}
{{- $value := typeIs "string" .value | ternary .value (.value | toYaml) }}
{{- tpl $value .context }}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/cloudnative-pg/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ spec:
- name: MONITORING_QUERIES_CONFIGMAP
value: "{{ .Values.monitoringQueriesConfigMap.name }}"
{{- if .Values.additionalEnv }}
{{- include "cloudnative-pg.extraEnv" (dict "value" .Values.additionalEnv "context" . ) | nindent 8 }}
{{- tpl (.Values.additionalEnvVars | toYaml) . | nindent 8 }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
Expand Down

0 comments on commit ace35a9

Please sign in to comment.