1
0
mirror of https://github.com/rancher/rke.git synced 2025-07-13 07:04:52 +00:00

Merge pull request #3087 from vardhaman22/vardhaman/fix-dns-default-update-strategy

This commit is contained in:
Kinara Shah 2022-11-17 16:40:18 -08:00 committed by GitHub
commit 902491d20d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {