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

Kops compatibility mode #2041

Merged
merged 4 commits into from
Jun 24, 2021
Merged

Kops compatibility mode #2041

merged 4 commits into from
Jun 24, 2021

Conversation

olemarkus
Copy link
Contributor

Description

This PR introduces a dns-controller compatibility mode. When set, external-dns will respect the dns-controller annotations and mimic the dns-controller logic.

The dns-controller logic is sometimes not that intuitive, but I have tried to cover/illustrate the behaviour with unit tests.

With this PR, I managed to use external-dns as drop-in for dns-controller, with some small modifications on kops side, such as setting the compat flag.

Refs #221 #1997

Checklist

  • Unit tests updated
  • End user documentation updated

Once the necessary changes have been done on the kOps side, I can add a tutorial here on how to replace dns-controller.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 7, 2021
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Apr 7, 2021
@seanmalloy
Copy link
Member

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 9, 2021
@olemarkus
Copy link
Contributor Author

/assign @Raffo
/cc @njuettner

@olemarkus
Copy link
Contributor Author

Hey. Would be nice if someone could take a look at this sometime in the not too distant future.

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.

Nice! Some nits but in general looks good to me. One thing we definitely need is documentation. Please create a file in /docs so that we have it and can reference this implementation.

pkg/apis/externaldns/types.go Outdated Show resolved Hide resolved

"sigs.k8s.io/external-dns/endpoint"
)

const (
mateAnnotationKey = "zalando.org/dnsname"
moleculeAnnotationKey = "domainName"
// dnsControllerHostnameAnnotationKey is the annotation used for defining the desired hostname when DNS controller compatibility mode
Copy link
Member

Choose a reason for hiding this comment

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

We should also be a bit more explicit here to mention it's kops.

Copy link
Member

Choose a reason for hiding this comment

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

In general everywhere we mentioning dns controller also mention kops please.

@olemarkus
Copy link
Contributor Author

The implementation is largely documented in https://github.com/kubernetes-sigs/external-dns/blob/master/docs/legacy/kops-dns-controller.md

How about moving that page to tutorials and then change the flags and such to reflect the new ones introduced in this PR?
And also a section on how to configure kOps to use external-dns as drop-in.

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

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 24, 2021
@k8s-ci-robot k8s-ci-robot merged commit 0148bca into kubernetes-sigs:master Jun 24, 2021
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants