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 preflight check for hostnames #3091

Merged

Conversation

SimonTheLeg
Copy link
Member

@SimonTheLeg SimonTheLeg commented Mar 19, 2024

What this PR does / why we need it:

Since some OS allow hostnames that are not valid kubernetes nodes names, this preflight check signals to the user, if some of their hostnames cannot be used as kubernetes nodes.

Which issue(s) this PR fixes:

Relates to #3071

What type of PR is this?

/kind feature

Special notes for your reviewer:

  • I am not sure if there is a more elegant way in Go to combine all the hostnames into the string slice. Maybe there is a more clever way to do this?
  • I have used allErrs as a string slice instead of using []error, so we don't have to import the stdlib package when then combining the errors. I think this is the more convenient way, because otherwise we would have to rename a bunch of existing imports

Does this PR introduce a user-facing change? Then add your Release Note here:

Hostnames are checked against Kubernetes node name requirements

Documentation:

NONE

@kubermatic-bot kubermatic-bot added docs/none Denotes a PR that doesn't need documentation (changes). kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 19, 2024
@kron4eg
Copy link
Member

kron4eg commented Mar 22, 2024

/approve
/lgtm

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 22, 2024
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 3116909a23f705f703c9156fa683d0cd7e071336

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kron4eg

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

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 22, 2024
@kubermatic-bot kubermatic-bot merged commit e749ac7 into kubermatic:main Mar 22, 2024
13 checks passed
@kubermatic-bot kubermatic-bot added this to the KubeOne 1.8 milestone Mar 22, 2024
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. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants