Prevent apps from being scheduled on the same node

This commit is contained in:
Dreaded_X 2024-11-24 01:58:20 +01:00
parent be37025f2a
commit 866c54f623
Signed by: Dreaded_X
GPG Key ID: FA5F485356B0D2D4
2 changed files with 14 additions and 0 deletions

View File

@ -9,6 +9,13 @@ metadata:
name: lldap
spec:
replicas: 2
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
type: dummy
selector:
matchLabels:
app: lldap

View File

@ -8,6 +8,13 @@ metadata:
spec:
replicas: 2
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
type: dummy
selector:
matchLabels:
app: whoami