Merge pull request #14920 from dimamo5/replace-using-defaults

Populate cluster with default values in `kops replace`
This commit is contained in:
Kubernetes Prow Robot 2023-01-12 03:08:54 -08:00 committed by GitHub
commit a7a77026e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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: %w", err)
}
_, err = clientset.CreateCluster(ctx, v)
if err != nil {
return fmt.Errorf("error creating cluster: %v", err)