rabbitmq
This commit is contained in:
46
rabbitmq/templates/secrets.yaml
Normal file
46
rabbitmq/templates/secrets.yaml
Normal file
@ -0,0 +1,46 @@
|
||||
{{- if or (not .Values.auth.existingErlangSecret) (not .Values.auth.existingPasswordSecret) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "rabbitmq.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{- if and (not .Values.auth.existingPasswordSecret) (not .Values.loadDefinition.enabled) }}
|
||||
{{- if .Values.auth.password }}
|
||||
rabbitmq-password: {{ .Values.auth.password | b64enc | quote }}
|
||||
{{- else }}
|
||||
rabbitmq-password: {{ randAlphaNum 10 | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if not .Values.auth.existingErlangSecret }}
|
||||
{{- if .Values.auth.erlangCookie }}
|
||||
rabbitmq-erlang-cookie: {{ .Values.auth.erlangCookie | b64enc | quote }}
|
||||
{{- else }}
|
||||
rabbitmq-erlang-cookie: {{ randAlphaNum 32 | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $extraSecretsPrependReleaseName := .Values.extraSecretsPrependReleaseName }}
|
||||
{{- range $key, $value := .Values.extraSecrets }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
{{- if $extraSecretsPrependReleaseName }}
|
||||
name: {{ $.Release.Name }}-{{ $key }}
|
||||
{{- else }}
|
||||
name: {{ $key }}
|
||||
{{- end }}
|
||||
namespace: {{ $.Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" $ | nindent 4 }}
|
||||
{{- if $.Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
stringData: {{- include "common.tplvalues.render" (dict "value" $value "context" $) | nindent 2 }}
|
||||
{{- end }}
|
Reference in New Issue
Block a user