Skip to content

Commit

Permalink
BC-5423 - Adjusted weighting for pod Inter-pod affinity and anti-affi…
Browse files Browse the repository at this point in the history
…nity
  • Loading branch information
mamutmk5 authored Nov 30, 2023
1 parent fd1984f commit 8b27d63
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 15 deletions.
4 changes: 2 additions & 2 deletions ansible/roles/clamav/templates/deployment.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
- weight: 9
podAffinityTerm:
labelSelector:
matchExpressions:
Expand All @@ -70,7 +70,7 @@ spec:
values:
- clamav
topologyKey: "cloud.ionos.com/nodepool-name"
- weight: 10
- weight: 20
podAffinityTerm:
labelSelector:
matchExpressions:
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/dof_etherpad/templates/deployment.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ spec:
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
- weight: 9
podAffinityTerm:
labelSelector:
matchExpressions:
Expand All @@ -98,7 +98,7 @@ spec:
values:
- etherpad
topologyKey: "cloud.ionos.com/nodepool-name"
- weight: 10
- weight: 20
podAffinityTerm:
labelSelector:
matchExpressions:
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/dof_etherpad_nginx/templates/deployment.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ spec:
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
- weight: 9
podAffinityTerm:
labelSelector:
matchExpressions:
Expand All @@ -101,7 +101,7 @@ spec:
values:
- etherpad-nginx
topologyKey: "cloud.ionos.com/nodepool-name"
- weight: 10
- weight: 20
podAffinityTerm:
labelSelector:
matchExpressions:
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/dof_redis/templates/deployment.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ spec:
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
- weight: 9
podAffinityTerm:
labelSelector:
matchExpressions:
Expand All @@ -82,7 +82,7 @@ spec:
values:
- redis
topologyKey: "cloud.ionos.com/nodepool-name"
- weight: 10
- weight: 20
podAffinityTerm:
labelSelector:
matchExpressions:
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/erwin-idm/templates/deployment.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ spec:
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
- weight: 9
podAffinityTerm:
labelSelector:
matchExpressions:
Expand All @@ -109,7 +109,7 @@ spec:
values:
- erwinidm
topologyKey: "cloud.ionos.com/nodepool-name"
- weight: 10
- weight: 20
podAffinityTerm:
labelSelector:
matchExpressions:
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/hydra/templates/deployment.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ spec:
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
- weight: 9
podAffinityTerm:
labelSelector:
matchExpressions:
Expand All @@ -92,7 +92,7 @@ spec:
values:
- hydra
topologyKey: "cloud.ionos.com/nodepool-name"
- weight: 10
- weight: 20
podAffinityTerm:
labelSelector:
matchExpressions:
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/rocketchat/templates/deployment.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ spec:
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
- weight: 9
podAffinityTerm:
labelSelector:
matchExpressions:
Expand All @@ -103,7 +103,7 @@ spec:
values:
- rocketchat
topologyKey: "cloud.ionos.com/nodepool-name"
- weight: 10
- weight: 20
podAffinityTerm:
labelSelector:
matchExpressions:
Expand Down
22 changes: 21 additions & 1 deletion ansible/roles/storage/templates/deployment.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ spec:
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
- weight: 9
podAffinityTerm:
labelSelector:
matchExpressions:
Expand All @@ -79,3 +79,23 @@ spec:
- schulcloud-verbund
topologyKey: "kubernetes.io/hostname"
namespaceSelector: {}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 10
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- minio
topologyKey: "cloud.ionos.com/nodepool-name"
- weight: 20
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- minio
topologyKey: "topology.kubernetes.io/zone"

0 comments on commit 8b27d63

Please sign in to comment.