-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
(V2) Support filtering ingresses on ingressClassName as well as deprecated kubernetes.io/ingress.class annotation #3589
(V2) Support filtering ingresses on ingressClassName as well as deprecated kubernetes.io/ingress.class annotation #3589
Conversation
...and update the help text to specify use more clearly
we don't want to get incompatible restrictions by letting someone set "--ingress-class" and --annotation-filter="kubernetes.io/ingress.class" at the same time
and add an extra one for the mutual exclusivity of ingressClassNames and ingress.class annotationFilters
Signed-off-by: Arnaud Lefray <[email protected]>
|
Welcome @alefray! |
/lgtm |
@alefray thanks for your work!
|
/ok-to-test |
@szuecs I think string matching on IngressClassName is probably fine here. As far as when both annotation and field are set on Ingress resource, I think it depends on the history of this config in external-dns.
Assuming this is 1 here, but let me know if I missed something. |
|
Thanks for you remarks. All comments have been taken into account. 👍 |
@robscott thanks for your input! |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alefray, szuecs The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
This is an attempt to finalize the work started by @dsalisbury on #2054
All credits goes to him.
I've just implemented unresolved comments by @sftim @johngmyers @szuecs and other contributors.
Description
Adds the ability to filter ingresses based on their IngressClassName attribute. There's an --ingress-class-filter argument that's now exposed through the CLI and some additional filtering in source/ingress.go
Fixes #1975 #1792
Checklist
Open questions
I'm not sure about the behavior of
--ingress-class
when bothingressClassName
field andkubernetes.io/ingress.class
annotation exist:ingressClassName
takes precedence overkubernetes.io/ingress.class
? (or the opposite)--ingress-class
must matchingressClassName
if defined andkubernetes.io/ingress.class
annotation is ignored ?--ingress-class
can match any ofingressClassName
orkubernetes.io/ingress.class
annotation ?Currently, the last case is implemented. Thus considering the comment https://github.com/kubernetes-sigs/external-dns/pull/2054/files#r1064085316, test cases are:
Should not be in expected.Should be in expected.Other questions, there is many mention of
kubernetes.io/ingress.class
in the documentation, should they all be removed in favor ofingressClassName
?