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

[Feature] Kruise Rollout Support full-link grey scale capability #147

Open
zmberg opened this issue Jun 5, 2023 · 0 comments
Open

[Feature] Kruise Rollout Support full-link grey scale capability #147

zmberg opened this issue Jun 5, 2023 · 0 comments

Comments

@zmberg
Copy link
Member

zmberg commented Jun 5, 2023

1. What is full-link grey scale?

image

2. What are the current capabilities of Rollout?

Currently Rollout only supports greyscale capabilities for a single workload, so if you need to support the above scenario, you need to configure four yaml configurations, which is complicated and not easy for users to understand. for example:

---
apiVersion: rollouts.kruise.io/v1alpha1
kind: Rollout
metadata:
  name: rollout-a
  annotations:
    rollouts.kruise.io/trafficrouting: mse-traffic
spec:
  objectRef:
    workloadRef:
      apiVersion: apps/v1
      kind: Deployment
      name: spring-cloud-a
  strategy:
    canary:
      steps:
        - pause: {}
          replicas: 1
      patchCanaryMetadata:
        labels:
          alicloud.service.tag: gray
# c rollout configuration
---
apiVersion: rollouts.kruise.io/v1alpha1
kind: Rollout
metadata:
  name: rollout-c
  annotations:
    rollouts.kruise.io/trafficrouting: mse-traffic
spec:
  objectRef:
    workloadRef:
      apiVersion: apps/v1
      kind: Deployment
      name: spring-cloud-c
  strategy:
    canary:
      steps:
        - pause: {}
          replicas: 1
      patchCanaryMetadata:
        labels:
          alicloud.service.tag: gray
---
apiVersion: rollouts.kruise.io/v1alpha1
kind: Rollout
metadata:
  name: rollout-b
  annotations:
    rollouts.kruise.io/trafficrouting: mse-traffic
spec:
  objectRef:
    workloadRef:
      apiVersion: apps/v1
      kind: Deployment
      name: spring-cloud-b
  strategy:
    canary:
      steps:
        - pause: {}
          replicas: 1
      patchCanaryMetadata:
        labels:
          alicloud.service.tag: gray
---
apiVersion: rollouts.kruise.io/v1alpha1
kind: TrafficRouting
metadata:
  name: mse-traffic
spec:
  objectRef:
  - service: spring-cloud-a
      ingress:
        name: spring-cloud-a
        classType: mse
  strategy:
    matches:
    - headers:
      - type: RegularExpression
        name: x-user-agent
        value: 'andriod'
    #weight: 30 ,灰度30%流量;配置这个时,需要把 matches 字段去掉,不能并存
    requestHeaderModifier:
      set:
      - name: x-mse-tag
        value: gray

3. What is the objective of this Feature

A new CRD has been added to describe the full link grey scale model, simplifying user configuration and understanding costs:

apiVersion: rollouts.kruise.io/v1alpha1
kind: RolloutLane
metadata:
  name: lane-a
spec:
  objectRef:
  - service: spring-cloud-a
    ingress:
      name: spring-cloud-a
      classType: mse
  strategy:
    matches:
    - headers:
      - type: RegularExpression
        name: x-user-agent
        value: 'andriod | ios'
    #weight: 30 ,灰度30%流量;配置这个时,需要把 matches 字段去掉,不能并存
    requestHeaderModifier:
      set:
      - name: x-mse-tag
        value: gray
  workloadList:
    - workloadRef:
        apiVersion: apps/v1
        kind: Deployment
        name: spring-cloud-a
      replicas: 20%
      patchCanaryMetadata:
        labels:
          alicloud.service.tag: gray
    - workloadRef:
        apiVersion: apps/v1
        kind: Deployment
        name: spring-cloud-b
      replicas: 20%
      patchCanaryMetadata:
        labels:
          alicloud.service.tag: gray
    - workloadRef:
        apiVersion: apps/v1
        kind: Deployment
        name: spring-cloud-c
      replicas: 20%
      patchCanaryMetadata:
        labels:
          alicloud.service.tag: gray
@zmberg zmberg changed the title [Feature] Kruise Rollout Support full-link grey scale capability [GLCC] Kruise Rollout Support full-link grey scale capability Jun 5, 2023
@zmberg zmberg changed the title [GLCC] Kruise Rollout Support full-link grey scale capability [Feature] Kruise Rollout Support full-link grey scale capability Jun 7, 2023
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

1 participant