Allow setting ingressClassName on the gitlab-shell IngressRouteTCP

What does this MR do and why?

When global.ingress.provider: traefik, the chart renders a <release>-gitlab-shell IngressRouteTCP but never sets spec.ingressClassName, and there is no value to configure one. Traefik's kubernetesCRD provider can be scoped with providers.kubernetescrd.ingressClass=<class>; with that filter active, the rendered route does not match the provider and is silently dropped, so git-over-SSH through it does not work. The webservice Ingress already derives ingressClassName from global.ingress.class — this MR brings parity to the gitlab-shell IngressRouteTCP.

Adds an optional gitlab-shell.traefik.ingressClassName value (default "", backward-compatible: the field is omitted when empty).

Closes #6520 (closed)

Checklist

  • Changelog entry added
  • Documentation updated (doc/charts/gitlab/gitlab-shell values table — add traefik.ingressClassName)
  • No schema change required (traefik is unconstrained in gitlab-shell/values.schema.json)
  • DCO sign-off on all commits (git commit -s)

Diff — template

--- a/charts/gitlab/charts/gitlab-shell/templates/traefik-tcp-ingressroute.yaml
+++ b/charts/gitlab/charts/gitlab-shell/templates/traefik-tcp-ingressroute.yaml
@@ -13,6 +13,9 @@ metadata:
     {{- include "gitlab.standardLabels" . | nindent 4 }}
     {{- include "gitlab.commonLabels" . | nindent 4 }}
 spec:
+  {{- with .Values.traefik.ingressClassName }}
+  ingressClassName: {{ . }}
+  {{- end }}
   entryPoints:
     - {{ .Values.traefik.entrypoint }}
   routes:

Diff — values.yaml

--- a/charts/gitlab/charts/gitlab-shell/values.yaml
+++ b/charts/gitlab/charts/gitlab-shell/values.yaml
@@ -78,6 +78,11 @@
 # When using traefik ingress
 traefik:
   entrypoint: gitlab-shell
   apiVersion: ""
+  # ingressClassName for the generated IngressRouteTCP. Leave empty to omit the
+  # field. Set this when Traefik's kubernetesCRD provider is scoped with an
+  # ingressClass (providers.kubernetescrd.ingressClass); without a matching
+  # class the route is silently ignored by that Traefik instance.
+  ingressClassName: ""
   tcpAnnotations: {}
   tcpMiddlewares: []
Edited by ioanalytica

Merge request reports

Loading