Skip to content

Commit

Permalink
Merge pull request kubernetes#123652 from dims/ensure-gcp-instance-na…
Browse files Browse the repository at this point in the history
…mes-are-a-max-of-63-characters

Ensure GCP instance names are a max of 63 characters
  • Loading branch information
k8s-ci-robot committed Mar 3, 2024
2 parents e798fa6 + 968aefd commit ccb5dd3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/e2e_node/remote/gce/gce_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,9 @@ func (g *GCERunner) imageToInstanceName(imageConfig *internalGCEImage) string {
}
// For benchmark test, node name has the format 'machine-image-uuid' to run
// different machine types with the same image in parallel
return imageConfig.machine + "-" + imageConfig.image + "-" + uuid.New().String()[:8]
name := imageConfig.machine + "-" + imageConfig.image + "-" + uuid.New().String()[:8]
// Sometimes the image is too long, we need instance names to have a max length of 63
return name[:63]
}

func (g *GCERunner) registerGceHostIP(host string) error {
Expand Down

0 comments on commit ccb5dd3

Please sign in to comment.