[bitnami/grafana-operator] Custom update strategy for Grafana deployment (#6868)

* Fix persistence in Grafana Opeartor temporarily

* Bump version

* Add updateStrategy field to Grafana

* Update documentation

* Fix default value

* Fix default value again

* Add warning

* Insert a blank line

* Update comment based on feedback

* Fix template

* Bump minor version

* Add removed entry in table in readme

* Fix indent

* Fix wrong field description
This commit is contained in:
Yota Toyama
2021-08-19 11:10:46 +02:00
committed by GitHub
parent e363e61746
commit 31fc70640b
4 changed files with 23 additions and 5 deletions
+1 -1
View File
@@ -25,4 +25,4 @@ name: grafana-operator
sources:
- https://github.com/integr8ly/grafana-operator
- https://github.com/bitnami/bitnami-docker-grafana-operator
version: 1.0.1
version: 1.1.0
+2 -1
View File
@@ -153,7 +153,7 @@ This solution allows to easily deploy multiple Grafana instances compared to the
| ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | -------------------------- |
| `operator.enabled` | Enable the deployment of the Grafana Operator | `true` |
| `operator.replicaCount` | Number of grafana-operator Pod replicas | `1` |
| `operator.updateStrategy.type` | Set up update strategy for Grafana installation. | `Recreate` |
| `operator.updateStrategy.type` | Set up update strategy for Grafana Operator installation. | `Recreate` |
| `operator.image.registry` | Grafana Operator image registry | `docker.io` |
| `operator.image.repository` | Grafana Operator image name | `bitnami/grafana-operator` |
| `operator.image.tag` | Grafana Operator image tag | `3.10.3-debian-10-r9` |
@@ -230,6 +230,7 @@ This solution allows to easily deploy multiple Grafana instances compared to the
| `grafana.resources.limits` | The resources limits for the container | `{}` |
| `grafana.resources.requests` | The requested resources for the container | `{}` |
| `grafana.replicaCount` | Specify the amount of replicas running | `1` |
| `grafana.updateStrategy` | Set up update strategy for Grafana installation. | `{}` |
| `grafana.podAffinityPreset` | Pod affinity preset | `""` |
| `grafana.podAntiAffinityPreset` | Pod anti-affinity preset | `soft` |
| `grafana.nodeAffinityPreset.type` | Set nodeAffinity preset type | `""` |
@@ -95,6 +95,9 @@ spec:
successThreshold: {{ .Values.grafana.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.grafana.readinessProbe.failureThreshold }}
{{- end }}
{{- if .Values.grafana.updateStrategy }}
strategy: {{ toYaml .Values.grafana.updateStrategy | nindent 6 }}
{{- end }}
{{- if .Values.grafana.extraVolumeMounts }}
extraVolumeMounts:
{{- include "common.tplvalues.render" (dict "value" .Values.grafana.extraVolumeMounts "context" $) | nindent 6 }}
+17 -3
View File
@@ -46,7 +46,7 @@ operator:
## @param operator.replicaCount Number of grafana-operator Pod replicas
##
replicaCount: 1
## @param operator.updateStrategy.type Set up update strategy for Grafana installation.
## @param operator.updateStrategy.type Set up update strategy for Grafana Operator installation.
## Set to Recreate if you use persistent volume that cannot be mounted by more than one pods to make sure the pods is destroyed first.
## Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
## Example:
@@ -432,6 +432,9 @@ grafana:
##
persistence:
## @param grafana.persistence.enabled Enable persistent storage for the grafana deployment
## NOTE: In order to avoid deployment failure due to multi-attach of the same volume,
## you might also want to set `grafana.updateStrategy` to Recreate.
## More information can be found here: https://github.com/grafana-operator/grafana-operator/issues/453
##
enabled: false
## @param grafana.persistence.storageClass Define the storageClass for the persistent storage if not defined default is used
@@ -512,14 +515,14 @@ grafana:
##
jsonnetLibrarySelector:
matchLabels:
app.kubernetes.io/instance: '{{ .Release.Name }}'
app.kubernetes.io/instance: "{{ .Release.Name }}"
## @param grafana.dashboardLabelSelectors [object] This selects dashboards on the label.
## A cachall is not possible so you need to define at least one label selector here.
## Ref: https://github.com/integr8ly/grafana-operator/blob/master/documentation/deploy_grafana.md#deploying-grafana
##
dashboardLabelSelectors:
- matchLabels:
app.kubernetes.io/instance: '{{ .Release.Name }}'
app.kubernetes.io/instance: "{{ .Release.Name }}"
## Grafana containers' liveness probe
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
## @param grafana.livenessProbe.enabled Enable livenessProbe
@@ -552,6 +555,17 @@ grafana:
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
## @param grafana.updateStrategy Set up update strategy for Grafana installation.
## Set to Recreate if you use persistent volume that cannot be mounted by more than one pods to make sure the pods is destroyed first.
## Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
## Example:
## updateStrategy:
## type: RollingUpdate
## rollingUpdate:
## maxSurge: 25%
## maxUnavailable: 25%
##
updateStrategy: {}
## @param grafana.extraVolumes Optionally specify extra list of additional volumes for the grafana pod(s)
##
extraVolumes: []