scale-catalog/stable/gitea/19.1.10/templates/common.yaml

53 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2024-07-13 07:59:30 +00:00
{{/* Make sure all variables are set properly */}}
{{- include "tc.v1.common.loader.init" . }}
{{/* Render secrets for gitea */}}
{{- $secrets := include "gitea.secrets" . | fromYaml -}}
{{- if $secrets -}}
{{- $_ := mustMergeOverwrite .Values.secret $secrets -}}
{{- end -}}
{{/* Render configmap for gitea */}}
{{- $configmap := include "gitea.configmap" . | fromYaml -}}
{{- if $configmap -}}
{{- $_ := set .Values.configmap "gitea-env" $configmap -}}
{{- end -}}
{{/* Append the general secret volumes to the volumes */}}
{{- define "gitea.initvolume" -}}
enabled: true
readOnly: true
type: secret
objectName: init
defaultMode: "0777"
targetSelector:
main:
main:
mountPath: /secrets/ini
1-init-directories:
mountPath: "/usr/sbin"
2-configure-gitea:
mountPath: "/usr/sbin"
{{- end -}}
{{/* Append the general secret volumes to the volumes */}}
{{- define "gitea.configvolume" -}}
enabled: true
readOnly: true
type: secret
objectName: secret
targetSelector:
main:
main:
mountPath: /secrets/config
1-init-directories:
mountPath: /etc/gitea/conf
{{- end -}}
{{- $_ := set .Values.persistence "init" (include "gitea.initvolume" . | fromYaml) -}}
{{- $_ := set .Values.persistence "config" (include "gitea.configvolume" . | fromYaml) -}}
{{/* Render the templates */}}
{{ include "tc.v1.common.loader.apply" . }}