infra4talos/apps-helm/wg-access-server/templates/secret.yaml

19 lines
603 B
YAML
Raw Normal View History

{{- $fullName := include "wg-access-server.fullname" . -}}
{{- if .Values.wireguard.config.privateKey }}
apiVersion: v1
kind: Secret
metadata:
name: "{{ $fullName }}"
labels:
{{- include "wg-access-server.labels" . | nindent 4 }}
type: Opaque
data:
privateKey: {{ .Values.wireguard.config.privateKey | b64enc | quote }}
{{- if .Values.web.config.adminUsername }}
adminUsername: {{ .Values.web.config.adminUsername | b64enc | quote }}
{{- end }}
{{- if .Values.web.config.adminPassword }}
adminPassword: {{ .Values.web.config.adminPassword | b64enc | quote }}
{{- end }}
{{- end }}