Skip to content

Commit

Permalink
BC-5423 - add pod affinity ruls to deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
mamutmk5 authored Nov 30, 2023
1 parent 97d764f commit 038317b
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions ansible/roles/version-aggregator/templates/deployment.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,36 @@ spec:
requests:
cpu: {{ VERSION_AGGREGATOR__CPU_REQUESTS|default("100m", true) }}
memory: {{ VERSION_AGGREGATOR__MEMORY_REQUESTS|default("32Mi", true) }}
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/part-of
operator: In
values:
- schulcloud-verbund
topologyKey: "kubernetes.io/hostname"
namespaceSelector: {}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 10
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- version-aggregator
topologyKey: "cloud.ionos.com/nodepool-name"
- weight: 10
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- version-aggregator
topologyKey: "topology.kubernetes.io/zone"

0 comments on commit 038317b

Please sign in to comment.