Populate cluster with default values in `kops replace`

This commit is contained in:
Diogo Moura 2022-12-31 00:31:12 +00:00
parent fc527b6e9f
commit 4ead1abd87
No known key found for this signature in database
GPG Key ID: A1437122F38597B6
1 changed files with 6 additions and 0 deletions

View File

@ -138,6 +138,12 @@ func RunReplace(ctx context.Context, f *util.Factory, out io.Writer, c *ReplaceO
if !c.Force {
return fmt.Errorf("cluster %v does not exist (try adding --force flag)", clusterName)
}
err = cloudup.PerformAssignments(v, cloud)
if err != nil {
return fmt.Errorf("error populating configuration: %v", err)
}
_, err = clientset.CreateCluster(ctx, v)
if err != nil {
return fmt.Errorf("error creating cluster: %v", err)