Error when ingressClassName is supported by API but not by the ingress controller
The following discussion from !263 (merged) should be addressed:
-
@schealex started a discussion: (+2 comments) this PR just made all of our pipelines fail. This is what we had in our
auto-deploy-values.yaml
:ingress: annotations: kubernetes.io/ingress.class: "alb" alb.ingress.kubernetes.io/scheme: "internet-facing" alb.ingress.kubernetes.io/healthcheck-path: "/health" alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80}, {"HTTPS":443}]' alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}'
i guess now that there is
className
which also has a default value you gotta unset the default or remove the annotation and put the correct class in. But we would like to avoid having to adapt this in ~50 projects (which all of them have the above).is there a way so you guys can make it not having a default?`
[EDIT] nah just switching from the annotation to setting the className does not work:
Error: release xxx failed, and has been uninstalled due to atomic being set: admission webhook "vingress.elbv2.k8s.aws" denied the request: invalid ingress class: IngressClass.networking.k8s.io "alb" not found
[EDIT] this works:
ingress: className: null annotations: kubernetes.io/ingress.class: "alb" alb.ingress.kubernetes.io/scheme: "internet-facing" alb.ingress.kubernetes.io/healthcheck-path: "/health" alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80}, {"HTTPS":443}]' alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}'
but again we would like not to have to be forced to make that change in every project. A PR should not break working deployments?
Workarounds
Update the ingress controller
Up-to-date ingress controllers should support the ingressClassName
field, solving this problem.
v2.27.0
or newer
Upgrade to version When using standard Auto DevOps templates, set the following two variables:
-
AUTO_DEPLOY_IMAGE_VERSION
tov2.27.0
-
DAST_AUTO_DEPLOY_IMAGE_VERSION
tov2.27.0
These can be set as unprotected Group-level CI/CD variables on GitLab.com, or Instance-level variables on self-managed instances.
v2.25.0
or earlier
Downgrade to version When using standard Auto DevOps templates, set the following two variables:
-
AUTO_DEPLOY_IMAGE_VERSION
tov2.25.0
-
DAST_AUTO_DEPLOY_IMAGE_VERSION
tov2.25.0
These can be set as unprotected Group-level CI/CD variables on GitLab.com, or Instance-level variables on self-managed instances.