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

Filter out entire endpoint if it ends up without targets after filtering in targetFilterSource #3451

Conversation

BadLiveware
Copy link
Contributor

Description
Makes targetFilterSource filter out the entire endpoint if it ends up without targets after matching

Adds test setup for testing targetFilterSource
Make targetFilterSource filter out entire endpoint if it ends up without targets after matching

Fixes #3450

Checklist

  • Unit tests updated
  • End user documentation updated

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 5, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Mar 5, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @BadLiveware!

It looks like this is your first PR to kubernetes-sigs/external-dns 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/external-dns has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 5, 2023
@BadLiveware BadLiveware changed the title Add echo source for testing Filter out entire endpoint if it ends up without targets after filtering in targetFilterSource Mar 5, 2023
@BadLiveware
Copy link
Contributor Author

e816cc4 Is another global approach which would function for all sources and eventualities. However I thought this was best fixed closest to the problem.

@BadLiveware BadLiveware force-pushed the fix/filter-endpoints-without-targets branch from e3497c1 to b51b791 Compare March 5, 2023 17:05
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Mar 5, 2023
source/targerfiltersource_test.go Outdated Show resolved Hide resolved
source/echo.go Outdated Show resolved Hide resolved
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 9, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 9, 2023
@BadLiveware BadLiveware force-pushed the fix/filter-endpoints-without-targets branch from 6e1fc69 to 519880d Compare May 9, 2023 11:06
@BadLiveware
Copy link
Contributor Author

/easycla

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels May 17, 2023
Copy link
Contributor

@johngmyers johngmyers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this fell off my radar. One minor cleanup.

source/targetfiltersource_test.go Outdated Show resolved Hide resolved
source/targetfiltersource_test.go Outdated Show resolved Hide resolved
@BadLiveware BadLiveware force-pushed the fix/filter-endpoints-without-targets branch from 5c161cc to 3dbcb9c Compare June 29, 2023 20:38
@johngmyers
Copy link
Contributor

Thanks!
/ok-to-test
/lgtm
/assign @Raffo

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Jun 30, 2023
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 1, 2023
@johngmyers
Copy link
Contributor

/lttm

@johngmyers
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 1, 2023
@BadLiveware
Copy link
Contributor Author

@Raffo Any chance of a look through?

@johngmyers johngmyers mentioned this pull request Sep 13, 2023
2 tasks
@johngmyers
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johngmyers

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 15, 2023
@johngmyers
Copy link
Contributor

/test pull-external-dns-lint
/test pull-external-dns-unit-test

@k8s-ci-robot k8s-ci-robot merged commit a10a80e into kubernetes-sigs:master Sep 15, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split horizon setup with target-net-filter may end up with endpoint without targets
4 participants