feat(ns1): optionally identify NS1 zone by handle instead of FQDN
What does it do ?
This PR introduces the ability to explicitly override a zone FQDN with a "zone handle" for the NS1 provider, which is an organization-unique identifier for a zone in NS1.
Motivation
When a zone is created in NS1 and a zone handle is not specified, then the zone handle is the same as the zone FQDN. However, if a zone has been created with a zone handle that is different from its FQDN, then external-dns will fail to find that zone in NS1.
The functionality allows one to explicitly map an FQDN to a zone handle via flags:
--ns1-zone-handle-map=dev.example.com=dev-view
and by environment variable:
EXTERNAL_DNS_NS1_ZONE_HANDLE_MAP="example.com=corp-prod\ndev.example.com=dev-view"
If a zone handle override is not found for a given FQDN, then external-dns will default to using the FQDN to identify the zone.
More
- [x] Yes, this PR title follows Conventional Commits
- [x] Yes, I added unit tests
- [x] Yes, I updated end user documentation accordingly
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: cbertinato / name: Chris Bertinato (7736d29d9e36242254486d8c1fb84b5d315d3442, f3d3ad1c02bf31040d6920245729a48269b4e9e9, 3a7fd7d17918a9b94e8ade32a1b795cf3886962d, 83002157fe8406bf62bfffa343e2967681a41a72, 2a52eed52846d372ed34d56a0a0f616ff0574e51)
Welcome @cbertinato!
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 @cbertinato. 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.
@mloiseleur you got it!
/lgtm
Could you share evidences that NS1 provider still works with and without this new flag?
[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 mloiseleur. 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
@ivankatliarchuk yes, I will do. Also, I will address all feedback @szuecs.
@cbertinato we are near the merge. You need to rebase and fix the ci, a last review and we should be good to go.
@mloiseleur thanks for the reminder! got busy and dropped a few things. will take care of this today.
@cbertinato: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| pull-external-dns-unit-test | 3a7fd7d17918a9b94e8ade32a1b795cf3886962d | link | true | /test pull-external-dns-unit-test |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
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. I understand the commands that are listed here.
@cbertinato If you rebuild the flags with the Makefile target, it should fix the current issue with the CI.
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.