Skip to content
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

Azure Private DNS Provider #1269

Merged
merged 5 commits into from
Nov 19, 2019

Conversation

saidst
Copy link
Contributor

@saidst saidst commented Nov 12, 2019

This PR includes support for Azure Private DNS.

Azure Private DNS is the successor of the previous "private-mode" of zones hosted via Azure DNS.

See: https://azure.microsoft.com/en-gb/updates/announcing-preview-refresh-for-azure-dns-private-zones-2/

The provider has been created by cloning the existing Azure Provider.

Both Azure DNS & Azure Private DNS are separate Azure APIs with totally independent type systems. Attempts to keep things DRY and implement business logic (e.g. creating an A Record) only once "failed". An approach in this regard was to come up with a "neutral" interlayer and decouple business logic in the provider from the type system of a particular API.

However, the increased complexity (additional types, converter methods) was assessed to be less favorable than simpler but redundant code.

Differences compared with Azure provider

Related issues:

ToDo:

  • Tests

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 12, 2019
@k8s-ci-robot
Copy link
Contributor

Welcome @saidst!

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. 😃

@saidst saidst changed the title Azure Private DNS Provider by forking Azure Provider. Azure Private DNS Provider Nov 12, 2019
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 12, 2019
@saidst
Copy link
Contributor Author

saidst commented Nov 12, 2019

FYI @timja

Copy link
Contributor

@timja timja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey 👋
I've taken a look through the code, some minor nit's for wording and logs statements, I'll try test this out ~tomorrow

docs/tutorials/azure-private-dns.md Outdated Show resolved Hide resolved
3) Deploy ExternalDNS

## Prerequisites
- Azure Kubernetes Service available
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this actually needed? I did all my azure-dns testing on kind locally

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean AKS in particular?

What do you mean with kind?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant that this works perfectly fine on minikube or kind
You only need to be running on azure if you're using the system assigned identity for authentication.

@@ -0,0 +1,419 @@
/*
Copyright 2017 The Kubernetes Authors.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the right copyright?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@njuettner, people used that also in other PR's, which have recently been merged.
Can you answer?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, please don't drop it we need it.

provider/azure_private_dns.go Outdated Show resolved Hide resolved
provider/azure_private_dns.go Outdated Show resolved Hide resolved
provider/azure_private_dns.go Outdated Show resolved Hide resolved
provider/azure_private_dns.go Outdated Show resolved Hide resolved
provider/azure_private_dns.go Outdated Show resolved Hide resolved
provider/azure_private_dns.go Outdated Show resolved Hide resolved
go.sum Show resolved Hide resolved
@saidst
Copy link
Contributor Author

saidst commented Nov 12, 2019

Thanks for your review.

I am just about to add some unit-tests.

After that, I will care for your remarks.

@saidst saidst force-pushed the azure-privatedns-provider branch 2 times, most recently from 7817658 to b0bbe1e Compare November 12, 2019 19:07
@saidst
Copy link
Contributor Author

saidst commented Nov 17, 2019

@timja: have you had the chance to give it a try?

@timja
Copy link
Contributor

timja commented Nov 17, 2019

Not yet will try tomorrow

@timja
Copy link
Contributor

timja commented Nov 18, 2019

@timja: have you had the chance to give it a try?

@saidst
I've tested this locally on minikube,
I followed the tutorial in this PR,

I've made a PR to fix a couple of docs issues (saidst#1), with those fixes I was successful in creating an A record and deleting it with the nginx ingress record in the tutorial.

@timja
Copy link
Contributor

timja commented Nov 18, 2019

/assign @hjacobs

README.md Show resolved Hide resolved
Copy link
Member

@njuettner njuettner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing @saidst 👍 🎉.
One comment, PTAL.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 19, 2019
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 19, 2019
@saidst
Copy link
Contributor Author

saidst commented Nov 19, 2019

@njuettner: I've rebased on master.
Any open items from your end or fine for the time-beeing and ready to be merged?

Copy link
Member

@njuettner njuettner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 19, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: njuettner, saidst

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 19, 2019
@k8s-ci-robot k8s-ci-robot merged commit 92e3263 into kubernetes-sigs:master Nov 19, 2019
@saidst saidst deleted the azure-privatedns-provider branch November 20, 2019 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants