From 609490176a9684f2cdc8c6593bb2d9007fd1f37c Mon Sep 17 00:00:00 2001 From: David Wertenteil Date: Sun, 30 Jul 2023 10:17:05 +0300 Subject: [PATCH] Adding tolerations Signed-off-by: David Wertenteil --- .../templates/node-agent/daemonset.yaml | 4 ++++ .../templates/otel-collector/deployment.yaml | 6 +++++- .../templates/storage/deployment.yaml | 12 ++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/charts/kubescape-cloud-operator/templates/node-agent/daemonset.yaml b/charts/kubescape-cloud-operator/templates/node-agent/daemonset.yaml index 1db6a491..68dcf742 100644 --- a/charts/kubescape-cloud-operator/templates/node-agent/daemonset.yaml +++ b/charts/kubescape-cloud-operator/templates/node-agent/daemonset.yaml @@ -148,4 +148,8 @@ spec: mountPath: /etc/ssl/certs/proxy.crt subPath: proxy.crt {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/kubescape-cloud-operator/templates/otel-collector/deployment.yaml b/charts/kubescape-cloud-operator/templates/otel-collector/deployment.yaml index de9b4d2b..fd3a6adf 100644 --- a/charts/kubescape-cloud-operator/templates/otel-collector/deployment.yaml +++ b/charts/kubescape-cloud-operator/templates/otel-collector/deployment.yaml @@ -67,7 +67,7 @@ spec: - "/otelcol" - "--config=/conf/otel-collector-config.yaml" resources: -{{ toYaml .Values.otelCollector.resources | indent 14 }} +{{ toYaml .Values.otelCollector.resources | indent 14 }} volumeMounts: - name: otel-collector-config-volume mountPath: /conf @@ -106,4 +106,8 @@ spec: affinity: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/kubescape-cloud-operator/templates/storage/deployment.yaml b/charts/kubescape-cloud-operator/templates/storage/deployment.yaml index 48d36832..32325c38 100644 --- a/charts/kubescape-cloud-operator/templates/storage/deployment.yaml +++ b/charts/kubescape-cloud-operator/templates/storage/deployment.yaml @@ -46,6 +46,18 @@ spec: readOnly: true resources: {{ toYaml .Values.storage.resources | indent 12 }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.storage.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.storage.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} volumes: - name: "data" {{- if .Values.persistence.enabled }}