More CI improvements

This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2022-07-29 21:10:46 +02:00
parent d83abae451
commit bcded223a6
No known key found for this signature in database
GPG key ID: BC5E2BD907F9A8EC
41 changed files with 359 additions and 120 deletions

View file

@ -8,3 +8,20 @@
{{- end }}
{{- end }}
{{- end -}}
{{/* Determine the Pod annotations used in the controller */}}
{{- define "common.podAnnotations" -}}
{{- if .Values.podAnnotations -}}
{{- tpl (toYaml .Values.podAnnotations) . | nindent 0 -}}
{{- end -}}
{{- $configMapsFound := false -}}
{{- range $name, $configmap := .Values.configmap -}}
{{- if $configmap.enabled -}}
{{- $configMapsFound = true -}}
{{- end -}}
{{- end -}}
{{- if $configMapsFound -}}
{{- printf "checksum/config: %v" (include ("common.configmap") . | sha256sum) | nindent 0 -}}
{{- end -}}
{{- end -}}

View file

@ -47,7 +47,7 @@
{{- if hasKey $value "value" }}
{{- $value = $value.value -}}
{{- else if hasKey $value "valueFrom" }}
{{- toYaml $value | nindent 6 }}
{{- dict "valueFrom" $value.valueFrom | toYaml | nindent 6 }}
{{- else }}
{{- dict "valueFrom" $value | toYaml | nindent 6 }}
{{- end }}