From de3baace82695a0d50f63f0727cbd4a06df1072a Mon Sep 17 00:00:00 2001 From: ixsakra <34536530+rlia@users.noreply.github.com> Date: Mon, 12 Feb 2024 04:12:29 +0900 Subject: [PATCH] [prometheus-ipmi-exporter] add values(extraVolumes, extraVolumeMounts and containerSecurityContext) (#4108) * add values, extraVolumes, extraVolumeMounts and containerSecurityContext Signed-off-by: ixsakra * Update values.yaml Signed-off-by: zeritti <47476160+zeritti@users.noreply.github.com> --------- Signed-off-by: ixsakra Signed-off-by: zeritti <47476160+zeritti@users.noreply.github.com> Co-authored-by: zeritti <47476160+zeritti@users.noreply.github.com> --- charts/prometheus-ipmi-exporter/Chart.yaml | 2 +- .../prometheus-ipmi-exporter/templates/deployment.yaml | 10 ++++++++++ charts/prometheus-ipmi-exporter/values.yaml | 9 +++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/charts/prometheus-ipmi-exporter/Chart.yaml b/charts/prometheus-ipmi-exporter/Chart.yaml index baff41d27fae..25eac5b3ce22 100644 --- a/charts/prometheus-ipmi-exporter/Chart.yaml +++ b/charts/prometheus-ipmi-exporter/Chart.yaml @@ -4,7 +4,7 @@ description: This is an IPMI exporter for Prometheus. type: application -version: 0.2.1 +version: 0.3.0 appVersion: "v1.8.0" diff --git a/charts/prometheus-ipmi-exporter/templates/deployment.yaml b/charts/prometheus-ipmi-exporter/templates/deployment.yaml index 6f5db0d3e987..f05f364238d5 100644 --- a/charts/prometheus-ipmi-exporter/templates/deployment.yaml +++ b/charts/prometheus-ipmi-exporter/templates/deployment.yaml @@ -31,11 +31,18 @@ spec: args: - "--config.file" - "/config.yml" + {{- with.Values.containerSecurityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} volumeMounts: - name: config-volume mountPath: /config.yml subPath: config.yml readOnly: true + {{- with .Values.extraVolumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} ports: - name: http containerPort: {{ .Values.service.port }} @@ -51,6 +58,9 @@ spec: - name: config-volume configMap: name: {{ template "prometheus-ipmi-exporter.fullname" . }} + {{- with .Values.extraVolumes }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{ toYaml . | nindent 8 }} {{- end }} diff --git a/charts/prometheus-ipmi-exporter/values.yaml b/charts/prometheus-ipmi-exporter/values.yaml index 17c5ed59aff3..ed89c6ab06c7 100644 --- a/charts/prometheus-ipmi-exporter/values.yaml +++ b/charts/prometheus-ipmi-exporter/values.yaml @@ -35,6 +35,15 @@ resources: additionalAnnotations: {} +# container-level security context +containerSecurityContext: {} + +# List of extra mounts to add +extraVolumeMounts: [] + +# List of extra volumes to add +extraVolumes: [] + serviceMonitor: # When set true then use a ServiceMonitor to configure scraping enabled: false