Skip to content

Commit

Permalink
feat: Allow the user to set the operator update strategy
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Tormo <[email protected]>
  • Loading branch information
kaisoz committed Nov 19, 2024
1 parent 2d7814e commit aa25195
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/cloudnative-pg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |

4 changes: 4 additions & 0 deletions charts/cloudnative-pg/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 9 additions & 0 deletions charts/cloudnative-pg/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aa25195

Please sign in to comment.