Skip to content

Commit

Permalink
Merge pull request #16787 from dims/enforce-gcp-limit-of-64-chars-for…
Browse files Browse the repository at this point in the history
…-cluster-name-in-kubetest2-deployer

Enforce GCP limit of 64 chars for cluster name in kubetest2 deployer
  • Loading branch information
k8s-ci-robot authored Aug 29, 2024
2 parents 2deb457 + 5f4c46e commit b98eed0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/e2e/kubetest2-kops/deployer/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,14 @@ func defaultClusterName(cloudProvider string) (string, error) {
jobName = jobName[:79]
}
if jobType == "presubmit" {
return fmt.Sprintf("e2e-pr%s.%s.%s", pullNumber, jobName, suffix), nil
jobName = fmt.Sprintf("e2e-pr%s.%s.%s", pullNumber, jobName, suffix)
} else {
jobName = fmt.Sprintf("e2e-%s.%s", jobName, suffix)
}
return fmt.Sprintf("e2e-%s.%s", jobName, suffix), nil
if len(jobName) > 63 && cloudProvider == "gce" { // GCP has char limit of 64
jobName = jobName[:63]
}
return jobName, nil
}

// stateStore returns the kops state store to use
Expand Down

0 comments on commit b98eed0

Please sign in to comment.