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

Can not edit upgrade policy for workload #13584

Closed
loganhz opened this issue May 18, 2018 · 3 comments
Closed

Can not edit upgrade policy for workload #13584

loganhz opened this issue May 18, 2018 · 3 comments
Assignees
Labels
kind/bug Issues that are defects reported by users or that we know have reached a real release
Milestone

Comments

@loganhz
Copy link

loganhz commented May 18, 2018

Rancher versions:
rancher/rancher:v2.0.1-rc2

Steps:

  1. Create a workload with upgrade strategy Rolling: start new pods, then stop old
  2. Upgrade the workload and change the strategy to Kill ALL pods, then start new

Results:

Upgrade failed with error Validation failed in API: Deployment.apps "abcd" is invalid: spec.strategy.rollingUpdate: Forbidden: may not be specified when strategy type is 'Recreate'

@loganhz loganhz added kind/bug Issues that are defects reported by users or that we know have reached a real release version/2.0 labels May 18, 2018
@loganhz loganhz added this to the v2.0.2 milestone May 18, 2018
@alena1108
Copy link

alena1108 commented Jun 1, 2018

Happens because when you update deployment having rolling update strategy set:

spec:
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 1

to recreate

spec:
  replicas: 1
  strategy:
    type: Recreate

rollingUpdate should be passed as nil explicitly to the k8s update.

kubernetes/kubernetes#24198

@prachidamle
Copy link
Member

prachidamle commented Jun 10, 2018

As mentioned in kubernetes/kubernetes#24198 this error is not seen when updating the k8s deployment resource with:

spec:
  replicas: 1
  strategy:
    type: Recreate
    rollingUpdate: nil

@sangeethah
Copy link
Contributor

Tested with latest build from master

Able to edit upgrade policy for workload when upgrading workloads.

tomwj added a commit to tomwj/charts that referenced this issue Feb 5, 2019
explicitly set to nil (blank).

Similar issue rancher/rancher#13584

Signed-off-by: Tom Jennings <tomwjennings@gmail.com>
tomwj added a commit to tomwj/charts that referenced this issue Feb 5, 2019
explicitly set to nil (blank).

Similar issue rancher/rancher#13584

Signed-off-by: Tom Jennings <tomwjennings@gmail.com>
tomwj added a commit to tomwj/charts that referenced this issue Feb 5, 2019
explicitly set to nil (blank).

Similar issue rancher/rancher#13584

Signed-off-by: Tom Jennings <tomwjennings@gmail.com>
tomwj added a commit to tomwj/charts that referenced this issue Feb 5, 2019
explicitly set to nil (blank).

Similar issue rancher/rancher#13584

Signed-off-by: Tom Jennings <tomwjennings@gmail.com>
tomwj added a commit to tomwj/charts that referenced this issue Feb 5, 2019
explicitly set to nil (blank).

Similar issue rancher/rancher#13584

Signed-off-by: Tom Jennings <tomwjennings@gmail.com>
tomwj added a commit to tomwj/charts that referenced this issue Feb 5, 2019
explicitly set to nil (blank).

Similar issue rancher/rancher#13584

Signed-off-by: Tom Jennings <tomwjennings@gmail.com>
tomwj added a commit to tomwj/charts that referenced this issue Feb 5, 2019
explicitly set to nil (blank).

Similar issue rancher/rancher#13584

Signed-off-by: Tom Jennings <tomwjennings@gmail.com>
k8s-ci-robot pushed a commit to helm/charts that referenced this issue Feb 14, 2019
…11166)

* Updating Jenkins deployment fails appears rollingUpdate needs to be
explicitly set to nil (blank).

Similar issue rancher/rancher#13584

Signed-off-by: Tom Jennings <tomwjennings@gmail.com>

* Fix for both scenarios

Signed-off-by: Tom Jennings <tomwjennings@gmail.com>
adam-thorpe pushed a commit to adam-thorpe/jenkins-helm that referenced this issue Sep 2, 2024
…#11166)

* Updating Jenkins deployment fails appears rollingUpdate needs to be
explicitly set to nil (blank).

Similar issue rancher/rancher#13584

Signed-off-by: Tom Jennings <tomwjennings@gmail.com>

* Fix for both scenarios

Signed-off-by: Tom Jennings <tomwjennings@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues that are defects reported by users or that we know have reached a real release
Projects
None yet
Development

No branches or pull requests

4 participants