Skip to content

Commit

Permalink
Merge pull request #845 from splushii/grafana-sidecar-securitycontext
Browse files Browse the repository at this point in the history
[grafana] Configurable Security Context for sidecars
  • Loading branch information
zanhsieh committed Nov 29, 2021
2 parents 91c6a60 + 34f1b48 commit 855f40d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/grafana/Chart.yaml
@@ -1,6 +1,6 @@
apiVersion: v2
name: grafana
version: 6.17.8
version: 6.17.9
appVersion: 8.2.5
kubeVersion: "^1.8.0-0"
description: The leading tool for querying and visualizing time series and metrics.
Expand Down
1 change: 1 addition & 0 deletions charts/grafana/README.md
Expand Up @@ -141,6 +141,7 @@ This version requires Helm >= 3.1.0.
| `sidecar.image.sha` | Sidecar image sha (optional) | `""` |
| `sidecar.imagePullPolicy` | Sidecar image pull policy | `IfNotPresent` |
| `sidecar.resources` | Sidecar resources | `{}` |
| `sidecar.securityContext` | Sidecar securityContext | `{}` |
| `sidecar.enableUniqueFilenames` | Sets the kiwigrid/k8s-sidecar UNIQUE_FILENAMES environment variable. If set to `true` the sidecar will create unique filenames where duplicate data keys exist between ConfigMaps and/or Secrets within the same or multiple Namespaces. | `false` |
| `sidecar.dashboards.enabled` | Enables the cluster wide search for dashboards and adds/updates/deletes them in grafana | `false` |
| `sidecar.dashboards.SCProvider` | Enables creation of sidecar provider | `true` |
Expand Down
12 changes: 12 additions & 0 deletions charts/grafana/templates/_pod.tpl
Expand Up @@ -112,6 +112,10 @@ initContainers:
{{- end }}
resources:
{{ toYaml .Values.sidecar.resources | indent 6 }}
{{- if .Values.sidecar.securityContext }}
securityContext:
{{- toYaml .Values.sidecar.securityContext | nindent 6 }}
{{- end }}
volumeMounts:
- name: sc-datasources-volume
mountPath: "/etc/grafana/provisioning/datasources"
Expand Down Expand Up @@ -147,6 +151,10 @@ initContainers:
{{- end }}
resources:
{{ toYaml .Values.sidecar.resources | indent 6 }}
{{- if .Values.sidecar.securityContext }}
securityContext:
{{- toYaml .Values.sidecar.securityContext | nindent 6 }}
{{- end }}
volumeMounts:
- name: sc-notifiers-volume
mountPath: "/etc/grafana/provisioning/notifiers"
Expand Down Expand Up @@ -205,6 +213,10 @@ containers:
{{- end }}
resources:
{{ toYaml .Values.sidecar.resources | indent 6 }}
{{- if .Values.sidecar.securityContext }}
securityContext:
{{- toYaml .Values.sidecar.securityContext | nindent 6 }}
{{- end }}
volumeMounts:
- name: sc-dashboard-volume
mountPath: {{ .Values.sidecar.dashboards.folder | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/grafana/values.yaml
Expand Up @@ -625,6 +625,7 @@ sidecar:
# requests:
# cpu: 50m
# memory: 50Mi
securityContext: {}
# skipTlsVerify Set to true to skip tls verification for kube api calls
# skipTlsVerify: true
enableUniqueFilenames: false
Expand Down

0 comments on commit 855f40d

Please sign in to comment.