refactor: use a helper function for printing out both labels and annotations

This commit is contained in:
Jose Diaz-Gonzalez committed 2024-03-01 17:42:24 -05:00
1 parent 065d4ef828
commit 7a5bd7ee0f
12 files changed
+82 -105

No files matched your search

@@ -6,20 +6,14 @@ kind: Service
metadata:
annotations:
dokku.com/managed: "true"
{{- if and $.Values.global.annotations $.Values.global.annotations.service }}
{{- range $k, $v := $.Values.global.annotations.service }}
{{ $k }}: {{ $v | quote }}
{{- end }}
{{- end }}
{{- if and $config.annotations $config.annotations.service }}
{{- range $k, $v := $config.annotations.service }}
{{ $k }}: {{ $v | quote }}
{{- end }}
{{- end }}
{{ include "print.annotations" (dict "config" $.Values.global "key" "service") | indent 4 }}
{{ include "print.annotations" (dict "config" $config "key" "service") | indent 4 }}
labels:
app.kubernetes.io/instance: {{ $.Values.global.app_name }}-{{ $processName }}
app.kubernetes.io/name: {{ $processName }}
app.kubernetes.io/part-of: {{ $.Values.global.app_name }}
{{ include "print.labels" (dict "config" $.Values.global "key" "service") | indent 4 }}
{{ include "print.labels" (dict "config" $config "key" "service") | indent 4 }}
name: {{ $.Values.global.app_name }}-{{ $processName }}
namespace: {{ $.Values.global.namespace }}
spec: