Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Set rollingUpdate to null when updateStrategy is Recreate #12319

Merged
merged 1 commit into from
Mar 18, 2019
Merged

Set rollingUpdate to null when updateStrategy is Recreate #12319

merged 1 commit into from
Mar 18, 2019

Conversation

minhdanh
Copy link
Contributor

@minhdanh minhdanh commented Mar 18, 2019

What this PR does / why we need it:

This PR adds "rollingUpdate": null to updateStrategy of the statefulsets when the type of updateStrategy is Recreate.
This is needed in case someone initially uses the default strategy, which is RollingUpdate, but then decides to change it to Recreate for some reason (such as pv mounting issue on some platforms).
In that case they will not be able to update the strategy with such below error:

Error: StatefulSet.apps "postgres" is invalid: spec.updateStrategy: Invalid value: apps.StatefulSetUpdateStrategy{Type:"Recreate", RollingUpdate:(*apps.RollingUpdateStatefulSetStrategy)(nil)}: must be 'RollingUpdate' or 'OnDelete' && StatefulSet.apps "postgres" is invalid: spec.updateStrategy: Invalid value: apps.StatefulSetUpdateStrategy{Type:"Recreate", RollingUpdate:(*apps.RollingUpdateStatefulSetStrategy)(nil)}: must be 'RollingUpdate' or 'OnDelete'

By adding "rollingUpdate": null, this will solve that issue.

See also: kubernetes/kubernetes#24198

Special notes for your reviewer:

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • DCO signed
  • Chart Version bumped
  • Variables are documented in the README.md

@helm-bot helm-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 18, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @minhdanh. Thanks for your PR.

I'm waiting for a helm member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 18, 2019
Signed-off-by: Minh Danh <minhdanh.ngo@gmail.com>
@helm-bot helm-bot added Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 18, 2019
@minhdanh
Copy link
Contributor Author

/assign @desaintmartin

Copy link
Collaborator

@juan131 juan131 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for this fix!

@juan131
Copy link
Collaborator

juan131 commented Mar 18, 2019

/ok-to-test
/lgtm

@k8s-ci-robot k8s-ci-robot added ok-to-test lgtm Indicates that a PR is ready to be merged. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 18, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: juan131, minhdanh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 18, 2019
@k8s-ci-robot k8s-ci-robot merged commit 94b5a26 into helm:master Mar 18, 2019
rmccorm4 pushed a commit to rmccorm4/charts that referenced this pull request Mar 26, 2019
Signed-off-by: Minh Danh <minhdanh.ngo@gmail.com>
crackmac pushed a commit to crackmac/charts that referenced this pull request Mar 29, 2019
Signed-off-by: Minh Danh <minhdanh.ngo@gmail.com>
crackmac pushed a commit to crackmac/charts that referenced this pull request Mar 29, 2019
Signed-off-by: Minh Danh <minhdanh.ngo@gmail.com>
Signed-off-by: Kevin Duane <duank001@apps.disney.com>
devnulled pushed a commit to devnulled/charts that referenced this pull request Apr 25, 2019
Signed-off-by: Minh Danh <minhdanh.ngo@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). lgtm Indicates that a PR is ready to be merged. ok-to-test size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants