From b6895ce0f26fbbb66f9592787b199df1a07e4201 Mon Sep 17 00:00:00 2001 From: Pavel Timofeev Date: Fri, 20 Sep 2024 17:41:37 -0600 Subject: [PATCH] Add ability to set topologySpreadConstraints for prometheus-snmp-exporter Signed-off-by: Pavel Timofeev --- charts/prometheus-snmp-exporter/Chart.yaml | 2 +- charts/prometheus-snmp-exporter/templates/daemonset.yaml | 4 ++++ charts/prometheus-snmp-exporter/templates/deployment.yaml | 4 ++++ charts/prometheus-snmp-exporter/values.yaml | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/charts/prometheus-snmp-exporter/Chart.yaml b/charts/prometheus-snmp-exporter/Chart.yaml index 18e9bc868db4..c897157b5653 100644 --- a/charts/prometheus-snmp-exporter/Chart.yaml +++ b/charts/prometheus-snmp-exporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Prometheus SNMP Exporter name: prometheus-snmp-exporter -version: 5.5.0 +version: 5.5.1 appVersion: v0.26.0 home: https://github.com/prometheus/snmp_exporter sources: diff --git a/charts/prometheus-snmp-exporter/templates/daemonset.yaml b/charts/prometheus-snmp-exporter/templates/daemonset.yaml index 44095a5acbd7..9fd8658f1c20 100644 --- a/charts/prometheus-snmp-exporter/templates/daemonset.yaml +++ b/charts/prometheus-snmp-exporter/templates/daemonset.yaml @@ -31,6 +31,10 @@ spec: {{- if .Values.tolerations }} tolerations: {{ toYaml .Values.tolerations | indent 6 }} + {{- end }} + {{- if .Values.topologySpreadConstraints }} + topologySpreadConstraints: +{{ toYaml .Values.topologySpreadConstraints | indent 6 }} {{- end }} restartPolicy: {{ .Values.restartPolicy }} serviceAccountName: {{ template "prometheus-snmp-exporter.serviceAccountName" . }} diff --git a/charts/prometheus-snmp-exporter/templates/deployment.yaml b/charts/prometheus-snmp-exporter/templates/deployment.yaml index c604ac39cc58..53db8bcf7079 100644 --- a/charts/prometheus-snmp-exporter/templates/deployment.yaml +++ b/charts/prometheus-snmp-exporter/templates/deployment.yaml @@ -34,6 +34,10 @@ spec: {{- if .Values.tolerations }} tolerations: {{ toYaml .Values.tolerations | indent 6 }} + {{- end }} + {{- if .Values.topologySpreadConstraints }} + topologySpreadConstraints: +{{ toYaml .Values.topologySpreadConstraints | indent 6 }} {{- end }} restartPolicy: {{ .Values.restartPolicy }} serviceAccountName: {{ template "prometheus-snmp-exporter.serviceAccountName" . }} diff --git a/charts/prometheus-snmp-exporter/values.yaml b/charts/prometheus-snmp-exporter/values.yaml index 82eec4296e2d..ae4602ac9c46 100644 --- a/charts/prometheus-snmp-exporter/values.yaml +++ b/charts/prometheus-snmp-exporter/values.yaml @@ -12,6 +12,7 @@ imagePullSecrets: [] nodeSelector: {} tolerations: [] affinity: {} +topologySpreadConstraints: [] ## Assign a PriorityClassName to pods if set # priorityClassName: ""