Skip to content

Commit

Permalink
[grafana] Add serviceAccount.automountServiceAccountToken and docum…
Browse files Browse the repository at this point in the history
…ent `automountServiceAccountToken`

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
  • Loading branch information
jkroepke committed Feb 27, 2024
1 parent df7ae36 commit 835b809
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/grafana/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: grafana
version: 7.3.3
version: 7.3.4
appVersion: 10.3.3
kubeVersion: "^1.8.0-0"
description: The leading tool for querying and visualizing time series and metrics.
Expand Down
3 changes: 2 additions & 1 deletion charts/grafana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ need to instead set `global.imageRegistry`.
| `extraSecretMounts` | Additional grafana server secret mounts | `[]` |
| `extraVolumeMounts` | Additional grafana server volume mounts | `[]` |
| `extraVolumes` | Additional Grafana server volumes | `[]` |
| `automountServiceAccountToken` | Mounted the service account token on the grafana pod. Mandatory, if sidecars are enabled | `true` |
| `createConfigmap` | Enable creating the grafana configmap | `true` |
| `extraConfigmapMounts` | Additional grafana server configMap volume mounts (values are templated) | `[]` |
| `extraEmptyDirMounts` | Additional grafana server emptyDir volume mounts | `[]` |
Expand Down Expand Up @@ -223,7 +224,7 @@ need to instead set `global.imageRegistry`.
| `admin.existingSecret` | The name of an existing secret containing the admin credentials (can be templated). | `""` |
| `admin.userKey` | The key in the existing admin secret containing the username. | `"admin-user"` |
| `admin.passwordKey` | The key in the existing admin secret containing the password. | `"admin-password"` |
| `serviceAccount.autoMount` | Automount the service account token in the pod| `true` |
| `serviceAccount.automountServiceAccountToken` | Automount the service account token on all pods where is service account is used | `false` |
| `serviceAccount.annotations` | ServiceAccount annotations | |
| `serviceAccount.create` | Create service account | `true` |
| `serviceAccount.labels` | ServiceAccount labels | `{}` |
Expand Down
4 changes: 2 additions & 2 deletions charts/grafana/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- if .Values.serviceAccount.create }}
{{- $root := . -}}
apiVersion: v1
kind: ServiceAccount
automountServiceAccountToken: {{ .Values.serviceAccount.autoMount | default .Values.serviceAccount.automountServiceAccountToken }}
metadata:
labels:
{{- include "grafana.labels" . | nindent 4 }}
Expand All @@ -10,7 +10,7 @@ metadata:
{{- end }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- tpl (toYaml . | nindent 4) $root }}
{{- tpl (toYaml . | nindent 4) $ }}
{{- end }}
name: {{ include "grafana.serviceAccountName" . }}
namespace: {{ include "grafana.namespace" . }}
Expand Down
11 changes: 7 additions & 4 deletions charts/grafana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ serviceAccount:
nameTest:
## ServiceAccount labels.
labels: {}
## Service account annotations. Can be templated.
# annotations:
# eks.amazonaws.com/role-arn: arn:aws:iam::123456789000:role/iam-role-name-here
autoMount: false
## Service account annotations. Can be templated.
# annotations:
# eks.amazonaws.com/role-arn: arn:aws:iam::123456789000:role/iam-role-name-here

# autoMount is deprecated in favor of automountServiceAccountToken
#autoMount: false

Check failure on line 46 in charts/grafana/values.yaml

View workflow job for this annotation

GitHub Actions / call-lint-test / lint-test

[comments] missing starting space in comment
automountServiceAccountToken: false

replicas: 1

Expand Down

0 comments on commit 835b809

Please sign in to comment.