-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: align kubernetes cluster name validation with EKS #64
base: develop
Are you sure you want to change the base?
Conversation
7b43ed9
to
2b2ebb5
Compare
Fixed the commitlint check, but the build is failing with a bunch of license errors that don't seem related? https://github.com/bottlerocket-os/bottlerocket-settings-sdk/actions/runs/11803486817/job/32882468268 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I've opened a separate PR to handle the cargo deny
failures over here: #65
Ah, I noticed when testing this commit locally that the tests failed, so I ended up pushing my |
439d0ca
to
df94b48
Compare
@@ -353,14 +358,14 @@ mod test_kubernetes_cluster_name { | |||
|
|||
#[test] | |||
fn good_cluster_names() { | |||
for ok in &["more-chars_here.now", &"a".repeat(63)] { | |||
for ok in &["more-chars_here-123", &"a".repeat(100)] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
no longer being an allowed character is the only notable change in this PR, I think
@@ -353,14 +358,14 @@ mod test_kubernetes_cluster_name { | |||
|
|||
#[test] | |||
fn good_cluster_names() { | |||
for ok in &["more-chars_here.now", &"a".repeat(63)] { | |||
for ok in &["more-chars_here-123", &"a".repeat(100)] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe a couple more test cases since we now allow trailing dashes and underscores:
for ok in &["more-chars_here-123", &"a".repeat(100)] { | |
for ok in &["more-chars_here-123", "trailing-dash-", "under_score_", &"a".repeat(100)] { |
Issue #, if available:
Description of changes:
This updates the
KubernetesClusterName
validation to align with EKS, per theeks:CreateCluster
docs: https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateCluster.html#API_CreateCluster_RequestSyntaxBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.