-
Notifications
You must be signed in to change notification settings - Fork 222
pkg/dns/azure: implement support for azure #231
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
pkg/dns/azure: implement support for azure #231
Conversation
|
/hold Thanks for taking a stab at this! Before you invest much more time in the patch, you should know we're actively working to replace the internal DNS manager with an external-dns controller implementation. Do you have any reason to suspect we'll encounter problems with the external-dns Azure provider? |
|
I've been reviewing this PR, and it's looking really good. Thank you! In the background I'm working on figuring out how we can validate this outside of CI. Right now it's looking like we'd want to try and accept this when master re-opens for the 4.2 release, even in advance of our external-dns plans. |
|
Thanks for the quick feedback! Q: Why is there a cache for AWS? is that something we'd need to do as well? I think it makes sense to contribute to From browsing their code, it finds the Azure DNSZone by resource group. Meanwhile, this PR, once completed, should be enough to move forward until you make the switch. |
It's a cheap/quick local optimization to drastically reduce chattiness with the Route53 API. I won't be surprised if something similar is needed for Azure in practice — will think on it more.
Thanks for the feedback. I'm encouraged to hear that!
Not entirely sure I understand. Are proposing some change to the public zone type in the OpenShift cluster config API? (That's currently the only DNS configuration recognized by the ingress operator.) |
There is 2 dns zones. private, and public. That is not supported by |
The ExternalDNS faq covers this limitation in more detail. |
a6f222b to
9020881
Compare
|
logs after applying the azure credentialrequest, with the updated azure credential operator : |
vendoring azure-sdk-for-go the azure sdk requires fsnotify to be overriden ref: golang/dep#1799
The azure dns zones do not support ALIAS records. We use A record instead.
|
rebased on master |
| ingress := service.Status.LoadBalancer.Ingress | ||
| if len(ingress) > 0 && len(ingress[0].Hostname) > 0 { | ||
| records, err := desiredDNSRecords(ci, ingress[0].Hostname, dnsConfig) | ||
| records, err := desiredDNSAliasRecords(ci, ingress[0].Hostname, dnsConfig) |
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.
Looks like this needs a similar treatment for .IP handling to avoid leaking A records
|
I have some additional necessary changes in serbrech#1 which will need incorporated here. |
|
/approve Will lift the hold once serbrech#1 merges. |
* Refactor desired DNS functions Refactor DNS handling to consolidate how the desired set of DNS records is computed. This ensures that the same function can be used for both setting up and tearing down DNS. Add some unit testing around the desired DNS function. * Add DNS unit tests * dns/azure: fix delete handling
|
@serbrech many, many thanks for this one. I'm going to get it merged so we can iterate more quickly going forward. /lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ironcladlou, serbrech The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold cancel |
The azure dns zones do not support ALIAS records.
We use A records instead.