feat(deployment)!: move tolerations to deployment.tolerations

The top-level `tolerations` value only ever configured the pod spec of the Gitea Deployment, but was declared
next to chart-wide settings. Moving it into the `deployment` dict completes the consolidation already done for
`affinity`, `dnsConfig`, `nodeSelector`, `priorityClassName`, `resources` and `topologySpreadConstraints`, so
every pod scheduling setting is now grouped in one predictable place instead of being scattered across the
values file.

A deprecation check fails the release when the removed top-level value is still set. Silently ignoring it would
be dangerous here: the tolerations would be dropped without any warning and the Gitea pod could no longer be
scheduled onto the tainted nodes it was explicitly pinned to, leaving the deployment stuck in `Pending`.

BREAKING CHANGE: `tolerations` no longer exists. Use `deployment.tolerations` instead. Installations that still
set `tolerations` will fail unless `checkDeprecation` is set to `false`.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-09-04 11:55:13 +02:00
co-authored by Copilot
parent 9e12eeccab
commit 56119038ec
6 changed files with 50 additions and 5 deletions
+1 -1
View File
@@ -1119,7 +1119,6 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
| `gatewayAPI.nginx.clientSettingsPolicies.targetRef` | Target reference for the ClientSettingsPolicy. Defaults to the chart's HTTPRoute. | `{}` | | `gatewayAPI.nginx.clientSettingsPolicies.targetRef` | Target reference for the ClientSettingsPolicy. Defaults to the chart's HTTPRoute. | `{}` |
| `gatewayAPI.nginx.clientSettingsPolicies.body` | Client body settings (required when enabled), e.g. `maxSize`. See `docs/gateway-api.md`. | `{}` | | `gatewayAPI.nginx.clientSettingsPolicies.body` | Client body settings (required when enabled), e.g. `maxSize`. See `docs/gateway-api.md`. | `{}` |
| `schedulerName` | Use an alternate scheduler, e.g. "stork" | `""` | | `schedulerName` | Use an alternate scheduler, e.g. "stork" | `""` |
| `tolerations` | Tolerations for the deployment | `[]` |
### deployment ### deployment
@@ -1136,6 +1135,7 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
| `deployment.priorityClassName` | priorityClassName for the deployment | `""` | | `deployment.priorityClassName` | priorityClassName for the deployment | `""` |
| `deployment.resources` | Resources is the total amount of CPU and Memory resources required by all containers in the pod. | `{}` | | `deployment.resources` | Resources is the total amount of CPU and Memory resources required by all containers in the pod. | `{}` |
| `deployment.terminationGracePeriodSeconds` | How long to wait until forcefully kill the pod | `60` | | `deployment.terminationGracePeriodSeconds` | How long to wait until forcefully kill the pod | `60` |
| `deployment.tolerations` | Tolerations of the Gitea deployment. | `[]` |
| `deployment.topologySpreadConstraints` | TopologySpreadConstraints for the deployment | `[]` | | `deployment.topologySpreadConstraints` | TopologySpreadConstraints for the deployment | `[]` |
### Secret ### Secret
+1 -1
View File
@@ -437,7 +437,7 @@ spec:
topologySpreadConstraints: topologySpreadConstraints:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{- with .Values.tolerations }} {{- with .Values.deployment.tolerations }}
tolerations: tolerations:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
+5
View File
@@ -70,6 +70,11 @@
{{- fail "`resources` does no longer exist. Please refer to the changelog and configure `deployment.gitea.resources` instead." -}} {{- fail "`resources` does no longer exist. Please refer to the changelog and configure `deployment.gitea.resources` instead." -}}
{{- end -}} {{- 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 */}} {{/* TOPOLOGY SPREAD CONSTRAINTS */}}
{{- if .Values.topologySpreadConstraints -}} {{- if .Values.topologySpreadConstraints -}}
{{- fail "`topologySpreadConstraints` does no longer exist. Please refer to the changelog and configure `deployment.topologySpreadConstraints` instead." -}} {{- fail "`topologySpreadConstraints` does no longer exist. Please refer to the changelog and configure `deployment.topologySpreadConstraints` instead." -}}
+21
View File
@@ -139,6 +139,27 @@ tests:
- equal: - equal:
path: spec.template.spec.priorityClassName path: spec.template.spec.priorityClassName
value: high-priority value: high-priority
- it: tolerations are undefined
template: templates/gitea/deployment.yaml
asserts:
- notExists:
path: spec.template.spec.tolerations
- it: tolerations are defined
template: templates/gitea/deployment.yaml
set:
deployment.tolerations:
- key: database/type
operator: Equal
value: postgres
effect: NoSchedule
asserts:
- equal:
path: spec.template.spec.tolerations
value:
- key: database/type
operator: Equal
value: postgres
effect: NoSchedule
- it: topologySpreadConstraints are undefined - it: topologySpreadConstraints are undefined
template: templates/gitea/deployment.yaml template: templates/gitea/deployment.yaml
asserts: asserts:
@@ -60,6 +60,16 @@ tests:
asserts: asserts:
- failedTemplate: - failedTemplate:
errorMessage: "`resources` does no longer exist. Please refer to the changelog and configure `deployment.gitea.resources` instead." errorMessage: "`resources` does no longer exist. Please refer to the changelog and configure `deployment.gitea.resources` instead."
- it: fails when the removed `tolerations` value is set
set:
tolerations:
- key: database/type
operator: Equal
value: postgres
effect: NoSchedule
asserts:
- failedTemplate:
errorMessage: "`tolerations` does no longer exist. Please refer to the changelog and configure `deployment.tolerations` instead."
- it: fails when the removed `topologySpreadConstraints` value is set - it: fails when the removed `topologySpreadConstraints` value is set
set: set:
topologySpreadConstraints: topologySpreadConstraints:
@@ -84,6 +94,11 @@ tests:
resources: resources:
limits: limits:
cpu: 100m cpu: 100m
tolerations:
- key: database/type
operator: Equal
value: postgres
effect: NoSchedule
topologySpreadConstraints: topologySpreadConstraints:
- topologyKey: kubernetes.io/hostname - topologyKey: kubernetes.io/hostname
asserts: asserts:
+7 -3
View File
@@ -299,9 +299,6 @@ gatewayAPI:
## @param schedulerName Use an alternate scheduler, e.g. "stork" ## @param schedulerName Use an alternate scheduler, e.g. "stork"
schedulerName: "" schedulerName: ""
## @param tolerations Tolerations for the deployment
tolerations: []
## @section deployment ## @section deployment
deployment: deployment:
## @param deployment.enabled Enable the deployment of Gitea. ## @param deployment.enabled Enable the deployment of Gitea.
@@ -387,6 +384,13 @@ deployment:
## @param deployment.terminationGracePeriodSeconds How long to wait until forcefully kill the pod ## @param deployment.terminationGracePeriodSeconds How long to wait until forcefully kill the pod
terminationGracePeriodSeconds: 60 terminationGracePeriodSeconds: 60
## @param deployment.tolerations Tolerations of the Gitea deployment.
tolerations: []
# - key: database/type
# operator: Equal
# value: postgres
# effect: NoSchedule
## @param deployment.topologySpreadConstraints TopologySpreadConstraints for the deployment ## @param deployment.topologySpreadConstraints TopologySpreadConstraints for the deployment
topologySpreadConstraints: [] topologySpreadConstraints: []
# - topologyKey: kubernetes.io/hostname # - topologyKey: kubernetes.io/hostname