drone-runner-charts/templates/secrets.yaml
Markus Pesch 286e8945a2
All checks were successful
continuous-integration/drone/push Build is passing
fix: support .env file
2021-09-10 18:37:05 +02:00

24 lines
702 B
YAML

apiVersion: v1
kind: Secret
metadata:
name: {{ include "droneRunner.fullname" . }}
type: Opaque
stringData:
{{- if not (hasKey .Values "config") -}}
{{- $_ := set .Values "config" dict -}}
{{- end -}}
{{- if not (hasKey .Values.config "DRONE_NAMESPACE_DEFAULT") -}}
{{- $_ := set .Values.config "DRONE_NAMESPACE_DEFAULT" .Release.Namespace -}}
{{- end -}}
{{- if and (not (hasKey .Values.config "DRONE_RUNNER_ENV_FILE")) (hasKey .Values.envFile "content") }}
{{- $_ := set .Values.config "DRONE_RUNNER_ENV_FILE" "/tmp/drone-runner/drone.conf" -}}
{{- end }}
{{/* SETUP CONFIG */}}
{{ range $key, $value := .Values.config }}
{{ upper $key}}: {{ quote $value }}
{{ end }}