Merge pull request #1100 from SomtochiAma/topology-spread

Update matchLabels for TopologySpreadContstraints in Deployments
This commit is contained in:
Stefan Prodan
2022-02-07 15:13:52 +02:00
committed by GitHub
+8
View File
@@ -529,6 +529,14 @@ func (c *DeploymentController) appendPrimarySuffixToValuesIfNeeded(labelSelector
}
}
}
for key, value := range labelSelector.MatchLabels {
if contains(c.labels, key) {
if value == canaryDep.Name {
labelSelector.MatchLabels[key] = value + "-primary"
}
}
}
}
}