Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make csidriver updateStrategy configurable #3383

Merged
merged 4 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,5 @@ spec:
operator: Exists
effect: NoSchedule
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
{{- toYaml .Values.csidriver.updateStrategy | nindent 4 }}
{{- end -}}
41 changes: 41 additions & 0 deletions config/helm/chart/default/tests/Common/csi/daemonset_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,47 @@ tests:
- emptyDir: { }
name: tmp-dir

- it: should have default updateStrategy
set:
platform: kubernetes
image: image-name
csidriver.enabled: true
asserts:
- isNotEmpty:
path: spec.updateStrategy
- equal:
path: spec.updateStrategy
value:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate

- it: updateStrategy should be configurable
set:
platform: kubernetes
image: image-name
csidriver.enabled: true
csidriver.updateStrategy.rollingUpdate.maxUnavailable: 3
asserts:
- isNotEmpty:
path: spec.updateStrategy
- equal:
path: spec.updateStrategy
value:
rollingUpdate:
maxUnavailable: 3
type: RollingUpdate

- it: updateStrategy can be null
set:
platform: kubernetes
image: image-name
csidriver.enabled: true
csidriver.updateStrategy: null
asserts:
- isEmpty:
path: spec.updateStrategy

- it: should have imagePullSecrets defined in spec
set:
platform: kubernetes
Expand Down
4 changes: 4 additions & 0 deletions config/helm/chart/default/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ csidriver:
operator: Exists
labels: []
annotations: []
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
csiInit:
securityContext:
runAsUser: 0
Expand Down
Loading