Skip to content

Sanitize K8s node names to meet load balancer target displayname requirements#1180

Merged
ske-prow[bot] merged 2 commits into
mainfrom
safeNodeNameInTargets
Jun 5, 2026
Merged

Sanitize K8s node names to meet load balancer target displayname requirements#1180
ske-prow[bot] merged 2 commits into
mainfrom
safeNodeNameInTargets

Conversation

@dergeberl
Copy link
Copy Markdown
Member

How to categorize this PR?

/kind bug
/cc @stackitcloud/ske-infrastructure

What this PR does / why we need it:

The kubernetes node name can contain . and can be longer than 63 characters which is not allowed as DisplayName in the load balancer targets (^[0-9a-zA-Z](?:(?:[0-9a-zA-Z]|-){0,61}[0-9a-zA-Z])?$). This PR makes sure that the name is still as readable as possible but replaces invalid characters and shorten the name if needed.

Which issue(s) this PR fixes:
Fixes #994

@ske-prow ske-prow Bot requested a review from a team June 5, 2026 07:37
@ske-prow ske-prow Bot added the kind/bug Bug label Jun 5, 2026
@dergeberl
Copy link
Copy Markdown
Member Author

/cherry-pick release-v1.33
/cherry-pick release-v1.34
/cherry-pick release-v1.35
/cherry-pick release-v1.36

@stackit-ske
Copy link
Copy Markdown

@dergeberl: once the present PR merges, I will cherry-pick it on top of release-v1.33, release-v1.34, release-v1.35, release-v1.36 in new PRs and assign them to you.

Details

In response to this:

/cherry-pick release-v1.33
/cherry-pick release-v1.34
/cherry-pick release-v1.35
/cherry-pick release-v1.36

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-sigs/prow repository.

@ske-prow ske-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 5, 2026
Copy link
Copy Markdown
Contributor

@nschad nschad left a comment

Choose a reason for hiding this comment

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

small nits

I would shorten the name of the function a bit and call a few things differently.

Comment thread pkg/ccm/loadbalancer_spec_test.go Outdated
Comment thread pkg/ccm/loadbalancer_spec.go Outdated
Comment thread pkg/ccm/loadbalancer_spec.go Outdated
@ske-prow ske-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 5, 2026
@ske-prow
Copy link
Copy Markdown

ske-prow Bot commented Jun 5, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nschad

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

@ske-prow ske-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 5, 2026
@ske-prow
Copy link
Copy Markdown

ske-prow Bot commented Jun 5, 2026

LGTM label has been added.

DetailsGit tree hash: 153eec06191e411c40cc9e53985d9cc9e8c3c06d

@ske-prow ske-prow Bot merged commit 4cbb13d into main Jun 5, 2026
3 checks passed
@ske-prow ske-prow Bot deleted the safeNodeNameInTargets branch June 5, 2026 13:11
@stackit-ske
Copy link
Copy Markdown

@dergeberl: new pull request created: #1181

Details

In response to this:

/cherry-pick release-v1.33
/cherry-pick release-v1.34
/cherry-pick release-v1.35
/cherry-pick release-v1.36

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-sigs/prow repository.

@stackit-ske
Copy link
Copy Markdown

@dergeberl: new pull request created: #1182

Details

In response to this:

/cherry-pick release-v1.33
/cherry-pick release-v1.34
/cherry-pick release-v1.35
/cherry-pick release-v1.36

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-sigs/prow repository.

@stackit-ske
Copy link
Copy Markdown

@dergeberl: new pull request created: #1183

Details

In response to this:

/cherry-pick release-v1.33
/cherry-pick release-v1.34
/cherry-pick release-v1.35
/cherry-pick release-v1.36

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-sigs/prow repository.

@stackit-ske
Copy link
Copy Markdown

@dergeberl: new pull request created: #1184

Details

In response to this:

/cherry-pick release-v1.33
/cherry-pick release-v1.34
/cherry-pick release-v1.35
/cherry-pick release-v1.36

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-sigs/prow repository.

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. kind/bug Bug lgtm Indicates that a PR is ready to be merged. 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.

LoadBalancer Service creation fails with 400 Bad Request when Kubernetes node names contain dots (FQDN-style)

3 participants