add ability to disable nodePort Support
Description
When running external-dns in a multi-tenant environment (e.g. in namespaced=true mode in the helm chart), users may not be in a position to give access to the Node resource to the external-dns deployment. At the moment, external-dns will not function without access to the Node resource as a Node informer is always created by the Pod and Service sources.
In this PR I add the flag --ignore-nodeports that disables the Node informer and then ensures the Pod and Service sources makes no attempt to try and retrieve any information from the Node resource.
Welcome @jpiper!
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. :smiley:
Hi @jpiper. Thanks for your PR.
I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
/ok-to-test
Thanks, this PR looks good, is tested and documented 👍 .
As Albert Camus said:
To name things wrongly is to add to the misfortune of the world
If I understand correctly, when external-dns is namespaced, it does not make sense to set
ignoreNodePortsto true.So, 🤔 wdyt of renaming
ignore-nodeportscli args intonamespaced? And so, in the chart, when namespaced is enabled, it would add this--namespaced=truethat would disable the informer ?
It really depends, in an environment where you have access to the node resource, you could still run in the namespaced mode with the nodeinformer enabled, it really depends on your multi-tenancy model of your cluster. I have seen people give tenants access to the node resource, and likewise, multi-tenant clusters where you are not allowed to view the node resource. However, I agree, the naming could be improved. How do we feel about disableNodeSupport?, which then really implies that node hostnames/IPs will not be able to be synced?
alternatives I can think of for the flag:
--(disable|ignore)-node-(info|data|resources)
--disable-node-informer (leaks implementation details)
It really depends, in an environment where you have access to the node resource, you could still run in the namespaced mode with the nodeinformer enabled,
I am sorry: I do not understand this. When one is namespaced, AFAIK there is no Cluster RBAC. so there is no access possible to node, since it's a Cluster-wide resources.
Did I miss something ?
It really depends, in an environment where you have access to the node resource, you could still run in the namespaced mode with the nodeinformer enabled,
I am sorry: I do not understand this. When one is namespaced, AFAIK there is no Cluster RBAC. so there is no access possible to node, since it's a Cluster-wide resources.
Did I miss something ?
ah yes, this is my fault, sorry. I am getting confused between how the chart works and how one could theoretically deploy external-dns using a namespace scope but still using cluster resources. The chart doesn't support this deployment mode though so you're right, I can disable the node informer with the helm namespaced helm value is set to true
/lgtm
/assign @Raffo
New changes are detected. LGTM label has been removed.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from raffo. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
I have rebased the PR
cc @ivankatliarchuk
PR needs rebase.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
@jpiper Do you think you can rebase and address @ivankatliarchuk review comments ?
Yes I can 1 but I am on holiday for the next week. I can get to it on the 24th Feb!Sent from my iPhoneOn 15 Feb 2025, at 08:42, Michel Loiseleur @.> wrote: @jpiper Do you think you can rebase and address @ivankatliarchuk review comments ?—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.>
mloiseleur left a comment (kubernetes-sigs/external-dns#4727) @jpiper Do you think you can rebase and address @ivankatliarchuk review comments ?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle stale - Close this PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle rotten - Close this PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
/remove-lifecycle rotten
There has been no answer since 5 months, so I close this PR. Feel free to re-open or open a new one if you need it. /close
@mloiseleur: Closed this PR.
In response to this:
There has been no answer since 5 months, so I close this PR. Feel free to re-open or open a new one if you need it. /close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.