2023-08-29 03:01:11 +08:00
|
|
|
{{- if not .Values.existingSecret }}
|
2020-09-03 03:41:58 +08:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
|
|
|
name: {{ include "code-server.fullname" . }}
|
|
|
|
annotations:
|
|
|
|
"helm.sh/hook": "pre-install"
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: {{ include "code-server.name" . }}
|
|
|
|
helm.sh/chart: {{ include "code-server.chart" . }}
|
|
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
|
|
type: Opaque
|
|
|
|
data:
|
2023-08-29 03:01:11 +08:00
|
|
|
{{- if .Values.password }}
|
2020-09-03 03:41:58 +08:00
|
|
|
password: "{{ .Values.password | b64enc }}"
|
2023-08-29 03:01:11 +08:00
|
|
|
{{- else }}
|
2020-09-03 03:41:58 +08:00
|
|
|
password: "{{ randAlphaNum 24 | b64enc }}"
|
2023-08-29 03:01:11 +08:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|