Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
cli/cmd/cluster: verify cluster nodes after upgrading controlplane
Browse files Browse the repository at this point in the history
So worker pools can be added with TLS bootstrap enabled, as new worker
pool requires new bootstrap token to be configured on the cluster.

Closes #916

Signed-off-by: Mateusz Gozdek <[email protected]>
  • Loading branch information
invidian committed Dec 1, 2020
1 parent acd1e9f commit f1b5caf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli/cmd/cluster/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ func Apply(contextLogger *log.Entry, options ApplyOptions) error {
return fmt.Errorf("getting kubeconfig: %v", err)
}

if err := verifyCluster(kubeconfig, c.platform.Meta().ExpectedNodes); err != nil {
return fmt.Errorf("verifying cluster: %v", err)
}

// Update all the pre installed namespaces with lokomotive specific label.
// `lokomotive.kinvolk.io/name: <namespace_name>`.
if err := updateInstalledNamespaces(kubeconfig); err != nil {
Expand Down Expand Up @@ -156,6 +152,10 @@ func Apply(contextLogger *log.Entry, options ApplyOptions) error {
}
}

if err := verifyCluster(kubeconfig, c.platform.Meta().ExpectedNodes); err != nil {
return fmt.Errorf("verifying cluster: %v", err)
}

if options.SkipComponents {
return nil
}
Expand Down

0 comments on commit f1b5caf

Please sign in to comment.