cli/cmd/cluster: verify cluster nodes after upgrading controlplane
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
@@ -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 {
@@ -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
}
