renovate-charts/templates/secrets.yaml
Markus Pesch f83d91d991
All checks were successful
continuous-integration/drone/push Build is passing
Initial Commit
2021-10-28 19:44:50 +02:00

55 lines
1.4 KiB
YAML

{{- if .Values.renovate.secEnv }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "renovate.fullname" . }}-secret-env
labels:
{{- include "renovate.labels" . | nindent 4 }}
type: Opaque
stringData:
{{- if not (hasKey .Values.renovate "secEnv") -}}
{{- $_ := set .Values "secEnv" dict -}}
{{- end -}}
{{/* SETUP CONFIG */}}
{{ range $key, $value := .Values.renovate.secEnv }}
{{ upper $key}}: {{ quote $value }}
{{ end }}
{{- end }}
{{- if .Values.renovate.appConfig }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "renovate.fullname" . }}-app-config
labels:
{{- include "renovate.labels" . | nindent 4 }}
type: Opaque
stringData:
config.json: {{ .Values.renovate.appConfig | quote }}
{{- end }}
{{- if .Values.renovate.sshConfig.enabled }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "renovate.fullname" . }}-ssh-config
labels:
{{- include "renovate.labels" . | nindent 4 }}
type: Opaque
stringData:
{{- if and .Values.renovate.sshConfig.id_rsa .Values.renovate.sshConfig.id_rsa_pub }}
id_rsa: {{ .Values.renovate.sshConfig.id_rsa | quote }}
id_rsa.pub: {{ .Values.renovate.sshConfig.id_rsa_pub | quote }}
{{- end }}
{{- if and .Values.renovate.sshConfig.id_ed25519 .Values.renovate.sshConfig.id_ed25519_pub }}
id_ed25519: {{ .Values.renovate.sshConfig.id_ed25519 | quote }}
id_ed25519.pub: {{ .Values.renovate.sshConfig.id_ed25519_pub | quote }}
{{- end }}
{{- end }}