diff --git a/bitnami/grafana-operator/Chart.yaml b/bitnami/grafana-operator/Chart.yaml index 22f06e932..09c6d8895 100644 --- a/bitnami/grafana-operator/Chart.yaml +++ b/bitnami/grafana-operator/Chart.yaml @@ -25,4 +25,4 @@ name: grafana-operator sources: - https://github.com/integr8ly/grafana-operator - https://github.com/bitnami/bitnami-docker-grafana-operator -version: 0.8.1 +version: 0.8.2 diff --git a/bitnami/grafana-operator/README.md b/bitnami/grafana-operator/README.md index 371d09385..d0b8356f5 100644 --- a/bitnami/grafana-operator/README.md +++ b/bitnami/grafana-operator/README.md @@ -215,6 +215,7 @@ This solution allows to easily deploy multiple Grafana instances compared to the | `grafana.image.repository` | Grafana image name | `bitnami/grafana` | | `grafana.image.tag` | Grafana image tag | `7.5.10-debian-10-r9` | | `grafana.image.pullSecrets` | Grafana image pull secrets | `[]` | +| `grafana.serviceAccount` | Additional service account configuration | `{}` | | `grafana.podSecurityContext.enabled` | Enable pods security context | `true` | | `grafana.podSecurityContext.runAsUser` | User ID for the pods | `1001` | | `grafana.podSecurityContext.runAsGroup` | User ID for the pods | `1001` | @@ -363,4 +364,4 @@ Find more information about how to deal with common errors related to Bitnami’ ```bash $ helm upgrade my-release bitnami/grafana-operator -``` +``` \ No newline at end of file diff --git a/bitnami/grafana-operator/templates/grafana.yaml b/bitnami/grafana-operator/templates/grafana.yaml index d1a8820f1..fdd1aa033 100644 --- a/bitnami/grafana-operator/templates/grafana.yaml +++ b/bitnami/grafana-operator/templates/grafana.yaml @@ -39,8 +39,12 @@ spec: annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 6 }} {{- end }} {{- $imagePullSecrets := include "common.images.pullSecrets" (dict "images" (list .Values.operator.image .Values.grafana.image .Values.grafanaPluginInit.image) "global" .Values.global) }} - {{- if not (empty ($imagePullSecrets)) }} - serviceAccount: {{- $imagePullSecrets | nindent 4 }} + {{- if (not (empty ($imagePullSecrets))) | or .Values.grafana.serviceAccount }} + serviceAccount: + {{- with .Values.grafana.serviceAccount }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- $imagePullSecrets | nindent 4 }} {{- end }} {{- if .Values.grafana.sidecars }} containers: diff --git a/bitnami/grafana-operator/values.yaml b/bitnami/grafana-operator/values.yaml index 7c09bcef4..da274d542 100644 --- a/bitnami/grafana-operator/values.yaml +++ b/bitnami/grafana-operator/values.yaml @@ -270,6 +270,13 @@ grafana: ## - myRegistryKeySecretName ## pullSecrets: [] + ## @param grafana.serviceAccount Additional service account configuration + ## Ref: https://github.com/integr8ly/grafana-operator/blob/master/documentation/deploy_grafana.md#configuring-the-serviceaccount + ## e.g: + ## serviceAccount: + ## annotations: + ## iam.gke.io/gcp-service-account: "grafana@preprodz.iam.gserviceaccount.com" + serviceAccount: {} ## Pod securityContext ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ ## @param grafana.podSecurityContext.enabled Enable pods security context