-
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
feat: add support for external IP in ambassador host source #3734
feat: add support for external IP in ambassador host source #3734
Conversation
Welcome @fad3t! |
Is it intentional that the code also includes the The code could be more simply expressed using the refactor in #3728 Would it make sense to call |
I'm wondering if we should refactor What do you think @szuecs ? |
It is not, although I'm not sure there are many deployments of Ambassador using another service type. Anyway, it would be good to add that check, thanks.
Right, thanks.
Indeed, I didn't think about reusing that function - maybe to avoid confusion as it's part of the Service source. Might be good to have some kind of common utils functions in a separate file, so that all similar implementations can reuse them (and test them only once). This ties in with your second comment about extracting a common function for this purpose. How would you like to proceed next? |
I would like to first get some consensus from approvers on my proposed direction for sources that consume endpoints from associated Would it make sense for Ambassador to be associated with a After that, we would refactor the service source to make the target extraction usable by other sources. |
Hi, Any update on this one? Could we maybe consider going for an intermediate solution (= reuse the existing Thx, |
There needs to be a little refactoring since the TTL shouldn't come from the service's annotation. |
@johngmyers I think it's fine like this and we can do refactoring after that, or if @fad3t would do it even better. /ok-to-test |
Hi, I replaced my code with the existing Thanks! |
/test pull-external-dns-lint |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
Description
Hello!
I would like to submit a PR to add support for external IPs in Ambassador Host resources.
Most of the code has been shamelessly copied from the
Service
source implementation (https://github.com/kubernetes-sigs/external-dns/blob/master/source/service.go#L591).I couldn't add any tests as the ones I currently see for Ambassador are rather basic (e.g. making sure the annotation format is correct) while in my case I would need to mock the Kubernetes API and I'm not sure how to do it -- happy to give it a try if somebody can guide me a bit.
Note this fixes #3733.
Let me know if anything is missing or if you have improvement ideas.
Thanks,
Fred