-
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
Adding NS
support for Azure DNS
#2835
Conversation
Welcome @sebader! |
@JAORMX as I wrote, this is not yet ready to be approved. One test is failing.... @njuettner @Raffo could you maybe please take a look at this and help me out so we can get this forward? thanks! |
@sebader: Anything remaining but the LGTMs? |
@Ziphone there is still the failing tests which I need help with |
/test ? |
@Ziphone: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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/test-infra repository. |
@sebader: The test fails because it expects this record to get deleted: What blocks the deletion is the domain filter of the test provider: The test will pass if you replace the occurrences of Please involve me if you don't have time to get this change through. Very grateful for your initiative. |
@Ziphone awesome, thanks so much for this! Indeed it fixed the failing test ready for review :) |
Any thoughts on when we can get a review here, @Raffo? |
/assign @Raffo |
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.
@sebader, thanks a lot for this work! Could you please squash the commits?
b1ad23d
to
a9481fa
Compare
done |
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.
PR looks good, can you add information to the docs that NS records will not work if the managed-record-type
is not configured to also use NS records?
sorry, @Raffo I'm not sure what you refer to? |
@sebader without that flag ( see external-dns/pkg/apis/externaldns/types.go Line 426 in 8e058ca
I would also ask if you end-to-end tested this with azure because we don't really have infra to test on azure at this time, I'd be great if you can verify that everything works. |
ah got it @Raffo. I added a note to the docs, is that ok? Yes, I have tested the new NS records through k8gb - I guess there the managed-record-types is already set to enable NS under the hood, which is why I wasnt aware of this. |
/remove-lifecycle stale |
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/test-infra repository. |
@sebader Do you think you can rebase this PR ? |
puh... I haven't touched this in ages and not even a working local setup for this at the moment. But if anybody else could pick this up, as you can see, the actual change was pretty minimal to re-create that from scratch. |
Ok. I'll close this PR then. |
@mloiseleur: Closed this PR. In response to this:
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/test-infra repository. |
/reopen I would love to get this PR merged and avoid running a fork with NS support in https://github.com/k8gb-io/external-dns |
@ytsarev: Reopened this PR. In response to this:
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/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: JAORMX The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@ytsarev Sure. Do you think you can make your own or rebase this PR, then ? |
@mloiseleur yes, I will be also able to test it e2e |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-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:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
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. |
we will switch to new webhook based implementation and eventually contribute NS support to this one |
Azure supports NS records on public DNS zones: https://learn.microsoft.com/en-us/rest/api/dns/record-sets/create-or-update?view=rest-dns-2018-05-01&tabs=HTTP#create-ns-recordset This PR adds this support to external dns. The implementation is similar to the other records. Besides the unit tests this PR was also tested by creating a DNSEndpoint with the following spec: ``` endpoints: - dnsName: cloud.k8gb.io recordTTL: 5 recordType: NS targets: - gslb-ns-eu-cloud.k8gb.io - gslb-ns-us-cloud.k8gb.io ``` The creation of the NS record in Azure was successful: ``` az network dns record-set ns list --resource-group rg-k8gb --zone-name "$EDGE_DNS_ZONE" --output json [ {...}, { "NSRecords": [ { "nsdname": "gslb-ns-eu-cloud.k8gb.io" }, { "nsdname": "gslb-ns-us-cloud.k8gb.io" } ], "TTL": 5, "etag": "97a7199f-3be9-47bd-ab00-37013b775180", "fqdn": "cloud.k8gb.io.", "id": "/subscriptions/<redacted>/resourceGroups/rg-k8gb/providers/Microsoft.Network/dnszones/k8gb.io/NS/cloud", "name": "cloud", "provisioningState": "Succeeded", "resourceGroup": "rg-k8gb", "targetResource": {}, "trafficManagementProfile": {}, "type": "Microsoft.Network/dnszones/NS" } ] ``` This change was already attempted in kubernetes-sigs#2835, but it was never merged due to inactivity. Signed-off-by: Andre Aguas <andre.aguas@protonmail.com>
Description
This adds support for managing NS records in Azure DNS as well. Not sure if there was a particular reason why this wasn't already there.
Required in k8gb k8gb-io/k8gb#912
Fixes #2826
I did update the unit tests but I do need some help on updating the one for deletion. I am not sure what is still missing but it's still failing:
Checklist