From 0fc41a804c280f527357e76518148c64afcb8410 Mon Sep 17 00:00:00 2001 From: Brett Kochendorfer Date: Tue, 12 Sep 2023 10:15:43 -0500 Subject: [PATCH] feat: Add security context to fastly-exporter Add ability to pass in SecurityContext and PodSecurityContext --- charts/prometheus-fastly-exporter/Chart.yaml | 2 +- .../prometheus-fastly-exporter/templates/deployment.yaml | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/charts/prometheus-fastly-exporter/Chart.yaml b/charts/prometheus-fastly-exporter/Chart.yaml index 93240e259506..51205eb43769 100644 --- a/charts/prometheus-fastly-exporter/Chart.yaml +++ b/charts/prometheus-fastly-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "7.2.4" description: A Helm chart for the Prometheus Fastly Exporter name: prometheus-fastly-exporter -version: 0.1.2 +version: 0.2.0 keywords: - metrics - fastly diff --git a/charts/prometheus-fastly-exporter/templates/deployment.yaml b/charts/prometheus-fastly-exporter/templates/deployment.yaml index b07014d8d693..00564d5c4330 100644 --- a/charts/prometheus-fastly-exporter/templates/deployment.yaml +++ b/charts/prometheus-fastly-exporter/templates/deployment.yaml @@ -22,6 +22,10 @@ spec: {{- with .Values.initContainers }} initContainers: {{ toYaml . | nindent 8 }} {{- end }} + {{- with .Values.podSecurityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" @@ -55,6 +59,10 @@ spec: {{- with .Values.resources }} resources: {{ toYaml . | nindent 12 }} {{- end }} + {{- with .Values.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} {{- with .Values.extraVolumeMounts }} volumeMounts: {{ toYaml . | nindent 12 }} {{- end }}