drone-charts/templates/secrets.yaml

23 lines
633 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:
2021-07-21 20:47:15 +00:00
{{- if not (hasKey .Values "config") -}}
{{- $_ := set .Values "config" dict -}}
{{- end -}}
2021-07-21 20:17:38 +00:00
{{- if not (hasKey .Values.config "DRONE_SERVER_HOST") -}}
2021-07-21 20:47:15 +00:00
{{- $_ := set .Values.config "DRONE_SERVER_HOST" (index .Values.ingress.hosts 0).host -}}
2021-07-21 20:17:38 +00:00
{{- end -}}
{{- if not (hasKey .Values.config "DRONE_SERVER_PROTO") -}}
2021-07-21 20:47:15 +00:00
{{- $_ := set .Values.config "DRONE_SERVER_PROTO" "https" -}}
2021-07-21 20:17:38 +00:00
{{- end -}}
2021-07-21 20:47:15 +00:00
{{/* SETUP CONFIG */}}
2021-07-21 20:17:38 +00:00
{{ range $key, $value := .Values.config }}
{{ upper $key}}: {{ quote $value }}
{{ end }}