harbor-operator icon indicating copy to clipboard operation
harbor-operator copied to clipboard

not use default ingress controller

Open lengrongfu opened this issue 2 years ago • 1 comments

If you are reporting a problem, please make sure the following information are provided:

Expected behavior and actual behavior: I created the ingress class and set it as the default ingress (kubectl annotate ingressclasses nginx ingressclass.kubernetes.io/is-default-class=true), when the ingress in the harborcluster does not set the ingressClassName, the rules cannot be created correctly in the ingress controller .

Hope that the ingress rules can be set correctly when spec.export.core.ingress.controller=default

Steps to reproduce the problem:

expose:
    core:
      ingress:
        host: core.harbor.domain
        controller: default

kubectl apply -f

Versions: Please specify the versions of following systems.

  • harbor operator version: [main]
  • harbor version: [2.5.2]
  • kubernetes version: [1.24.0]
  • Any additional relevant versions such as CertManager

lengrongfu avatar Aug 08 '22 05:08 lengrongfu

$ kubectl -n ingress-nginx logs -f ingress-nginx-controller-7fb5bc6dc-n8xhw
I0808 05:17:45.314996       7 store.go:477] "removing ingress because of unknown ingressclass" ingress="cluster-sample-ns/harborcluster-sample-harbor-harbor"
I0808 05:17:45.315150       7 controller.go:167] "Configuration changes detected, backend reload required"
I0808 05:17:45.599854       7 controller.go:184] "Backend successfully reloaded"
image
[root@localhost ~]# kubectl get ingressclasses.networking.k8s.io
NAME    CONTROLLER             PARAMETERS   AGE
nginx   k8s.io/ingress-nginx   <none>       7d13h

[root@localhost ~]# kubectl get ingressclasses.networking.k8s.io nginx -o yaml
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
  annotations:
    ingressclass.kubernetes.io/is-default-class: "true"

this question is weird.

lengrongfu avatar Aug 08 '22 05:08 lengrongfu