Skip to content

Commit

Permalink
[alertmanager] Add securityContext to configmap reload (#3659)
Browse files Browse the repository at this point in the history
* Add securityContext to configmap reload

Signed-off-by: Robert Lindner <[email protected]>

* Configure configmapReload securityContext via seperate values

Signed-off-by: Robert Lindner <[email protected]>

* Default the securityContext for configmapReload to empty object

to be consistent with the previous behavior

Signed-off-by: Robert Lindner <[email protected]>

---------

Signed-off-by: Robert Lindner <[email protected]>
  • Loading branch information
robertlindner authored Aug 14, 2023
1 parent 21a3b5b commit 56c421f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/alertmanager/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/a
sources:
- https://github.com/prometheus/alertmanager
type: application
version: 1.4.0
version: 1.5.0
appVersion: v0.25.0
kubeVersion: ">=1.19.0-0"
keywords:
Expand Down
4 changes: 4 additions & 0 deletions charts/alertmanager/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ spec:
ports:
- containerPort: {{ . }}
{{- end }}
{{- with .Values.configmapReload.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- name: config
mountPath: /etc/alertmanager
Expand Down
9 changes: 9 additions & 0 deletions charts/alertmanager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,15 @@ configmapReload:
# - name: FOO
# value: BAR

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsUser: 65534
# runAsNonRoot: true
# runAsGroup: 65534

templates: {}
# alertmanager.tmpl: |-

Expand Down

0 comments on commit 56c421f

Please sign in to comment.