common-helm-lib/templates/_secrets.tpl
Jonas Forsberg f7fd24fe6f
All checks were successful
Lint and Test Charts / lint-test (push) Successful in 7s
fixed trailing whitespaces
2024-10-18 16:24:24 +02:00

34 lines
829 B
Smarty

{{- define "lib.secrets" -}}
{{- $fullName := include "lib.fullname" . -}}
{{- $namespace := .Values.namespace -}}
{{- $commonLabels := include "lib.labels" . }}
{{- range $name, $values := .Values.secrets }}
{{- if $values.enabled -}}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ $fullName }}-{{ $name }}
namespace: {{ $namespace }}
labels:
{{- $commonLabels | nindent 4 }}
{{- with $values.labels }}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- with $values.annotations }}
annotations:
{{ toYaml . | nindent 4 }}
{{- end }}
type: {{ $values.type | default "Opauge" }}
{{- with $values.data }}
data:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- with $values.stringData }}
stringData:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}