ingress-nginx: with helm chart 4.0.0~ I cannot use customized ingress class name

Hi, I have used ingress-nginx for a year. I deployed helm update command yesterday and from that time endpoint of all ingresses with customized ingressclass name have been disappeared.

I found helm chart’s template file ( controller-deployment.yaml ) has been changed not to directly apply ingressglass name with --ingress-class instead using - --controller-class={{ .Values.controller.ingressClassResource.controllerValue }} . So too customize ingress class name, I config controller.ingressClassResource settings but not work. So I used chart 3.35.0 instead of current version.

. ingress class: test-ingress . values.yaml

  ingressClassResource:
    name: test-ingress
    enabled: true
    default: false
    controllerValue: "k8s.io/ingress-nginx"

How can I keep using customized ingress class name instead of nginx?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 19 (10 by maintainers)

Most upvoted comments

@mimmus hi,

Did you install with helm ? If yes, then ;

(1) I see that line 100 of /charts/ingress-nginx/values/yaml has a key electionID. I think this works. (2) Line 106 has ingressClassResource.name. This works too. (3) Line 112 has ingressClassResource.controllerValue. This works too.

But we have not documented multiple instances of the ingress-nginx controller in one namespace yet. I think this is part of the bigger picture where namespace scoping the controller should be supported in code. I have yet to confirm if that is ready.

Hence the recommendation to install only one instance of the controller in one namespace. In the normal use case. If there is no other choice but you have to use 2 controllers in one namespace AND the use of above 3 key-values pairs works, then its a good scene.

Yep still an issue here

If someone is searching for how to have multiple ingress-nginx controllers with custom names, I was able to do this by following these directions (they must be in different namespaces as the directions mention. it didn’t work for me when I had them in the same namespace): https://kubernetes.github.io/ingress-nginx/#how-to-easily-install-multiple-instances-of-the-ingress-nginx-controller-in-the-same-cluster

AND also adding the ingress-class param in the Helm Chart value’s extraArgs

controller:
  extraArgs:
    ingress-class: "nginx-2-or-whatever"

I was facing this issue today after upgrading, too.

I found the parameter --ingress-class has been removed in 90c79689c46497636ac32a7e2828c6ab2dae2fd8 But the docs still refer to this parameter when using multiple ingress-controllers

My workaround for now is adding the parameter to the extraArgs, in addition to the controllerClass:

controller:
  extraArgs:
    ingress-class: ingress-external
[...]
  ingressClassResource:
    name: external
    enabled: true
    controllerValue: 'k8s.io/external'