From 81bc3d38bb4d61089da27aa251240e8976076466 Mon Sep 17 00:00:00 2001 From: chymy Date: Fri, 25 Jun 2021 06:21:30 -0400 Subject: [PATCH] Fix conditional judgment issue in upgradeControlPlane Signed-off-by: chymy --- controlplane/kubeadm/controllers/upgrade.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controlplane/kubeadm/controllers/upgrade.go b/controlplane/kubeadm/controllers/upgrade.go index 30cbd251a46b..44f5779e5304 100644 --- a/controlplane/kubeadm/controllers/upgrade.go +++ b/controlplane/kubeadm/controllers/upgrade.go @@ -38,7 +38,7 @@ func (r *KubeadmControlPlaneReconciler) upgradeControlPlane( ) (ctrl.Result, error) { logger := controlPlane.Logger() - if kcp.Spec.RolloutStrategy == nil && kcp.Spec.RolloutStrategy.RollingUpdate == nil { + if kcp.Spec.RolloutStrategy == nil || kcp.Spec.RolloutStrategy.RollingUpdate == nil { return ctrl.Result{}, errors.New("rolloutStrategy is not set") }