41 lines
1.4 KiB
YAML
41 lines
1.4 KiB
YAML
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ include "netbox.fullname" . }}-env
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
|
helm.sh/chart: {{ include "netbox.chart" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
data:
|
|
DB_USER: {{ .Values.postgresql.postgresqlUsername | b64enc | quote }}
|
|
{{- if not .Values.postgresql.enabled }}
|
|
DB_PASSWORD: {{ .Values.postgresql.postgresqlPassword | b64enc | quote }}
|
|
{{- end }}
|
|
{{- if .Values.redis.password }}
|
|
REDIS_PASSWORD: {{ .Values.redis.password |b64enc | quote }}
|
|
{{- end }}
|
|
{{- if .Values.secretKey }}
|
|
SECRET_KEY: {{ .Values.secretKey | b64enc | quote }}
|
|
{{- else }}
|
|
SECRET_KEY: {{ randAscii 50 | trimall "'" | b64enc | quote }}
|
|
{{- end }}
|
|
{{- with .Values.emailUsername }}
|
|
EMAIL_USERNAME: {{ . | b64enc | quote }}
|
|
{{- end }}
|
|
{{- with .Values.emailPassword }}
|
|
EMAIL_PASSWORD: {{ . | b64enc | quote }}
|
|
{{- end }}
|
|
{{- if .Values.superuser.password }}
|
|
SUPERUSER_PASSWORD: {{ .Values.superuser.password | b64enc | quote }}
|
|
{{- else }}
|
|
SUPERUSER_PASSWORD: {{ randAscii 10 | trimall "'" | b64enc | quote }}
|
|
{{- end }}
|
|
{{- if .Values.superuser.token }}
|
|
SUPERUSER_TOKEN: {{ .Values.superuser.token | b64enc | quote }}
|
|
{{- else }}
|
|
SUPERUSER_TOKEN: {{ randAscii 40 | trimall "'" | b64enc | quote }}
|
|
{{- end }}
|
|
{{- range $key, $value := .Values.extraSecretEnvs }}
|
|
{{ $key }}: {{ $value | b64enc | quote }}
|
|
{{- end }}
|