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 a703cf1 commit e84a1a5
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions ansible/roles/schulcloud-client-core/templates/deployment.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,39 @@ spec:
requests:
cpu: {{ CLIENT_CPU_REQUESTS|default("100m", true) }}
memory: {{ CLIENT_MEMORY_REQUESTS|default("128Mi", 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:
- client
topologyKey: "cloud.ionos.com/nodepool-name"
- weight: 10
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- client
topologyKey: "topology.kubernetes.io/zone"
volumes:
- name: http-headers
configMap:
Expand Down

0 comments on commit e84a1a5

Please sign in to comment.