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

The top-level `schedulerName` 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`, `tolerations` and
`topologySpreadConstraints`, so every pod scheduling setting now lives in one predictable place.

A deprecation check fails the release when the removed top-level value is still set. Silently ignoring it would
be hard to debug: the pod would fall back to the `default-scheduler` without any warning, bypassing the custom
scheduler the user relies on for placement decisions such as storage locality.

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

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-09-04 12:00:11 +02:00
co-authored by Copilot
parent 56119038ec
commit 80592de2d0
6 changed files with 31 additions and 9 deletions
+1 -1
View File
@@ -1118,7 +1118,6 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
| `gatewayAPI.nginx.clientSettingsPolicies.labels` | Additional labels applied to the ClientSettingsPolicy | `{}` | | `gatewayAPI.nginx.clientSettingsPolicies.labels` | Additional labels applied to the ClientSettingsPolicy | `{}` |
| `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" | `""` |
### deployment ### deployment
@@ -1134,6 +1133,7 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
| `deployment.nodeSelector` | NodeSelector for the deployment | `{}` | | `deployment.nodeSelector` | NodeSelector for the deployment | `{}` |
| `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.schedulerName` | Use an alternate scheduler, e.g. "stork" | `""` |
| `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.tolerations` | Tolerations of the Gitea deployment. | `[]` |
| `deployment.topologySpreadConstraints` | TopologySpreadConstraints for the deployment | `[]` | | `deployment.topologySpreadConstraints` | TopologySpreadConstraints for the deployment | `[]` |
+2 -2
View File
@@ -66,8 +66,8 @@ spec:
{{- $containerSecurityContext := include "gitea.containerSecurityContext" (list . (deepCopy .Values.containerSecurityContext)) | trim }} {{- $containerSecurityContext := include "gitea.containerSecurityContext" (list . (deepCopy .Values.containerSecurityContext)) | trim }}
{{- $commandInitContainerSecurityContext := include "gitea.commandInitContainerSecurityContext" (list . (deepCopy .Values.containerSecurityContext)) | trim }} {{- $commandInitContainerSecurityContext := include "gitea.commandInitContainerSecurityContext" (list . (deepCopy .Values.containerSecurityContext)) | trim }}
{{- $runtimeContainerSecurityContext := include "gitea.runtimeContainerSecurityContext" . | trim }} {{- $runtimeContainerSecurityContext := include "gitea.runtimeContainerSecurityContext" . | trim }}
{{- if .Values.schedulerName }} {{- if .Values.deployment.schedulerName }}
schedulerName: "{{ .Values.schedulerName }}" schedulerName: "{{ .Values.deployment.schedulerName }}"
{{- end }} {{- end }}
{{- if (or .Values.serviceAccount.create .Values.serviceAccount.name) }} {{- if (or .Values.serviceAccount.create .Values.serviceAccount.name) }}
serviceAccountName: {{ include "gitea.serviceAccountName" . }} serviceAccountName: {{ include "gitea.serviceAccountName" . }}
+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 -}}
{{/* SCHEDULER NAME */}}
{{- if .Values.schedulerName -}}
{{- fail "`schedulerName` does no longer exist. Please refer to the changelog and configure `deployment.schedulerName` instead." -}}
{{- end -}}
{{/* TOLERATIONS */}} {{/* TOLERATIONS */}}
{{- if .Values.tolerations -}} {{- if .Values.tolerations -}}
{{- fail "`tolerations` does no longer exist. Please refer to the changelog and configure `deployment.tolerations` instead." -}} {{- fail "`tolerations` does no longer exist. Please refer to the changelog and configure `deployment.tolerations` instead." -}}
+13
View File
@@ -139,6 +139,19 @@ tests:
- equal: - equal:
path: spec.template.spec.priorityClassName path: spec.template.spec.priorityClassName
value: high-priority value: high-priority
- it: schedulerName is undefined
template: templates/gitea/deployment.yaml
asserts:
- notExists:
path: spec.template.spec.schedulerName
- it: schedulerName is defined
template: templates/gitea/deployment.yaml
set:
deployment.schedulerName: stork
asserts:
- equal:
path: spec.template.spec.schedulerName
value: stork
- it: tolerations are undefined - it: tolerations are undefined
template: templates/gitea/deployment.yaml template: templates/gitea/deployment.yaml
asserts: asserts:
@@ -60,6 +60,12 @@ 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 `schedulerName` value is set
set:
schedulerName: stork
asserts:
- failedTemplate:
errorMessage: "`schedulerName` does no longer exist. Please refer to the changelog and configure `deployment.schedulerName` instead."
- it: fails when the removed `tolerations` value is set - it: fails when the removed `tolerations` value is set
set: set:
tolerations: tolerations:
@@ -94,6 +100,7 @@ tests:
resources: resources:
limits: limits:
cpu: 100m cpu: 100m
schedulerName: stork
tolerations: tolerations:
- key: database/type - key: database/type
operator: Equal operator: Equal
+3 -6
View File
@@ -293,12 +293,6 @@ gatewayAPI:
# maxSize: 100m # maxSize: 100m
## Use an alternate scheduler, e.g. "stork".
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
##
## @param schedulerName Use an alternate scheduler, e.g. "stork"
schedulerName: ""
## @section deployment ## @section deployment
deployment: deployment:
## @param deployment.enabled Enable the deployment of Gitea. ## @param deployment.enabled Enable the deployment of Gitea.
@@ -381,6 +375,9 @@ deployment:
# cpu: 100m # cpu: 100m
# memory: 128Mi # memory: 128Mi
## @param deployment.schedulerName Use an alternate scheduler, e.g. "stork"
schedulerName: ""
## @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