Initial commit
This commit is contained in:
19
charts/rawfile-localpv/templates/secret.yaml
Normal file
19
charts/rawfile-localpv/templates/secret.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
{{- $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 }}
|
||||
Reference in New Issue
Block a user