Cert-manager issuer created with ingress.class="none"
Summary
Cert issuer gets configured to use a class named "none"
. Instead, it should be created without ingress class.
Steps to reproduce
Install chart with --set global.ingress.class=none
.
These docs say:
Set to
none
to disable, or""
for empty. Note: fornone
or""
, setnginx-ingress.enabled=false
to prevent the charts from deploying unnecessary Ingress resources.
Configuration used
global:
ingress:
annotations:
traefik.ingress.kubernetes.io/router.middlewares: gitlab-https-redirect@kubernetescrd
class: none
provider: traefik
certmanager:
install: false # Already installed
certmanager-issuer:
email: mail@example.com
nginx-ingress:
enabled: false # Use k3s traefik
Current behavior
Ingress created for solving ACME cert requests is created with a class that doesn't exist. Thus, the ingress controller doesn't handle it.
The source of the problem seems to be here: https://gitlab.com/gitlab-org/charts/gitlab/-/blob/fab415ebb68590c370b51b931a547b2b2db190b1/charts/certmanager-issuer/templates/_issuer.yaml#L25
Expected behavior
It should be adding the whole class
block conditionally only when the chosen class is not "none"
. Just like it's done here: https://gitlab.com/gitlab-org/charts/gitlab/-/blob/fab415ebb68590c370b51b931a547b2b2db190b1/templates/_ingress.tpl#L53
Versions
- Chart: 6.3.3
- Platform:
- Self-hosted: k3s
- Kubernetes: (
kubectl version
)- Client: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.5", GitCommit:"c285e781331a3785a7f436042c65c5641ce8a9e9", GitTreeState:"archive", BuildDate:"1980-01-01T00:00:00Z", GoVersion:"go1.17.10", Compiler:"gc", Platform:"linux/amd64"}
- Server: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.6+k3s1", GitCommit:"418c3fa858b69b12b9cefbcff0526f666a6236b9", GitTreeState:"clean", BuildDate:"1970-01-01T01:01:01Z", GoVersion:"go1.17.10", Compiler:"gc", Platform:"linux/amd64"}
- Helm: (
helm version
)- Client: version.BuildInfo{Version:"v3.9.0", GitCommit:"7ceeda6c585217a19a1131663d8cd1f7d641b2a7", GitTreeState:"", GoVersion:"go1.17.10"}
- Server:
@moduon MT-1248