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:
@@ -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.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`. | `{}` |
|
||||
| `schedulerName` | Use an alternate scheduler, e.g. "stork" | `""` |
|
||||
|
||||
### 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.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.schedulerName` | Use an alternate scheduler, e.g. "stork" | `""` |
|
||||
| `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 | `[]` |
|
||||
|
||||
@@ -66,8 +66,8 @@ spec:
|
||||
{{- $containerSecurityContext := include "gitea.containerSecurityContext" (list . (deepCopy .Values.containerSecurityContext)) | trim }}
|
||||
{{- $commandInitContainerSecurityContext := include "gitea.commandInitContainerSecurityContext" (list . (deepCopy .Values.containerSecurityContext)) | trim }}
|
||||
{{- $runtimeContainerSecurityContext := include "gitea.runtimeContainerSecurityContext" . | trim }}
|
||||
{{- if .Values.schedulerName }}
|
||||
schedulerName: "{{ .Values.schedulerName }}"
|
||||
{{- if .Values.deployment.schedulerName }}
|
||||
schedulerName: "{{ .Values.deployment.schedulerName }}"
|
||||
{{- end }}
|
||||
{{- if (or .Values.serviceAccount.create .Values.serviceAccount.name) }}
|
||||
serviceAccountName: {{ include "gitea.serviceAccountName" . }}
|
||||
|
||||
@@ -70,6 +70,11 @@
|
||||
{{- fail "`resources` does no longer exist. Please refer to the changelog and configure `deployment.gitea.resources` instead." -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* SCHEDULER NAME */}}
|
||||
{{- if .Values.schedulerName -}}
|
||||
{{- fail "`schedulerName` does no longer exist. Please refer to the changelog and configure `deployment.schedulerName` instead." -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* TOLERATIONS */}}
|
||||
{{- if .Values.tolerations -}}
|
||||
{{- fail "`tolerations` does no longer exist. Please refer to the changelog and configure `deployment.tolerations` instead." -}}
|
||||
|
||||
@@ -139,6 +139,19 @@ tests:
|
||||
- equal:
|
||||
path: spec.template.spec.priorityClassName
|
||||
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
|
||||
template: templates/gitea/deployment.yaml
|
||||
asserts:
|
||||
|
||||
@@ -60,6 +60,12 @@ tests:
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
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
|
||||
set:
|
||||
tolerations:
|
||||
@@ -94,6 +100,7 @@ tests:
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
schedulerName: stork
|
||||
tolerations:
|
||||
- key: database/type
|
||||
operator: Equal
|
||||
|
||||
+3
-6
@@ -293,12 +293,6 @@ gatewayAPI:
|
||||
# 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
|
||||
deployment:
|
||||
## @param deployment.enabled Enable the deployment of Gitea.
|
||||
@@ -381,6 +375,9 @@ deployment:
|
||||
# cpu: 100m
|
||||
# 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
|
||||
terminationGracePeriodSeconds: 60
|
||||
|
||||
|
||||
Reference in New Issue
Block a user