Skip to content

✨ Add server name for the Machine InternalDNS#1715

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
shiftstack:add-internal-dns
Oct 9, 2023
Merged

✨ Add server name for the Machine InternalDNS#1715
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
shiftstack:add-internal-dns

Conversation

@MaysaMacedo
Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
For a node to join the cluster, a CSR generated by kubelet with the node name must be approved. The approval happens if the value of the NodeInternalDNS entry on the Machine matches the node name. When using legacy cloud provider the value of that node name is the Server name. This commit ensures the nodes handled with legacy cloud provides get approved by adding the server name to the list of Machine addresses.

Fixes #1689

/hold

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Oct 6, 2023
@netlify
Copy link
Copy Markdown

netlify Bot commented Oct 6, 2023

Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!

Name Link
🔨 Latest commit de8aaa4
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/6523f9c5d10fe70008e73d71
😎 Deploy Preview https://deploy-preview-1715--kubernetes-sigs-cluster-api-openstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@k8s-ci-robot k8s-ci-robot added 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 Oct 6, 2023
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @MaysaMacedo. 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.

Details

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 requested review from dulek and jichenjc October 6, 2023 16:17
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 6, 2023
Comment thread controllers/openstackmachine_controller.go Outdated
@mdbooth
Copy link
Copy Markdown
Contributor

mdbooth commented Oct 6, 2023

/ok-to-test
/test all

@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 Oct 6, 2023
@MaysaMacedo MaysaMacedo force-pushed the add-internal-dns branch 2 times, most recently from 7193b9b to 344ab51 Compare October 6, 2023 18:58
@MaysaMacedo MaysaMacedo changed the title ✨ Add servers' name as InternalDNS ✨ Add server name for the Machine InternalDNS Oct 6, 2023
@jichenjc
Copy link
Copy Markdown
Contributor

jichenjc commented Oct 9, 2023

/retest

Copy link
Copy Markdown
Contributor

@mdbooth mdbooth left a comment

Choose a reason for hiding this comment

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

@MaysaMacedo Expanded comment looks good, thanks! Can I ask you to just clarify that the specific behaviour described is OpenShift's?

@lentzi90 I've worked on this with @MaysaMacedo so I'd appreciate an independent look if you get a moment.

/approve

Comment thread controllers/openstackmachine_controller.go Outdated
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MaysaMacedo, mdbooth

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 Oct 9, 2023
Copy link
Copy Markdown
Contributor

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

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

Do I understand correctly that the idea is that the server name will in most cases be the same as the node name, especially if migrating from the in-tree provider?
Any plans to support other cases, or is this enough?

@mdbooth
Copy link
Copy Markdown
Contributor

mdbooth commented Oct 9, 2023

Do I understand correctly that the idea is that the server name will in most cases be the same as the node name, especially if migrating from the in-tree provider? Any plans to support other cases, or is this enough?

I'd expect node name to be the same as server name only in cases where it's been overridden in order to be compatible with the in-tree provider. Honestly, outside of OpenShift I'd expect this to be an unusual configuration now that the in-tree provider has been removed.

I expect the normal case to be where nodename is the same as hostname, which this doesn't support. The plan is to add a second InternalDNS entry containing hostname, but only when the server supports microversion 2.90. This may end up being one of the first consumers of your microversion patch.

So:

  • Everybody gets an InternalDNS entry containing server name. This is a niche case, but it's also the easiest to implement. It's important to Red Hat because it's currently all OpenShift nodes.
  • If you have microversion >= 2.90 you also get an InternalDNS entry containing hostname (tbd). This is the usual case, but it requires variable microversion support. We'd also like to implement this asap.

Copy link
Copy Markdown
Contributor

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

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

Got it!
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 9, 2023
For a node to join the cluster, a CSR generated by kubelet with
the node name must be approved. The approval happens if the value
of the NodeInternalDNS entry on the Machine matches the node name.
When using legacy cloud provider the value of that node name is the
Server name. This commit ensures the nodes handled with legacy cloud
provides get approved by adding the server name to the list of Machine
addresses.
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 9, 2023
Copy link
Copy Markdown
Contributor

@mdbooth mdbooth left a comment

Choose a reason for hiding this comment

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

Thanks. As this just updates the comment I'm going to add back @lentzi90 's lgtm

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 9, 2023
@mdbooth
Copy link
Copy Markdown
Contributor

mdbooth commented Oct 9, 2023

/test all

@MaysaMacedo MaysaMacedo marked this pull request as ready for review October 9, 2023 16:21
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 9, 2023
@k8s-ci-robot k8s-ci-robot requested a review from lentzi90 October 9, 2023 16:21
@MaysaMacedo
Copy link
Copy Markdown
Contributor Author

/hold cancel

We tested it and it worked.
@mdbooth Thank you!

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 9, 2023
@k8s-ci-robot k8s-ci-robot merged commit 6ca0be6 into kubernetes-sigs:main Oct 9, 2023
@MaysaMacedo MaysaMacedo deleted the add-internal-dns branch October 9, 2023 18:00
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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CAPO should set InternalDNS in status.Addresses

5 participants