The `deployment` dict mixes values that apply to the Deployment object itself (`annotations`, `labels`, `affinity`, `terminationGracePeriodSeconds`) with values that apply to a single container. `deployment.env` was the only container-scoped key, which made it unclear which container it targets once further containers get their own configuration. Grouping container-scoped values under `deployment.gitea` establishes a per-container namespace and leaves room for sibling sections without another breaking rename later. The value ordering in `values.yaml` is aligned with the chart conventions (`enabled`, `annotations`, `labels` first). `deployment.enabled` is introduced and wired up in the template so the Deployment can be skipped entirely. This allows the chart to be used for rendering only the surrounding resources, e.g. when the workload itself is managed elsewhere. A deprecation check is added so that existing installations fail fast with an actionable error message instead of silently dropping their environment variables, which would otherwise surface as hard-to-debug runtime misconfiguration. Unit tests cover the disabled Deployment, the propagation of `deployment.gitea.env` into all init containers and the Gitea container, and the deprecation checks for `affinity` and `deployment.env`. BREAKING CHANGE: `deployment.env` no longer exists. Use `deployment.gitea.env` instead. Installations that still set `deployment.env` will fail unless `checkDeprecation` is set to `false`. Co-authored-by: Copilot <copilot@github.com>
53 lines
2.4 KiB
YAML
53 lines
2.4 KiB
YAML
{{- if .Values.checkDeprecation -}}
|
|
{{/* CUSTOM PROBES */}}
|
|
{{- if .Values.gitea.customLivenessProbe -}}
|
|
{{- fail "`gitea.customLivenessProbe` does no longer exist. Please refer to the changelog and configure `gitea.livenessProbe` instead." -}}
|
|
{{- end -}}
|
|
{{- if .Values.gitea.customReadinessProbe -}}
|
|
{{- fail "`gitea.customReadinessProbe` does no longer exist. Please refer to the changelog and configure `gitea.readinessProbe` instead." -}}
|
|
{{- end -}}
|
|
{{- if .Values.gitea.customStartupProbe -}}
|
|
{{- fail "`gitea.customStartupProbe` does no longer exist. Please refer to the changelog and configure `gitea.startupProbe` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* LDAP SOURCES */}}
|
|
{{- if kindIs "map" .Values.gitea.ldap -}}
|
|
{{- fail "You can configure multiple LDAP sources. Please refer to the changelog and switch `gitea.ldap` from object to array notation." -}}
|
|
{{- end -}}
|
|
|
|
{{/* OAUTH SOURCES */}}
|
|
{{- if kindIs "map" .Values.gitea.oauth -}}
|
|
{{- fail "You can configure multiple OAuth sources. Please refer to the changelog and switch `gitea.oauth` from object to array notation." -}}
|
|
{{- end -}}
|
|
|
|
{{/* BUILTIN */}}
|
|
{{- if .Values.gitea.cache -}}
|
|
{{- if .Values.gitea.cache.builtIn -}}
|
|
{{- fail "`gitea.cache.builtIn` does no longer exist. Please use `memcached` at root level instead." -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- if .Values.gitea.database -}}
|
|
{{- if .Values.gitea.database.builtIn -}}
|
|
{{- fail "`gitea.database.builtIn` does no longer exist. Builtin databases can be configured inside the dependencies itself. Please refer to the changelog." -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- if .Values.gitea.admin -}}
|
|
{{- fail "`gitea.admin` does no longer exist. Please refer to the changelog and configure `secrets.admin` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* SIGNING */}}
|
|
{{- if .Values.signing -}}
|
|
{{- fail "`signing` does no longer exist. Please refer to the changelog and configure `secrets.gpg` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* AFFINITY */}}
|
|
{{- if .Values.affinity -}}
|
|
{{- fail "`affinity` does no longer exist. Please refer to the changelog and configure `deployment.affinity` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* DEPLOYMENT ENV */}}
|
|
{{- if .Values.deployment.env -}}
|
|
{{- fail "`deployment.env` does no longer exist. Please refer to the changelog and configure `deployment.gitea.env` instead." -}}
|
|
{{- end -}}
|
|
{{- end -}}
|