2021-10-01 12:20:59 +00:00
|
|
|
{{/* Make sure all variables are set properly */}}
|
2022-06-07 17:41:19 +00:00
|
|
|
{{- include "tc.common.loader.init" . }}
|
2021-10-01 12:20:59 +00:00
|
|
|
|
|
|
|
{{/* Render secrets for gitea */}}
|
|
|
|
{{- include "gitea.secrets" . }}
|
|
|
|
|
|
|
|
{{/* Render configmap for gitea */}}
|
|
|
|
{{- include "gitea.configmap" . }}
|
|
|
|
|
|
|
|
{{/* Append the general secret volumes to the volumes */}}
|
|
|
|
{{- define "gitea.initvolume" -}}
|
|
|
|
enabled: "true"
|
|
|
|
mountPath: "/secrets/ini"
|
|
|
|
readOnly: true
|
|
|
|
type: "custom"
|
|
|
|
volumeSpec:
|
|
|
|
secret:
|
2022-06-07 17:41:19 +00:00
|
|
|
secretName: {{ include "tc.common.names.fullname" . }}-init
|
2021-10-01 12:20:59 +00:00
|
|
|
defaultMode: 0777
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/* Append the general secret volumes to the volumes */}}
|
|
|
|
{{- define "gitea.configvolume" -}}
|
|
|
|
enabled: "true"
|
|
|
|
mountPath: "/secrets/config"
|
|
|
|
readOnly: true
|
|
|
|
type: "custom"
|
|
|
|
volumeSpec:
|
|
|
|
secret:
|
2022-06-07 17:41:19 +00:00
|
|
|
secretName: {{ include "tc.common.names.fullname" . }}
|
2021-10-01 12:20:59 +00:00
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{- $_ := set .Values.persistence "init" (include "gitea.initvolume" . | fromYaml) -}}
|
|
|
|
{{- $_ := set .Values.persistence "config" (include "gitea.configvolume" . | fromYaml) -}}
|
|
|
|
|
|
|
|
|
|
|
|
{{/* Render the templates */}}
|
2022-06-07 17:41:19 +00:00
|
|
|
{{ include "tc.common.loader.apply" . }}
|