-
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
Add regex domain filters #1504
Add regex domain filters #1504
Conversation
Signed-off-by: Enrique Gonzalez <goga.enrique@gmail.com>
/assign @njuettner |
@njuettner any thoughts on this? |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
We may have a usecase for this as well. @linki @njuettner is there anything preventing this from being reviewed? |
I have tested it and have been using it in production since I made the PR, it is working as designed. Let me know guys if there is anything you are missing or you think it should be done differently @njuettner @linki @Raffo /remove-lifecycle stale |
@offzale the change looks legit. Can you add a note in the unreleased section of the changelog? https://github.com/kubernetes-sigs/external-dns/blob/master/CHANGELOG.md |
Signed-off-by: Enrique Gonzalez <goga.enrique@gmail.com>
@Raffo thanks for the quick review, I have just added the change you mentioned |
/kind feature |
@Raffo can we move forward with this change? |
/assign |
@offzale can you please fix the merge conflicts? I will review after the merge conflicts are fixed. Thanks! |
Signed-off-by: Enrique Gonzalez <goga.enrique@gmail.com>
Signed-off-by: Enrique Gonzalez <goga.enrique@gmail.com>
@seanmalloy thanks for offering to review the PR yourself. I have just fixed the merge conflicts |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@seanmalloy did you have a chance to have a look at the changes? |
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.
Sorry for the late re-review, I took a look at this code and it looks like there are several things missing for it to be mergeable. Please take a look at my comments, I will give this a short turnaround if you will address them.
Hi @Raffo, Thanks for the review! I have just committed new changes addressing your comments above. Let me know if you find anything missing. |
@offzale Sorry for the hassle, we removed CHANGELOG.md because it was creating more problems than anything, can you drop your change? I will re-review this after that. |
Signed-off-by: Enrique Gonzalez <goga.enrique@gmail.com>
@Raffo thanks for the shout, I have just dropped the change so the MR has no conflicts |
/remove-lifecycle stale |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: offzale, Raffo 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 |
Hi @offzale ! Thanks for this feature, very useful 👍 |
Hi @offzale ! I have two kubernetes one test and other production and I would like use your regex filters to filter ingress domains based on it: Test configuration
Prod configuration
Unfortunately the production external-dns configuration is automatically deleting what was registered by the test external-dns. |
Correct Prod configuration should be and now everything is working:
@offzale thank you for your work is awesome :-) |
In some use cases, you might need a more flexible way of filtering than the current suffix filtering for zones and domains.
I have added a new filter,
RegexDomainFilter
, which filters domains and zones by using a regular expression, and has precedence overDomainFilter
. Its negative counterpart,RegexDomainExclusion
, has been added as well since golang regexp package has some limitations and might be necessary in some use cases.If
RegexDomainFilter
is not set, external-dns will work as usual filtering byDomainFilter
.