From d4621782d684b5e62f229efffd7f15a76d68f9f6 Mon Sep 17 00:00:00 2001 From: nleconte-csgroup <86782407+nleconte-csgroup@users.noreply.github.com> Date: Wed, 18 Jun 2025 12:21:20 +0200 Subject: [PATCH] feat: add affinity and tolerations for exporter --- charts/monitor/README.md | 2 ++ charts/monitor/templates/exporter-deployment.yaml | 8 ++++++++ charts/monitor/values.yaml | 2 ++ 3 files changed, 12 insertions(+) diff --git a/charts/monitor/README.md b/charts/monitor/README.md index 20a6c547..4d8457a4 100644 --- a/charts/monitor/README.md +++ b/charts/monitor/README.md @@ -19,6 +19,8 @@ Parameter | Description | Default | Notes `exporter.CTRL_USERNAME` | Username to login to the controller. Suggest to replace the default admin user to a read-only user | `admin` | `exporter.CTRL_PASSWORD` | Password to login to the controller. | `admin` | `exporter.enforcerStats.enabled` | If true, enable the Enforcers stats | `false` | For the performance reason, by default the exporter does NOT pull CPU/memory usage from enforcers. +`exporter.affinity` | Exporter affinity rules | `{}` | +`exporter.tolerations` | List of node taints to tolerate | `[]` | --- Contact for access to Docker Hub and docs. diff --git a/charts/monitor/templates/exporter-deployment.yaml b/charts/monitor/templates/exporter-deployment.yaml index 04d8dc00..dc41fe68 100644 --- a/charts/monitor/templates/exporter-deployment.yaml +++ b/charts/monitor/templates/exporter-deployment.yaml @@ -27,6 +27,14 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: + {{- with .Values.exporter.affinity }} + affinity: + {{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.exporter.tolerations }} + tolerations: + {{ toYaml . | indent 8 }} + {{- end }} {{- if .Values.imagePullSecrets }} imagePullSecrets: - name: {{ .Values.imagePullSecrets }} diff --git a/charts/monitor/values.yaml b/charts/monitor/values.yaml index 363d7dc3..43716fac 100644 --- a/charts/monitor/values.yaml +++ b/charts/monitor/values.yaml @@ -24,6 +24,8 @@ exporter: podLabels: {} securityContext: {} containerSecurityContext: {} + affinity: {} + tolerations: [] svc: enabled: true