2021-10-01 12:20:59 +00:00
|
|
|
{{/* Make sure all variables are set properly */}}
|
2023-04-30 19:15:20 +00:00
|
|
|
{{- include "tc.v1.common.loader.init" . }}
|
2021-10-01 12:20:59 +00:00
|
|
|
|
|
|
|
{{/* Render secrets for gitea */}}
|
2023-04-30 19:15:20 +00:00
|
|
|
{{- $secrets := include "gitea.secrets" . | fromYaml -}}
|
|
|
|
{{- if $secrets -}}
|
|
|
|
{{- $_ := mustMergeOverwrite .Values.secret $secrets -}}
|
|
|
|
{{- end -}}
|
2021-10-01 12:20:59 +00:00
|
|
|
|
|
|
|
{{/* Render configmap for gitea */}}
|
2023-04-30 19:15:20 +00:00
|
|
|
{{- $configmap := include "gitea.configmap" . | fromYaml -}}
|
|
|
|
{{- if $configmap -}}
|
|
|
|
{{- $_ := set .Values.configmap "gitea-env" $configmap -}}
|
|
|
|
{{- end -}}
|
2021-10-01 12:20:59 +00:00
|
|
|
|
|
|
|
{{/* Append the general secret volumes to the volumes */}}
|
|
|
|
{{- define "gitea.initvolume" -}}
|
2023-04-30 19:15:20 +00:00
|
|
|
enabled: true
|
2021-10-01 12:20:59 +00:00
|
|
|
readOnly: true
|
2023-04-30 19:15:20 +00:00
|
|
|
type: secret
|
|
|
|
objectName: init
|
|
|
|
defaultMode: "0777"
|
|
|
|
targetSelector:
|
|
|
|
main:
|
|
|
|
main:
|
|
|
|
mountPath: /secrets/ini
|
|
|
|
1-init-directories:
|
|
|
|
mountPath: "/usr/sbin"
|
|
|
|
2-configure-gitea:
|
|
|
|
mountPath: "/usr/sbin"
|
2021-10-01 12:20:59 +00:00
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/* Append the general secret volumes to the volumes */}}
|
|
|
|
{{- define "gitea.configvolume" -}}
|
2023-04-30 19:15:20 +00:00
|
|
|
enabled: true
|
2021-10-01 12:20:59 +00:00
|
|
|
readOnly: true
|
2023-04-30 19:15:20 +00:00
|
|
|
type: secret
|
|
|
|
objectName: secret
|
|
|
|
targetSelector:
|
|
|
|
main:
|
|
|
|
main:
|
|
|
|
mountPath: /secrets/config
|
|
|
|
1-init-directories:
|
|
|
|
mountPath: /etc/gitea/conf
|
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 */}}
|
2023-04-30 19:15:20 +00:00
|
|
|
{{ include "tc.v1.common.loader.apply" . }}
|