renovate-charts/templates/secrets.yaml
Markus Pesch a3d1eb7cd9
All checks were successful
continuous-integration/drone/push Build is passing
fix: use config.json as default and bump to v31
2021-12-21 22:59:20 +01: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.content }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "renovate.fullname" . }}-app-config
labels:
{{- include "renovate.labels" . | nindent 4 }}
type: Opaque
stringData:
config: {{ .Values.renovate.appConfig.content | 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 }}