From 457fc388f3c3ad5dbf0739d4701cc2871815cb7e Mon Sep 17 00:00:00 2001 From: Bernhard Mallinger Date: Tue, 21 Jan 2025 16:46:17 +0100 Subject: [PATCH 1/8] Add tolerations and affinityy to pods --- helm-chart/eoapi/templates/pgstacboostrap/job.yaml | 8 ++++++++ helm-chart/eoapi/templates/services/deployment.yaml | 8 ++++++++ .../eoapi/templates/services/nginx-doc-server.yaml | 10 +++++++++- helm-chart/eoapi/values.yaml | 11 +++++++++++ 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/helm-chart/eoapi/templates/pgstacboostrap/job.yaml b/helm-chart/eoapi/templates/pgstacboostrap/job.yaml index e2110b75..f70927ce 100644 --- a/helm-chart/eoapi/templates/pgstacboostrap/job.yaml +++ b/helm-chart/eoapi/templates/pgstacboostrap/job.yaml @@ -51,5 +51,13 @@ spec: - name: pgstac-setup-volume-{{ $.Release.Name }} configMap: name: pgstac-setup-config-{{ $.Release.Name }} + {{- with .Values.pgstacBootstrap.settings.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.pgstacBootstrap.settings.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} backoffLimit: 1 {{- end }} diff --git a/helm-chart/eoapi/templates/services/deployment.yaml b/helm-chart/eoapi/templates/services/deployment.yaml index c74e0bb0..bc814097 100644 --- a/helm-chart/eoapi/templates/services/deployment.yaml +++ b/helm-chart/eoapi/templates/services/deployment.yaml @@ -71,6 +71,14 @@ spec: name: {{ $secret }} {{- end }} {{- end }} + {{- with index $v "settings" "affinity" }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with index $v "settings" "tolerations" }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} --- {{/* END: if index $v "enabled" */}} {{- end }} diff --git a/helm-chart/eoapi/templates/services/nginx-doc-server.yaml b/helm-chart/eoapi/templates/services/nginx-doc-server.yaml index ed626d33..ac8d9c99 100644 --- a/helm-chart/eoapi/templates/services/nginx-doc-server.yaml +++ b/helm-chart/eoapi/templates/services/nginx-doc-server.yaml @@ -46,6 +46,14 @@ spec: - name: doc-html-{{ .Release.Name }} configMap: name: nginx-root-html-{{ .Release.Name }} + {{- with .Values.docServer.settings.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.docServer.settings.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} --- apiVersion: v1 kind: Service @@ -59,4 +67,4 @@ spec: port: 80 targetPort: 80 --- -{{- end }} \ No newline at end of file +{{- end }} diff --git a/helm-chart/eoapi/values.yaml b/helm-chart/eoapi/values.yaml index 97537b32..392ba8d8 100644 --- a/helm-chart/eoapi/values.yaml +++ b/helm-chart/eoapi/values.yaml @@ -165,6 +165,8 @@ pgstacBootstrap: LOAD_FIXTURES: "true" # toggle to `true` if you want to keep the job running as db jumpbox KEEP_ALIVE: "false" + affinity: {} + tolerations: [] ###################### @@ -230,6 +232,8 @@ raster: PORT: "8080" # https://www.uvicorn.org/settings/#production WEB_CONCURRENCY: "5" + affinity: {} + tolerations: [] stac: enabled: true @@ -279,6 +283,8 @@ stac: PORT: "8080" # https://www.uvicorn.org/settings/#production WEB_CONCURRENCY: "5" + affinity: {} + tolerations: [] vector: enabled: true @@ -333,6 +339,11 @@ vector: PORT: "8080" # https://www.uvicorn.org/settings/#production WEB_CONCURRENCY: "5" + affinity: {} + tolerations: [] docServer: enabled: true + settings: + affinity: {} + tolerations: [] From fd8786ab31b1917f11601a245f397e5df5d3ad25 Mon Sep 17 00:00:00 2001 From: Bernhard Mallinger Date: Tue, 21 Jan 2025 17:29:51 +0100 Subject: [PATCH 2/8] Add affinity and tolerations setting for postgrescluster --- helm-chart/eoapi/values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helm-chart/eoapi/values.yaml b/helm-chart/eoapi/values.yaml index 392ba8d8..7abadae5 100644 --- a/helm-chart/eoapi/values.yaml +++ b/helm-chart/eoapi/values.yaml @@ -108,6 +108,8 @@ postgrescluster: instances: - name: eoapi replicas: 1 + affinity: {} + tolerations: [] dataVolumeClaimSpec: accessModes: - "ReadWriteOnce" From 19a84be960fad2d11fc34a9e4acc9d7ee9ea98c0 Mon Sep 17 00:00:00 2001 From: Bernhard Mallinger Date: Wed, 22 Jan 2025 08:13:02 +0100 Subject: [PATCH 3/8] Remove empty default values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: xıʃǝɟ --- helm-chart/eoapi/values.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/helm-chart/eoapi/values.yaml b/helm-chart/eoapi/values.yaml index 7abadae5..5f02c47f 100644 --- a/helm-chart/eoapi/values.yaml +++ b/helm-chart/eoapi/values.yaml @@ -346,6 +346,3 @@ vector: docServer: enabled: true - settings: - affinity: {} - tolerations: [] From 3409a836bea7a16a9f0237af54542630dc7a99c9 Mon Sep 17 00:00:00 2001 From: Bernhard Mallinger Date: Wed, 22 Jan 2025 08:13:11 +0100 Subject: [PATCH 4/8] Remove empty default values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: xıʃǝɟ --- helm-chart/eoapi/values.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/helm-chart/eoapi/values.yaml b/helm-chart/eoapi/values.yaml index 5f02c47f..064b7f22 100644 --- a/helm-chart/eoapi/values.yaml +++ b/helm-chart/eoapi/values.yaml @@ -341,8 +341,6 @@ vector: PORT: "8080" # https://www.uvicorn.org/settings/#production WEB_CONCURRENCY: "5" - affinity: {} - tolerations: [] docServer: enabled: true From 1b3163a46b09dcd3d23839f103351e2065363a13 Mon Sep 17 00:00:00 2001 From: Bernhard Mallinger Date: Wed, 22 Jan 2025 08:13:36 +0100 Subject: [PATCH 5/8] Remove empty default values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: xıʃǝɟ --- helm-chart/eoapi/values.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/helm-chart/eoapi/values.yaml b/helm-chart/eoapi/values.yaml index 064b7f22..a1e1ec2d 100644 --- a/helm-chart/eoapi/values.yaml +++ b/helm-chart/eoapi/values.yaml @@ -167,8 +167,6 @@ pgstacBootstrap: LOAD_FIXTURES: "true" # toggle to `true` if you want to keep the job running as db jumpbox KEEP_ALIVE: "false" - affinity: {} - tolerations: [] ###################### From 8265172298f2881c0be058959a73bdb83744af1b Mon Sep 17 00:00:00 2001 From: Bernhard Mallinger Date: Wed, 22 Jan 2025 08:13:44 +0100 Subject: [PATCH 6/8] Remove empty default values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: xıʃǝɟ --- helm-chart/eoapi/values.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/helm-chart/eoapi/values.yaml b/helm-chart/eoapi/values.yaml index a1e1ec2d..05fcb06a 100644 --- a/helm-chart/eoapi/values.yaml +++ b/helm-chart/eoapi/values.yaml @@ -283,8 +283,6 @@ stac: PORT: "8080" # https://www.uvicorn.org/settings/#production WEB_CONCURRENCY: "5" - affinity: {} - tolerations: [] vector: enabled: true From 4e2f13022ad2035404b53b16696bcac366544fe8 Mon Sep 17 00:00:00 2001 From: Bernhard Mallinger Date: Wed, 22 Jan 2025 08:13:53 +0100 Subject: [PATCH 7/8] Remove empty default values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: xıʃǝɟ --- helm-chart/eoapi/values.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/helm-chart/eoapi/values.yaml b/helm-chart/eoapi/values.yaml index 05fcb06a..60f45426 100644 --- a/helm-chart/eoapi/values.yaml +++ b/helm-chart/eoapi/values.yaml @@ -232,8 +232,6 @@ raster: PORT: "8080" # https://www.uvicorn.org/settings/#production WEB_CONCURRENCY: "5" - affinity: {} - tolerations: [] stac: enabled: true From 37093dd300a6d2361102530a2799499a92d13d04 Mon Sep 17 00:00:00 2001 From: Bernhard Mallinger Date: Wed, 22 Jan 2025 08:14:00 +0100 Subject: [PATCH 8/8] Remove empty default values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: xıʃǝɟ --- helm-chart/eoapi/values.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/helm-chart/eoapi/values.yaml b/helm-chart/eoapi/values.yaml index 60f45426..97537b32 100644 --- a/helm-chart/eoapi/values.yaml +++ b/helm-chart/eoapi/values.yaml @@ -108,8 +108,6 @@ postgrescluster: instances: - name: eoapi replicas: 1 - affinity: {} - tolerations: [] dataVolumeClaimSpec: accessModes: - "ReadWriteOnce"