From c733951e1a828b9e185f6e3c1f8b25366830c9cd Mon Sep 17 00:00:00 2001 From: Haider Iqbal Date: Mon, 21 Oct 2024 10:04:50 +0100 Subject: [PATCH] Add node affinity to Neo4J and Solr deployment (#765) * - Add node affinity to Neo4J and Solr deployment * - Correct format of affinity * - Add affinity for Prod Deployment --- k8chart-dev/ols4/templates/ols4-neo4j-deployment.yaml | 9 +++++++++ k8chart-dev/ols4/templates/ols4-solr-deployment.yaml | 9 +++++++++ k8chart/ols4/templates/ols4-neo4j-deployment.yaml | 10 ++++++++++ k8chart/ols4/templates/ols4-solr-deployment.yaml | 10 ++++++++++ 4 files changed, 38 insertions(+) diff --git a/k8chart-dev/ols4/templates/ols4-neo4j-deployment.yaml b/k8chart-dev/ols4/templates/ols4-neo4j-deployment.yaml index 9040bc4ad..0260ce520 100644 --- a/k8chart-dev/ols4/templates/ols4-neo4j-deployment.yaml +++ b/k8chart-dev/ols4/templates/ols4-neo4j-deployment.yaml @@ -14,6 +14,15 @@ spec: labels: app: {{ .Release.Name }}-neo4j spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - hh-rke-wp-webadmin-56-worker-2.caas.ebi.ac.uk volumes: - name: {{ .Release.Name }}-neo4j-storage persistentVolumeClaim: diff --git a/k8chart-dev/ols4/templates/ols4-solr-deployment.yaml b/k8chart-dev/ols4/templates/ols4-solr-deployment.yaml index 3cc4ced22..f23546cf4 100644 --- a/k8chart-dev/ols4/templates/ols4-solr-deployment.yaml +++ b/k8chart-dev/ols4/templates/ols4-solr-deployment.yaml @@ -14,6 +14,15 @@ spec: labels: app: {{ .Release.Name }}-solr spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - hh-rke-wp-webadmin-56-worker-1.caas.ebi.ac.uk volumes: - name: {{ .Release.Name }}-solr-storage persistentVolumeClaim: diff --git a/k8chart/ols4/templates/ols4-neo4j-deployment.yaml b/k8chart/ols4/templates/ols4-neo4j-deployment.yaml index 1a380747f..859757d72 100644 --- a/k8chart/ols4/templates/ols4-neo4j-deployment.yaml +++ b/k8chart/ols4/templates/ols4-neo4j-deployment.yaml @@ -14,6 +14,16 @@ spec: labels: app: {{ .Release.Name }}-neo4j spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - hh-rke-wp-webadmin-47-worker-2.caas.ebi.ac.uk + - hx-rke-wp-webadmin-40-worker-2.caas.ebi.ac.uk volumes: - name: {{ .Release.Name }}-neo4j-storage persistentVolumeClaim: diff --git a/k8chart/ols4/templates/ols4-solr-deployment.yaml b/k8chart/ols4/templates/ols4-solr-deployment.yaml index e89a0fa10..abf90da64 100644 --- a/k8chart/ols4/templates/ols4-solr-deployment.yaml +++ b/k8chart/ols4/templates/ols4-solr-deployment.yaml @@ -14,6 +14,16 @@ spec: labels: app: {{ .Release.Name }}-solr spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - hh-rke-wp-webadmin-47-worker-1.caas.ebi.ac.uk + - hx-rke-wp-webadmin-40-worker-1.caas.ebi.ac.uk volumes: - name: {{ .Release.Name }}-solr-storage persistentVolumeClaim: