Skip to content

Commit

Permalink
Added affinity to ensure pods are spread across all worker nodes.
Browse files Browse the repository at this point in the history
  • Loading branch information
henrietteharmse committed Jul 20, 2023
1 parent 33c6fc2 commit 05a5819
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions k8chart/dataserver/templates/ols4-dataserver-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ spec:
labels:
app: {{ .Release.Name }}
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- hh-rke-wp-webadmin-47-worker-4.caas.ebi.ac.uk
- hx-rke-wp-webadmin-40-worker-4.caas.ebi.ac.uk
containers:
- name: dataserver
image: nginx:1.23.3
Expand Down
10 changes: 10 additions & 0 deletions k8chart/ols4/templates/ols4-frontend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ spec:
labels:
app: {{ .Release.Name }}-frontend
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- hh-rke-wp-webadmin-47-worker-4.caas.ebi.ac.uk
- hx-rke-wp-webadmin-40-worker-4.caas.ebi.ac.uk
containers:
- name: web
image: ghcr.io/ebispot/ols4-frontend:{{.Values.imageTag}}
Expand Down

0 comments on commit 05a5819

Please sign in to comment.