companyinfo / helm-charts

Company.info Helm charts repository
https://companyinfo.github.io/helm-charts
Apache License 2.0
68 stars 22 forks source link

Add option for multiple ingresses objects #16

Open yahel2410 opened 1 year ago

yahel2410 commented 1 year ago

Hi, I have a use-case where I need to deploy 2 ingresses for the same service, with different annotations per each ingress. In particular I'm trying the set nginx.ingress.kubernetes.io/auth-url for one ingress and don't set it for the other.

Can you please add support for multiple ingresses objects?

p-afraz commented 1 year ago

Hi, so is this what you suggest to be supported in the values file?

current:

ingress:
    enabled: true
    annotations:
        nginx.ingress.kubernetes.io/auth-url: http://test.com/foo

new:

ingress:
    - annotations:
           nginx.ingress.kubernetes.io/auth-url: http://test.com/foo
    - annotations:
           nginx.ingress.kubernetes.io/auth-url: http://test.com/bar
yahel2410 commented 1 year ago

Hey, yes something like that. I suggest to accept a list of ingresses and create an Ingress object for each of them. I my case the 2nd ingress doesn't need the auth-url annotation.

e.g:

current:

ingress:
  enabled: true
  path: /foo
  hostname: "a.example.com"
  ingressClassName: "nginx"
  annotations:
    nginx.ingress.kubernetes.io/auth-url: http://test.com/foo

new:

ingress:
  - enabled: true
    path: /foo
    hostname: "a.example.com"
    ingressClassName: "nginx"
    annotations:
      nginx.ingress.kubernetes.io/auth-url: http://test.com/foo
  - enabled: true
    path: /bar
    hostname: "a.example.com"
    ingressClassName: "nginx"
yahel2410 commented 1 year ago

@atkrad What do you think about this? I really need this since I currently have an ingress applied manually outside of the chart because of different annotations.

Maybe adding extraIngresses option will solve this? I can work on a PR

denzhel commented 1 year ago

I also need this, @atkrad What do you think ?