The chart-managed init containers were hardcoded inside `deployment.yaml`. Their image, environment, resources, security context and volume mounts could not be adjusted individually, and custom init containers could only be prepended or appended as a whole via `preExtraInitContainers`/`postExtraInitContainers`. The init containers are now rendered from `deployment.initContainers`, an ordered list whose entries either `link` a chart-managed init container (`initDirectories`, `initAppIni`, `initConfigureGPG`, `initConfigureGitea`) or provide a free-form `container` definition. This allows custom containers at any position and makes the execution order explicit. Each linked init container has its own configuration block in `values.yaml` and falls back to `deployment.gitea.securityContext` and `initContainers.resources` when unset. To support per-container images, `gitea.image` was split into the generic helper `gitea.image.name`, which renders an arbitrary `image` dict instead of only `deployment.gitea.image`. The pod annotations moved from `deployment.yaml` into the new helper `gitea.pod.annotations`. The SHA sum annotations now also cover user-provided Secrets: their content is unknown to the chart, so the Secret is read from the cluster via Helm's `lookup` function. Chart-managed Secrets keep using the rendered manifest, because the cluster still holds their pre-upgrade state during rendering. Because `lookup` requires `get` permission on Secrets and silently returns nothing during client-side rendering (`helm template`, `--dry-run`, Argo CD without a live cluster), `addSHASumAnnotation` now defaults to `false`. The trade-offs are documented in the README so users can make an informed decision. BREAKING CHANGE: `preExtraInitContainers` and `postExtraInitContainers` have been removed. Add an entry with a `container` key before or after the linked init containers in `deployment.initContainers` instead. BREAKING CHANGE: `secrets.<secret>.addSHASumAnnotation` now defaults to `false`. Set it to `true` explicitly to keep the rollout trigger on Secret changes. Co-authored-by: Copilot <copilot@github.com>
133 lines
6.0 KiB
YAML
133 lines
6.0 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 -}}
|
|
|
|
{{/* CONTAINER SECURITY CONTEXT */}}
|
|
{{- if .Values.containerSecurityContext -}}
|
|
{{- fail "`containerSecurityContext` does no longer exist. Please refer to the changelog and configure `deployment.gitea.securityContext` 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 -}}
|
|
|
|
{{/* DNS CONFIG */}}
|
|
{{- if .Values.dnsConfig -}}
|
|
{{- fail "`dnsConfig` does no longer exist. Please refer to the changelog and configure `deployment.dnsConfig` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* EXTRA CONTAINER VOLUME MOUNTS */}}
|
|
{{- if .Values.extraContainerVolumeMounts -}}
|
|
{{- fail "`extraContainerVolumeMounts` does no longer exist. Please refer to the changelog and configure `deployment.gitea.volumeMounts` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* EXTRA VOLUMES */}}
|
|
{{- if .Values.extraVolumes -}}
|
|
{{- fail "`extraVolumes` does no longer exist. Please refer to the changelog and configure `deployment.volumes` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* NODE SELECTOR */}}
|
|
{{- if .Values.nodeSelector -}}
|
|
{{- fail "`nodeSelector` does no longer exist. Please refer to the changelog and configure `deployment.nodeSelector` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* PRIORITY CLASS NAME */}}
|
|
{{- if .Values.priorityClassName -}}
|
|
{{- fail "`priorityClassName` does no longer exist. Please refer to the changelog and configure `deployment.priorityClassName` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* POD SECURITY CONTEXT */}}
|
|
{{- if .Values.podSecurityContext -}}
|
|
{{- fail "`podSecurityContext` does no longer exist. Please refer to the changelog and configure `deployment.securityContext` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* POST EXTRA INIT CONTAINERS */}}
|
|
{{- if .Values.postExtraInitContainers -}}
|
|
{{- fail "`postExtraInitContainers` does no longer exist. Please refer to the changelog and append an entry with a `container` key to `deployment.initContainers` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* PRE EXTRA INIT CONTAINERS */}}
|
|
{{- if .Values.preExtraInitContainers -}}
|
|
{{- fail "`preExtraInitContainers` does no longer exist. Please refer to the changelog and prepend an entry with a `container` key to `deployment.initContainers` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* RESOURCES */}}
|
|
{{- if .Values.resources -}}
|
|
{{- fail "`resources` does no longer exist. Please refer to the changelog and configure `deployment.gitea.resources` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* REPLICA COUNT */}}
|
|
{{- if .Values.replicaCount -}}
|
|
{{- fail "`replicaCount` does no longer exist. Please refer to the changelog and configure `deployment.replicas` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* SCHEDULER NAME */}}
|
|
{{- if .Values.schedulerName -}}
|
|
{{- fail "`schedulerName` does no longer exist. Please refer to the changelog and configure `deployment.schedulerName` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* SECURITY CONTEXT */}}
|
|
{{- if .Values.securityContext -}}
|
|
{{- fail "`securityContext` does no longer exist. Please refer to the changelog and configure `deployment.securityContext` and `deployment.gitea.securityContext` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* STRATEGY */}}
|
|
{{- if .Values.strategy -}}
|
|
{{- fail "`strategy` does no longer exist. Please refer to the changelog and configure `deployment.strategy` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* TOLERATIONS */}}
|
|
{{- if .Values.tolerations -}}
|
|
{{- fail "`tolerations` does no longer exist. Please refer to the changelog and configure `deployment.tolerations` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{/* TOPOLOGY SPREAD CONSTRAINTS */}}
|
|
{{- if .Values.topologySpreadConstraints -}}
|
|
{{- fail "`topologySpreadConstraints` does no longer exist. Please refer to the changelog and configure `deployment.topologySpreadConstraints` instead." -}}
|
|
{{- end -}}
|
|
{{- end -}}
|