drone-charts/templates/secrets.yaml

18 lines
525 B
YAML
Raw Normal View History

2021-07-21 20:17:38 +00:00
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 }}