drone-charts/templates/secrets.yaml

18 lines
525 B
YAML

apiVersion: v1
kind: Secret
metadata:
name: {{ include "drone.fullname" . }}
type: Opaque
stringData:
{{- if not (hasKey .Values.config "DRONE_SERVER_HOST") -}}
{{- $_ := set .Values.config "DRONE_SERVER_HOST" .Values.ingress.hosts[0].host -}}
{{- end -}}
{{- if not (hasKey .Values.config "DRONE_SERVER_PROTO") -}}
{{- $_ := set .Values.config "DRONE_SERVER_PROTO" https -}}
{{- end -}}
{{ /* SETUP CONFIG */ }}
{{ range $key, $value := .Values.config }}
{{ upper $key}}: {{ quote $value }}
{{ end }}