Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to run jmx init container as non root in common chart #667

Merged
merged 3 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/charts/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions src/main/charts/common/templates/_jmx.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I am just blind but I can't see the monitoring.jmxExporterInitContainer.runAsRoot and monitoring.jmxExporterInitContainer.customSecurityContext stanza in any of the values.yaml files. Was this just omitted in the PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nanux the idea is to release common first and then raise a PR with changes to helm charts + unit tests

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, that does make sense. Might be just good to indicate in PR description.

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
Expand Down
Loading