feat(ingress)!: rename className to ingressClassName

The value only ever populated the `spec.ingressClassName` field of the Ingress resource, so the shortened name was a
needless deviation from the Kubernetes API. `ingress.className` carried a `DEPRECATED` marker since #679, but that
marker was a leftover: the rename to the canonical name was proposed there, rejected during review and the follow-up
commits only removed the half-merged template fallback. The marker stayed behind for a year while the value remained
the one and only way to set the Ingress class, which made the documentation actively misleading.

The deprecation guard uses `hasKey` instead of a truthiness check on purpose. The previous chart default was an empty
string, so vendored values files tend to carry `ingress.className: ""` verbatim. A truthiness check would silently
ignore those and leave users wondering why their Ingress class is no longer applied.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-10-03 18:43:05 +02:00
co-authored by Copilot
parent 4d1440331d
commit 61d04282c8
6 changed files with 36 additions and 9 deletions
+10 -6
View File
@@ -1034,8 +1034,8 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
| `deployment.labels` | Labels for the deployment. | `{}` |
| `deployment.affinity` | Affinity for the deployment. | `{}` |
| `deployment.dnsConfig` | dnsConfig of the Gitea deployment. | `{}` |
| `deployment.gitea.env` | Additional environment variables to pass to the Gitea container. | `[]` |
| `deployment.gitea.envFrom` | List of environment variables mounted from configMaps or secrets for the Gitea container. | `[]` |
| `deployment.gitea.env` | Additional environment variables to pass to the gitea container. | `[]` |
| `deployment.gitea.envFrom` | List of environment variables mounted from configMaps or secrets for the gitea container. | `[]` |
| `deployment.gitea.image.registry` | image registry, e.g. gcr.io,docker.io. | `docker.gitea.com` |
| `deployment.gitea.image.repository` | Image to start for this pod. | `gitea` |
| `deployment.gitea.image.tag` | Visit: [Image tag](https://hub.docker.com/r/gitea/gitea/tags?page=1&ordering=last_updated). Defaults to `appVersion` within Chart.yaml. | `""` |
@@ -1121,7 +1121,7 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
| `gatewayAPI.core.backendTLSPolicy.targetRefs` | Target references for the BackendTLSPolicy. Defaults to the HTTP service. | `[]` |
| `gatewayAPI.core.backendTLSPolicy.validation` | Validation configuration (required when enabled). See `docs/gateway-api.md`. | `{}` |
| `gatewayAPI.core.backendTLSPolicy.validation.caCertificateRefs` | CA certificate references for the BackendTLSPolicy validation. See `docs/gateway-api.md`. | |
| `gatewayAPI.core.backendTLSPolicy.validation.hostname` | Hostname for the BackendTLSPolicy validation. Must be the Common Name (CN) or a Subject Alternative Name (SAN) of the Gitea server certificate. See `docs/gateway-api.md`. | |
| `gatewayAPI.core.backendTLSPolicy.validation.hostname` | Hostname for the BackendTLSPolicy validation. Must be the Common Name (CN) or a Subject Alternative Name (SAN) of the gitea server certificate. See `docs/gateway-api.md`. | |
| `gatewayAPI.core.httpRoute.enabled` | Render an HTTPRoute resource. | `false` |
| `gatewayAPI.core.httpRoute.annotations` | Annotations applied to the HTTPRoute. | `{}` |
| `gatewayAPI.core.httpRoute.labels` | Additional labels applied to the HTTPRoute. | `{}` |
@@ -1147,12 +1147,12 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
| `ingress.enabled` | Enable ingress. | `false` |
| `ingress.annotations` | Additional annotations. | `{}` |
| `ingress.labels` | Additional labels. | `{}` |
| `ingress.className` | DEPRECATED: Ingress class name. | `nginx` |
| `ingress.ingressClassName` | Name of the IngressClass which backs the Ingress. | `nginx` |
| `ingress.pathType` | Ingress Path Type. | `Prefix` |
| `ingress.hosts[0].host` | Default Ingress host. | `git.example.com` |
| `ingress.hosts[0].paths[0].path` | Default Ingress path. | `/` |
| `ingress.tls` | Ingress tls settings. | `[]` |
| `namespace` | An explicit namespace to deploy Gitea into. Defaults to the release namespace if not specified. | `""` |
| `namespace` | An explicit namespace to deploy gitea into. Defaults to the release namespace if not specified. | `""` |
### Network
@@ -1212,7 +1212,7 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
| `secrets.config.existingSecret.secretName` | Name of the already existing config Secret. | `""` |
| `secrets.config.new.annotations` | Annotations for the config Secret. | `{}` |
| `secrets.config.new.labels` | Labels for the config Secret. | `{}` |
| `secrets.gpg.enabled` | Enable mounting of a GPG key to sign Git commits. | `false` |
| `secrets.gpg.enabled` | Enable mounting of a GPG key to sign git commits. | `false` |
| `secrets.gpg.addSHASumAnnotation` | Add a pod annotation with the SHA sum of the GPG key Secret to trigger a rollout on change. Further information can be found in the [documentation](./README.md#secret-checksum-annotation). | `false` |
| `secrets.gpg.existingSecret.enabled` | Use an already existing Secret instead of creating the GPG key Secret. | `false` |
| `secrets.gpg.existingSecret.secretName` | Name of the already existing GPG key Secret. | `""` |
@@ -1508,6 +1508,10 @@ If you miss this, blindly upgrading may delete your Postgres instance and you ma
the config Secret changed from `<fullname>` to `<fullname>-config` and the metrics Secret from
`<fullname>-metrics-secret` to `<fullname>-metrics`.
- `ingress.className` has been renamed to `ingress.ingressClassName` to match the name of the `spec.ingressClassName`
field of the Ingress resource it populates. The chart fails to render if `ingress.className` is still set, even when
it is set to an empty string.
</details>
<details>
+5
View File
@@ -70,6 +70,11 @@
{{- fail "`extraVolumes` does no longer exist. Please refer to the changelog and configure `deployment.volumes` instead." -}}
{{- end -}}
{{/* INGRESS CLASS NAME */}}
{{- if hasKey .Values.ingress "className" -}}
{{- fail "`ingress.className` does no longer exist. Please refer to the changelog and configure `ingress.ingressClassName` instead." -}}
{{- end -}}
{{/* NODE SELECTOR */}}
{{- if .Values.nodeSelector -}}
{{- fail "`nodeSelector` does no longer exist. Please refer to the changelog and configure `deployment.nodeSelector` instead." -}}
+1 -1
View File
@@ -14,7 +14,7 @@ metadata:
name: {{ include "gitea.ingress.name" . }}
namespace: {{ .Release.Namespace }}
spec:
ingressClassName: {{ tpl .Values.ingress.className . }}
ingressClassName: {{ tpl .Values.ingress.ingressClassName . }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ tpl .host $ | quote }}
@@ -63,6 +63,12 @@ tests:
asserts:
- failedTemplate:
errorMessage: "`extraVolumes` does no longer exist. Please refer to the changelog and configure `deployment.volumes` instead."
- it: fails when the removed `ingress.className` value is set
set:
ingress.className: ""
asserts:
- failedTemplate:
errorMessage: "`ingress.className` does no longer exist. Please refer to the changelog and configure `ingress.ingressClassName` instead."
- it: fails when the removed `nodeSelector` value is set
set:
nodeSelector:
+12
View File
@@ -90,6 +90,18 @@ tests:
- git.example.com
secretName: tls-secret
- it: Render ingress with a custom ingressClassName
set:
ingress.enabled: true
ingress.ingressClassName: traefik
service.http.enabled: true
asserts:
- hasDocuments:
count: 1
- equal:
path: spec.ingressClassName
value: traefik
- it: Render ingress with custom HTTP service spec
set:
ingress.enabled: true
+2 -2
View File
@@ -587,7 +587,7 @@ gatewayAPI:
## @param ingress.enabled Enable ingress.
## @param ingress.annotations Additional annotations.
## @param ingress.labels Additional labels.
## @param ingress.className DEPRECATED: Ingress class name.
## @param ingress.ingressClassName Name of the IngressClass which backs the Ingress.
## @param ingress.pathType Ingress Path Type.
## @param ingress.hosts[0].host Default Ingress host.
## @param ingress.hosts[0].paths[0].path Default Ingress path.
@@ -596,7 +596,7 @@ ingress:
enabled: false
annotations: {}
labels: {}
className: "nginx"
ingressClassName: "nginx"
pathType: Prefix
hosts:
- host: git.example.com