diff --git a/src/main/charts/common/Chart.yaml b/src/main/charts/common/Chart.yaml index d49f1aa44..1e396f05f 100644 --- a/src/main/charts/common/Chart.yaml +++ b/src/main/charts/common/Chart.yaml @@ -2,9 +2,9 @@ apiVersion: v2 name: common description: A Library Helm Chart for grouping common logic between Atlassian charts. This chart is not deployable by itself. type: library -version: 1.2.3 +version: 1.2.4 # Please make sure that version and appVersion are always the same. -appVersion: 1.2.3 +appVersion: 1.2.4 keywords: - common - helper diff --git a/src/main/charts/common/templates/_jmx.tpl b/src/main/charts/common/templates/_jmx.tpl index f6b404559..788f41189 100644 --- a/src/main/charts/common/templates/_jmx.tpl +++ b/src/main/charts/common/templates/_jmx.tpl @@ -30,8 +30,15 @@ Jmx init container image: {{ .Values.monitoring.jmxExporterImageRepo}}:{{ .Values.monitoring.jmxExporterImageTag}} command: ["cp"] args: ["/opt/bitnami/jmx-exporter/jmx_prometheus_javaagent.jar", "{{ .Values.volumes.sharedHome.mountPath }}"] + {{- if .Values.monitoring.jmxExporterInitContainer.runAsRoot }} securityContext: runAsUser: 0 + {{- else if .Values.monitoring.jmxExporterInitContainer.customSecurityContext }} + securityContext: + {{- with .Values.monitoring.jmxExporterInitContainer.customSecurityContext }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- end }} volumeMounts: - mountPath: {{ .Values.volumes.sharedHome.mountPath | quote }} name: shared-home