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

关于kruise Rollout 的自动执行灰度发布 #233

Open
HelonLee135 opened this issue Oct 22, 2024 · 2 comments
Open

关于kruise Rollout 的自动执行灰度发布 #233

HelonLee135 opened this issue Oct 22, 2024 · 2 comments

Comments

@HelonLee135
Copy link

apiVersion: rollouts.kruise.io/v1alpha1
kind: Rollout
metadata:
name: rollouts-demo
namespace: xiaodu-test
annotations:
rollouts.kruise.io/rolling-style: partition
spec:
objectRef:
workloadRef:
apiVersion: apps/v1
kind: Deployment
name: auth
strategy:
canary:
steps:
- replicas: 1
matches:
- headers: #设置一个请求头,根据请求头来路由到下面的10% 流量中
- name: user-agent
type: Exact
value: xiaodu
weight: 10 # 10% 流量进入新版本
pause: {}
- replicas: 50% #这是第二步,我希望第二步到最后一步都是自动执行的。貌似不支持这个操作,请问有人知道该怎么做吗?
- replicas: 100%

@furykerry
Copy link
Member

if you does not want human approve in particular step, you can add the duration field, e.g.

apiVersion: rollouts.kruise.io/v1beta1
kind: Rollout
metadata:
  name: rollouts-demo
  namespace: default
spec:
  workloadRef:
    apiVersion: apps/v1
    kind: Deployment
    name: workload-demo
  strategy:
    canary:
      steps:
      - replicas: 1
         pause: {}
      - replicas: 50%
         pause:
             duration: 0
      - replicas: 100%
         pause:
             duration: 0

you can check the field detail in doc

@HelonLee135
Copy link
Author

@furykerry thanks bro ~

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

2 participants