Remove unnecessary len check.

This commit is contained in:
Trung Minh Lai 2025-10-18 22:36:36 +07:00
parent 5d9867292a
commit b36e3e665b
1 changed files with 1 additions and 3 deletions

View File

@ -894,9 +894,7 @@ func (c *Cluster) generatePodTemplate(
podSpec.PriorityClassName = priorityClassName
}
if len(topologySpreadConstraintsSpec) > 0 {
podSpec.TopologySpreadConstraints = generateTopologySpreadConstraints(labels, topologySpreadConstraintsSpec)
}
podSpec.TopologySpreadConstraints = generateTopologySpreadConstraints(labels, topologySpreadConstraintsSpec)
if sharePgSocketWithSidecars != nil && *sharePgSocketWithSidecars {
addVarRunVolume(&podSpec)