From ab5a08c1340ecf056ed34df73f356977b3cc2d74 Mon Sep 17 00:00:00 2001 From: vardhaman Date: Wed, 30 Nov 2022 15:30:02 +0530 Subject: [PATCH] added check for empty updatestrategy while setting dns addon defaults --- cluster/defaults.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cluster/defaults.go b/cluster/defaults.go index 4a087a9c..40561760 100644 --- a/cluster/defaults.go +++ b/cluster/defaults.go @@ -306,7 +306,7 @@ func (c *Cluster) setNodeUpgradeStrategy() { } // setCRIDockerd set enable_cri_dockerd = true when the following two conditions are met: -//the cluster's version is at least 1.24 and the option enable_cri_dockerd is not configured +// the cluster's version is at least 1.24 and the option enable_cri_dockerd is not configured func (c *Cluster) setCRIDockerd() error { parsedVersion, err := getClusterVersion(c.Version) if err != nil { @@ -952,7 +952,8 @@ func setDNSDeploymentAddonDefaults(updateStrategy *v3.DeploymentStrategy, dnsPro coreDNSMaxUnavailable, coreDNSMaxSurge = intstr.FromInt(1), intstr.FromInt(0) kubeDNSMaxSurge, kubeDNSMaxUnavailable = intstr.FromString("10%"), intstr.FromInt(0) ) - if updateStrategy != nil && updateStrategy.Strategy != appsv1.RollingUpdateDeploymentStrategyType { + if updateStrategy != nil && updateStrategy.Strategy != appsv1.RollingUpdateDeploymentStrategyType && + updateStrategy.Strategy != "" { return updateStrategy } switch dnsProvider {