File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 428
428
]).spec,
429
429
},
430
430
431
+ antiAffinityStatefulSet:
432
+ {
433
+ local statefulSet = $.apps.v1.statefulSet,
434
+ local podAntiAffinity = statefulSet.mixin.spec.template.spec.affinity.podAntiAffinity,
435
+ local name = super .spec.template.metadata.labels.name,
436
+
437
+ spec+: podAntiAffinity.withRequiredDuringSchedulingIgnoredDuringExecution([
438
+ podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecutionType.new() +
439
+ podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecutionType.mixin.labelSelector.withMatchLabels({ name: name }) +
440
+ podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecutionType.withTopologyKey('kubernetes.io/hostname' ),
441
+ ]).spec,
442
+ },
443
+
431
444
// Add a priority to the pods in a deployment (or deployment-like objects
432
445
// such as a statefulset) iff _config.enable_pod_priorities is set to true.
433
446
podPriority(p):
You can’t perform that action at this time.
0 commit comments