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

通过partition方式进行多批次发布,在某个批次阶段发现有问题希望执行回滚deploy #179

Open
zhengjr9 opened this issue Oct 13, 2023 · 3 comments
Assignees

Comments

@zhengjr9
Copy link
Contributor

zhengjr9 commented Oct 13, 2023

rollout

apiVersion: rollouts.kruise.io/v1alpha1
kind: Rollout
metadata:
  name: rollouts-demo
  annotations:
    rollouts.kruise.io/rolling-style: partition # 使用多批次更新策略,只能配置 "partition" or "canary"
    # "partition" 意味着像 CloneSet 一样分批滚动,不会创建任何额外的 Workload
    # “canary” 表示以金丝雀方式滚动,并将创建一个金丝雀工作负载,对于Deployment默认是canary
spec:
  objectRef: # 定义工作负载
    workloadRef: # 关联需要管理的工作负载
      apiVersion: apps/v1
      kind: Deployment
      name: cxm-cce-eops-001-v1
  strategy: # 定义升级策略
    canary: # 使用 Canary 策略
      steps: # 定义多批次更新策略
        - replicas: 1
        - replicas: 50%
          pause:
            duration: 30
        - replicas: 100%

当我更新完第一批后,想通过
kubectl rollout undo 回滚服务会提示以下错误,请问该如何实现deploy回滚呢
image

@veophi
Copy link
Member

veophi commented Oct 25, 2023

you may apply the last applied configurations of deployment to rollback. @zhengjr9

@cywang1905
Copy link

I met the same problem, maybe I can roll back through kubectl rollout history deploy/xxx --revision=x ? I hope the community can provide clear rollback methods and best practices in the documentation.

@llaqq10000
Copy link

存在同样的需求,在canary的场景下,我需要的canary版本直接销毁,而老版本pod没有任何变化,我发现如果我使用上一镜像版本,使用deployment的yaml文件进行回滚,会被识别成一个新的版本,在回滚的过程中rollout会把这次识别成是一次新的canary发布,而不是直接销毁临时版本
因此我同意@cywang1905 的说法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants