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
feat: Support Ingress Class Annotation in Argo CD CRD #636
feat: Support Ingress Class Annotation in Argo CD CRD #636
Conversation
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
300a423
to
f4c4772
Compare
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This change also disables the old `kubernetes.io/ingress.class` annotation added to ingress resources by default. Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
f4c4772
to
c916994
Compare
@sagikazarmark , I was trying to test this changes on my minikube cluster which has the following
What I noticed is the |
@iam-veeramalla Can you clarify what Do you have any other ingress classes defined in the cluster? I tested it in a kind cluster with grpc and server ingress with grpc left empty (falling back to the default) and the server explicitly set to nginx. Both showed up with the correct ingress class (grpc: null, server: nginx). |
Hi @sagikazarmark , I just have one IngressClass defined in the cluster and that is set to default -> "nginx". I created an Argo CD instance with However, I can try it one more time on my |
Just to clarify: the new field is called I don't know how Kubernetes behaves if you specify a non-existent ingress class in the ingress resource, but falling back to the default one doesn't sound necessarily bad. Try to create an ingress class resource with that name. I'll do some additional testing as well. |
Yeah Thank you !! I will do some additional testing as well !! |
@iam-veeramalla any updates? |
HI @sagikazarmark , Sorry I reviewed this and also tested before I went to vacation, Just forgot to merge it. I can confirm that this works :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks :)
Awesome, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sagikazarmark @iam-veeramalla
I see the annotation kubernetes.io/ingress.class
has been removed but the constant is still there in the code.
Any there any impact to upgrade by this change? That is, folks who may depend on this annotation. The default ingress class is empty. So, will this change break use cases which uses the old default annotation?
Hi @wtam2018 the old annotation cannot be used in anyways as the annotation is deprecated. This will be a breaking change as mentioned by @sagikazarmark in the comment |
Well, introducing a break change for an enhancement without any mitigation does not seem to make too much sense. Let's hope no users are depending the old behavior. BTW, deprecation means can still be used. |
Correct, the annotation could be removed if nothing else uses it.
It depends: it might break on unsupported Kubernetes version or with old ingress controllers. This PR changes a default that didn't really make sense in the first place (defaulting to an ingress class called "nginx" that may or may not exist in the first place). The new default uses the new ingress class types and defaults to the default ingress controller. To sum up: it may break in some edge cases, but the default makes more sense now and supports more setups, so I'd say it's an improvement even if it breaks in some cases. |
Please push a PR to remove the unused constant. Please add doc about the removal of the annotation and the migration instructions for those who are upgrading with those use/edge cases. @iam-veeramalla |
What type of PR is this?
/kind enhancement
What does this PR do / why we need it:
This PR adds IngressClass support to Ingress resources.
Have you updated the necessary documentation?
Which issue(s) this PR fixes:
Fixes #626
How to test changes / Special notes to the reviewer:
Relevant tests can be run by the following command:
Change can be tested by setting up a dev environment and applying the following manifest:
Note: As discussed in #626, this PR contains a breaking change:
kubernetes.io/ingress.class
annotation is no longer added and nginx is no longer the default ingress controller (Kubernetes will fall back to the default ingress class)Default nginx annotations (SSL redirect, backend) are still added though.