Files
shell-scripts/0-部署应用/Oracle-Cloud/rancher部署/rancher-ofiicial-helm-chart/templates/secret.yaml
2024-11-28 16:42:36 +08:00

18 lines
605 B
YAML

apiVersion: v1
kind: Secret
metadata:
name: "bootstrap-secret"
namespace: {{ .Release.Namespace }}
type: Opaque
data:
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace "bootstrap-secret" }}
{{- if and $existingSecret $existingSecret.data }}
{{- if $existingSecret.data.bootstrapPassword }}
bootstrapPassword: {{ $existingSecret.data.bootstrapPassword }}
{{- else }}
bootstrapPassword: {{ .Values.bootstrapPassword | default "" | b64enc | quote }}
{{- end }}
{{- else }}
bootstrapPassword: {{ .Values.bootstrapPassword | default "" | b64enc | quote }}
{{- end }}