From 48adda18c3f6906f9237ec5f22f11e58446025b3 Mon Sep 17 00:00:00 2001 From: ppawlowski Date: Tue, 10 Sep 2024 15:56:11 +0200 Subject: [PATCH 1/4] Add taints for all deployments --- helm/flowforge/templates/broker.yaml | 4 ++++ helm/flowforge/templates/deployment.yaml | 4 ++++ helm/flowforge/templates/file-storage.yml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/helm/flowforge/templates/broker.yaml b/helm/flowforge/templates/broker.yaml index 4fdd7312..de41e6da 100644 --- a/helm/flowforge/templates/broker.yaml +++ b/helm/flowforge/templates/broker.yaml @@ -92,6 +92,10 @@ spec: {{- if .Values.forge.broker.resources }} resources: {{- toYaml .Values.forge.broker.resources | nindent 12 }} {{- end }} + {{- if .Values.forge.broker.tolerations}} + tolerations: + {{ toYaml .Values.forge.broker.tolerations | nindent 8 }} + {{- end }} {{- if .Values.forge.registrySecrets }} imagePullSecrets: {{- range .Values.forge.registrySecrets }} diff --git a/helm/flowforge/templates/deployment.yaml b/helm/flowforge/templates/deployment.yaml index 9929877d..147e9ae3 100644 --- a/helm/flowforge/templates/deployment.yaml +++ b/helm/flowforge/templates/deployment.yaml @@ -161,6 +161,10 @@ spec: resources: {{- toYaml .Values.forge.resources | nindent 12 }} {{- end }} securityContext: {{- toYaml .Values.forge.containerSecurityContext | nindent 10 }} + {{- if .Values.forge.tolerations}} + tolerations: + {{ toYaml .Values.forge.tolerations | nindent 8 }} + {{- end }} {{- if .Values.forge.registrySecrets }} imagePullSecrets: {{- range .Values.forge.registrySecrets }} diff --git a/helm/flowforge/templates/file-storage.yml b/helm/flowforge/templates/file-storage.yml index 342d45bf..93818f0c 100644 --- a/helm/flowforge/templates/file-storage.yml +++ b/helm/flowforge/templates/file-storage.yml @@ -131,6 +131,10 @@ spec: {{- if .Values.forge.fileStore.resources }} resources: {{- toYaml .Values.forge.fileStore.resources | nindent 12 }} {{- end }} + {{- if .Values.forge.fileStore.tolerations}} + tolerations: + {{ toYaml .Values.forge.fileStore.tolerations | nindent 8 }} + {{- end }} {{- if .Values.forge.registrySecrets }} imagePullSecrets: {{- range .Values.forge.registrySecrets }} From b1931309cd5a073ea87947bf7e40e7408ecdc958 Mon Sep 17 00:00:00 2001 From: ppawlowski Date: Tue, 10 Sep 2024 15:56:32 +0200 Subject: [PATCH 2/4] Update default values and values schema --- helm/flowforge/values.schema.json | 9 +++++++++ helm/flowforge/values.yaml | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/helm/flowforge/values.schema.json b/helm/flowforge/values.schema.json index 93f6d3bb..5ab037c5 100644 --- a/helm/flowforge/values.schema.json +++ b/helm/flowforge/values.schema.json @@ -346,6 +346,9 @@ "labels": { "type": "object" }, + "tolerations": { + "type": "array" + }, "ingress": { "type": "object", "properties": { @@ -586,6 +589,9 @@ "labels": { "type": "object" }, + "tolerations": { + "type": "array" + }, "image": { "type": "string" }, @@ -816,6 +822,9 @@ "labels": { "type": "object" }, + "tolerations": { + "type": "array" + }, "logPassthrough": { "type": "boolean" }, diff --git a/helm/flowforge/values.yaml b/helm/flowforge/values.yaml index 501b0427..ca299cae 100644 --- a/helm/flowforge/values.yaml +++ b/helm/flowforge/values.yaml @@ -43,6 +43,7 @@ forge: readOnlyRootFilesystem: true labels: {} podLabels: {} + tolerations: [] ingress.annotations: {} persistentStorage: @@ -70,6 +71,7 @@ forge: readOnlyRootFilesystem: true labels: {} podLabels: {} + tolerations: [] telemetry: backend: prometheus: @@ -120,6 +122,8 @@ forge: timeoutSeconds: 5 successThreshold: 1 failureThreshold: 3 + + tolerations: [] logPassthrough: false customHostname: From 070f6ef02f91308d9e5f773066b9b129f3f6f23a Mon Sep 17 00:00:00 2001 From: ppawlowski Date: Tue, 10 Sep 2024 15:56:54 +0200 Subject: [PATCH 3/4] Update chart documentation --- helm/flowforge/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helm/flowforge/README.md b/helm/flowforge/README.md index 3fa3ed33..518ae063 100644 --- a/helm/flowforge/README.md +++ b/helm/flowforge/README.md @@ -50,6 +50,7 @@ For other values please refer to the documentation below. - `forge.labels` allows to add custom labels to the core application related objects (e.g. deployment, services, etc.) (default `{}`) - `forge.podLabels` allows to add custom labels to the core application pod (default `{}`) - `forge.replicas` allows the number of instances of the FlowFuse App to be set. Scaling only supported with ingress-nginx controller (default `1`) + - `forge.tolerations` allows to configure [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for the core application deployment (default `[]`) note: `forge.projectSelector` and `forge.managementSelector` defaults mean that you must have at least 2 nodes in your cluster and they need to be labeled before installing. @@ -100,6 +101,7 @@ To use STMP to send email - `forge.broker.startupProbe` block with [startupProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) configuration for the broker pod (check [here](#liveness-readiness-and-startup-probes) for more details) - `forge.broker.labels` allows to add custom labels to the broker related objects (e.g. deployment, services, etc.) (default `{}`) - `forge.broker.podLabels` allows to add custom labels to the broker pod (default `{}`) + - `forge.broker.tolerations` allows to configure [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for the broker deployment (default `[]`) - `forge.broker.ingress.annotations` broker ingress annotations (default is `{}`) `forge.broker.ingress.annotations` values can contain the following tokens that will be replaced as follows: @@ -167,6 +169,7 @@ Enables FlowForge Telemetry - `forge.fileStore.startupProbe` block with [startupProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) configuration for the flowforge-file pod (check [here](#liveness-readiness-and-startup-probes) for more details) - `forge.fileStore.labels` allows to add custom labels to the file-server related objects (e.g. deployment, services, etc.) (default `{}`) - `forge.fileStore.podLabels` allows to add custom labels to the file-server pod (default `{}`) +- `forge.fileStore.tolerations` allows to configure [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for the file-server deployment (default `[]`) - `forge.fileStore.telemetry.backend.prometheus.enabled` enables the `/metrics` endpoint on the fileStore app for scraping by Prometheus ### Persistent Storage From 0f1f416ae28cd500f76db2973e47ef15e2eecb39 Mon Sep 17 00:00:00 2001 From: ppawlowski Date: Tue, 10 Sep 2024 16:01:30 +0200 Subject: [PATCH 4/4] Lint --- helm/flowforge/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/flowforge/values.yaml b/helm/flowforge/values.yaml index ca299cae..21397693 100644 --- a/helm/flowforge/values.yaml +++ b/helm/flowforge/values.yaml @@ -122,7 +122,7 @@ forge: timeoutSeconds: 5 successThreshold: 1 failureThreshold: 3 - + tolerations: [] logPassthrough: false