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

Add managed DNS record support for API endpoint #232

Merged

Conversation

gottwald
Copy link
Contributor

@gottwald gottwald commented Jan 29, 2021

What this PR does / why we need it:
This adds an optional feature to include a managed DNS record that points to the KAS LB and is used as control plane API endpoint in all configs and certs. This makes the IP of the load-balancer interchangeable and makes losing the (ephemeral) LB IP much less fatal to the cluster setup.
It is backwards compatible: meaning if the record is not set, the LB IP is used as it was before.
A transition from IP-based to DNS-based endpoint is not supported in this iteration. A feature like this would also likely need changes in cluster-api itself.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #231

Special notes for your reviewer:
This probably deserves an extension of the e2e test and should be fairly easy to do so, but the e2e environment would need a set up test domain in the e2e DO account to do so. I have no access to that.

Documentation:

Release note:

Add ControlPlaneDNS field in DOClusterSpec which is a managed DNS record that always points to the KAS load-balancer IP and is used as ControlPlaneEndpoint.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 29, 2021
@k8s-ci-robot
Copy link

Hi @gottwald. 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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 29, 2021
@timoreimann
Copy link
Contributor

/ok-to-test
/assign @prksu

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 10, 2021
Copy link
Contributor

@prksu prksu left a comment

Choose a reason for hiding this comment

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

Just did some testing with this feature and the functionality is work as expected.
I left some comment.

api/v1alpha3/docluster_types.go Outdated Show resolved Hide resolved
api/v1alpha3/docluster_types.go Outdated Show resolved Hide resolved
api/v1alpha3/docluster_types.go Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 15, 2021
@gottwald
Copy link
Contributor Author

@prksu PTAL again; please also note that I added a DNS verification thingy which covers an edge case when DNS entry is not propagated, yet. I pushed roughly the same time as you reviewed, so you might not have seen this part, yet.

api/v1alpha3/docluster_types.go Show resolved Hide resolved
@@ -0,0 +1,61 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can move this file to another directory like utils in the future. But leave it as is for now

cloud/services/networking/domains.go Outdated Show resolved Hide resolved
Copy link
Contributor

@prksu prksu 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 Feb 17, 2021
@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gottwald, prksu

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 Feb 17, 2021
@k8s-ci-robot k8s-ci-robot merged commit d66583b into kubernetes-sigs:master Feb 17, 2021
@k8s-ci-robot k8s-ci-robot added this to the v0.4 milestone Feb 17, 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. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Deletion and reconciliation of KAS LB breaks cluster
4 participants