diff --git a/README.md b/README.md index d2efeeb..7def29c 100644 --- a/README.md +++ b/README.md @@ -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 `` to `-config` and the metrics Secret from `-metrics-secret` to `-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. +
diff --git a/templates/deprecation.yaml b/templates/deprecation.yaml index 3c294ee..7cdd34f 100644 --- a/templates/deprecation.yaml +++ b/templates/deprecation.yaml @@ -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." -}} diff --git a/templates/ingress.yaml b/templates/ingress.yaml index fb6d343..9f7ba93 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -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 }} diff --git a/unittests/helm/deployment/deprecations.yaml b/unittests/helm/deployment/deprecations.yaml index c338e14..137a3b2 100644 --- a/unittests/helm/deployment/deprecations.yaml +++ b/unittests/helm/deployment/deprecations.yaml @@ -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: diff --git a/unittests/helm/ingress/ingress.yaml b/unittests/helm/ingress/ingress.yaml index 48d7276..9e76234 100644 --- a/unittests/helm/ingress/ingress.yaml +++ b/unittests/helm/ingress/ingress.yaml @@ -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 diff --git a/values.yaml b/values.yaml index 9d93325..587329e 100644 --- a/values.yaml +++ b/values.yaml @@ -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