Change a case layout for the better readability
@@ -164,12 +164,12 @@ func (p *PodSpec) reconcileAffinity() {
TopologyKey: &defaultAffinityTopologyKey,
}
- case p.Affinity.Advanced != nil:
- p.Affinity.TopologyKey = nil
-
case p.Affinity.TopologyKey == nil:
p.Affinity.TopologyKey = &defaultAffinityTopologyKey
+ case p.Affinity.Advanced != nil:
+ p.Affinity.TopologyKey = nil
+
case strings.ToLower(*p.Affinity.TopologyKey) == affinityOff:
p.Affinity = nil
