diff --git a/charts/cloudnative-pg/README.md b/charts/cloudnative-pg/README.md index f78461cfc..023989346 100644 --- a/charts/cloudnative-pg/README.md +++ b/charts/cloudnative-pg/README.md @@ -75,5 +75,6 @@ CloudNativePG Operator Helm Chart | serviceAccount.create | bool | `true` | Specifies whether the service account should be created. | | serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template. | | tolerations | list | `[]` | Tolerations for the operator to be installed. | +| updateStrategy | object | `{}` | Update strategy for the operator. | | webhook | object | `{"livenessProbe":{"initialDelaySeconds":3},"mutating":{"create":true,"failurePolicy":"Fail"},"port":9443,"readinessProbe":{"initialDelaySeconds":3},"validating":{"create":true,"failurePolicy":"Fail"}}` | The webhook configuration. | diff --git a/charts/cloudnative-pg/templates/deployment.yaml b/charts/cloudnative-pg/templates/deployment.yaml index 569752007..11289b40b 100644 --- a/charts/cloudnative-pg/templates/deployment.yaml +++ b/charts/cloudnative-pg/templates/deployment.yaml @@ -29,6 +29,10 @@ spec: selector: matchLabels: {{- include "cloudnative-pg.selectorLabels" . | nindent 6 }} + {{- if .Values.updateStrategy }} + strategy: + {{- toYaml .Values.updateStrategy | nindent 4 }} + {{- end }} template: metadata: annotations: diff --git a/charts/cloudnative-pg/values.yaml b/charts/cloudnative-pg/values.yaml index c39912580..1c0e79d19 100644 --- a/charts/cloudnative-pg/values.yaml +++ b/charts/cloudnative-pg/values.yaml @@ -32,6 +32,15 @@ fullnameOverride: "" hostNetwork: false dnsPolicy: "" +# -- Update strategy for the operator. +# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy +# For example: +# type: RollingUpdate +# rollingUpdate: +# maxSurge: 25% +# maxUnavailable: 25% +updateStrategy: {} + crds: # -- Specifies whether the CRDs should be created when installing the chart. create: true