Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ingressClassName to ArgoCDIngressSpec #626

Closed
sagikazarmark opened this issue Apr 24, 2022 · 11 comments · Fixed by #636
Closed

Add ingressClassName to ArgoCDIngressSpec #626

sagikazarmark opened this issue Apr 24, 2022 · 11 comments · Fixed by #636
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@sagikazarmark
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The kubernetes.io/ingress.class annotation is deprecated and replaced by the ingressClassName parameter in the latest ingress spec.

Describe the solution you'd like
Allow setting ingressClassName in ArgoCDIngressSpec. Setting ingressClassName should override any defaults that might be set currently.

Additional context
I'm happy to work on this feature if we agree on the details.

@iam-veeramalla
Copy link
Collaborator

Hi @sagikazarmark , I was about raise the similar issue. Thanks :)

Yes, Ingress Class annotation is deprecated(never formally support) and moved to IngressClassName in the spec.

I would like to see the below.

  1. Remove the hard coded Nginx related Ingress annotations(IngressClass, SSLRedirect ..).
  2. Allow users to provide their IngressClassName through Argo CD CRD.
  3. Allow users to provide custom annotations supported by their Ingress controller through Argo CD CRD.

@sagikazarmark Do we agree on the above ?

@iam-veeramalla iam-veeramalla added bug Something isn't working good first issue Good for newcomers labels Apr 25, 2022
@iam-veeramalla
Copy link
Collaborator

iam-veeramalla commented May 2, 2022

@sagikazarmark you have shown interest in working on this issue. Please let me know if you would like me to assign this to you. Thanks :)

@sagikazarmark
Copy link
Contributor Author

@iam-veeramalla Yep, I'm happy to take this one.

A couple notes though:

Remove the hard coded Nginx related Ingress annotations(IngressClass, SSLRedirect ..).

This would be a breaking change. Is that acceptable?
(The behavior would change from using "nginx" to using the default ingress controller)

@sagikazarmark
Copy link
Contributor Author

Also, I'd rather classify this as an enhancement, not necessarily a bug. My two cents.

@iam-veeramalla
Copy link
Collaborator

@sagikazarmark how about having nginx as default and allow users to configure a custom one through CRD ? If a custom Ingress controller is configured through CRD, we can remove the default Nginx.

That way this wouldn't be a breaking change.

@sagikazarmark
Copy link
Contributor Author

Well, it's not that simple unfortunately. When the ingressClassName in an Ingress resource is unspecified/nil, Kubernetes automatically falls back to the default Ingress Controller.

It would certainly be a reasonable expectation that the Ingress configuration for the CRD works the same way (which contradicts with the current behavior).

To be clear: I think breaking the current behavior is the easiest solution here (especially because not everyone uses nginx as their ingress controller, so one could argue this opinionated default doesn't make much sense in the first place).

An alternative I can imagine is introducing a temporary switch, like --disable-default-ingress-annotations to tell the controller not to apply those annotations at all. But that's more complicated and would result in a second breaking change down the line (when the switch is removed).

@iam-veeramalla
Copy link
Collaborator

@sagikazarmark I would agree with you.

The current behavior would not work down the line anyways as it is deprecated annotation. We can mention about the annotation removal in the release notes and also steps to configure the new Ingress Class.

@sagikazarmark
Copy link
Contributor Author

Ok. I'll get to work.

@sagikazarmark
Copy link
Contributor Author

@iam-veeramalla please see the linked PR.

@bitvijays
Copy link

Hi @sagikazarmark Hope you are doing well. Just curious, would this change resolve the issue mentioned here #603

Thank you for your support :)

@sagikazarmark
Copy link
Contributor Author

@bitvijays I don't think it's related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants