Merge pull request #7641 from zetaab/instancename

fix instance name
This commit is contained in:
Kubernetes Prow Robot 2019-09-21 03:49:24 -07:00 committed by GitHub
commit 5b891e73fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -92,8 +92,8 @@ func (b *ServerGroupModelBuilder) buildInstances(c *fi.ModelBuilderContext, sg *
return fmt.Errorf("Failed to create UUID for instance: %v", err)
}
// FIXME: Must ensure 63 or less characters
// replace all dots with -, this is needed to get external cloudprovider working
iName := strings.ToLower(fmt.Sprintf("%s-%d.%s", ig.Name, i+1, b.ClusterName()))
// replace all dots and _ with -, this is needed to get external cloudprovider working
iName := strings.Replace(strings.ToLower(fmt.Sprintf("%s-%d.%s", ig.Name, i+1, b.ClusterName())), "_", "-", -1)
instanceName := fi.String(strings.Replace(iName, ".", "-", -1))
var az *string