Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions tests/e2e/kubetest2-kops/deployer/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,19 @@ func (d *deployer) defaultClusterName() (string, error) {
jobName = jobName[:gcpLimit]
}

// AWS launch template names have a 128-char limit. The longest
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think it's the right way to do it, ideally we would have added something to trim those names.
It is not a good approach for GCP either...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

are you thinking this should happen in build_jobs.py instead?

// resource name prefix is "{ig}.apiservers." (~37 chars), so
// the cluster name must be at most 91 chars.
if d.CloudProvider == "aws" {
awsLimit := 91
if suffix != "" {
awsLimit -= len(suffix) + 1
}
if len(jobName) > awsLimit {
jobName = jobName[:awsLimit]
}
}

if suffix != "" {
jobName = jobName + "." + suffix
}
Expand Down
Loading