Files
openebs/charts/rawfile-localpv/templates/secret.yaml
2025-12-09 19:34:54 +11:00

20 lines
616 B
YAML

{{- $secret_name := printf "%s-secrets" (include "rawfile-localpv.fullname" .) }}
apiVersion: v1
kind: Secret
metadata:
labels:
{{- include "rawfile-localpv.labels" . | nindent 4 }}
name: {{ $secret_name }}
type: Opaque
data:
{{- $old_sec := lookup "v1" "Secret" .Release.Namespace $secret_name }}
{{- if not .Values.auth.token }}
{{- if or (not $old_sec) (not $old_sec.data) }}
internal-signature: {{ randAlphaNum 32 | b64enc }}
{{- else }}
internal-signature: {{ index $old_sec.data "internal-signature" }}
{{- end }}
{{- else }}
internal-signature: {{ .Values.auth.token }}
{{- end }}