Skip to main content
Version: v1.6

kruise-rollout

Kruise Rollout addon provides canary release capabilities for Kubernetes Deployment, Statefulset and OpenKruise CloneSet. For more details, please refer to: Kruise Rollout.

Installation

vela addon enable kruise-rollout

Uninstallation

vela addon disable kruise-rollout

Usage

Kurise rollout addon help to canary rollout your workload no matter defined with webservice or contained in a helm.

If your workload is in a helm chart please refer to doc for more usage info, otherwise please refer to usage of webservice component.

Properties

NameDescriptionTypeRequiredDefault
canaryConfiguration for canary rollout strategyCanarytrue
workloadTypeSpecify the target worklaod typeWorkloadTypefalse

Canary

NameDescriptionTypeRequiredDefault
stepsDefines the entire rollout process in stepsCanarySteptrue
trafficRoutingsDefine traffic routing related service, ingress information[]TrafficRoutingtrue
CanaryStep
NameDescriptionTypeRequiredDefault
weightDefine the percentage of traffic routing to the new version in each step, e.g., 20%, 40%...intfalse
replicasDefine the replicas of release to the new version in each step, e.g., 5, 10...intfalse
durationDefine the behavior after release each step, if not filled, the default requires manual determination. If filled, it indicates the time to wait in seconds, e.g., 60intfalse
TrafficRouting
NameDescriptionTypeRequiredDefault
serviceDefine service namestirngfalsecontext.name
ingressNameDefine ingress namestringfalsecontext.name
WorkloadType
NameDescriptionTypeRequiredDefault
apiVersionTarget workload's apiVersionstringtrue
kindTarget workload's kindstringtrue

Example

cat <<EOF | vela up -f -
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: canary-demo
annotations:
app.oam.dev/publishVersion: v1
spec:
components:
- name: canary-demo
type: webservice
properties:
image: barnett/canarydemo:v1
ports:
- port: 8090
traits:
- type: scaler
properties:
replicas: 5
- type: gateway
properties:
domain: canary-demo.com
http:
"/version": 8090
- type: kruise-rollout
properties:
canary:
steps:
# The first batch of Canary releases 20% Pods, and 20% traffic imported to the new version, require manual confirmation before subsequent releases are completed
- weight: 20
# The second batch of Canary releases 90% Pods, and 90% traffic imported to the new version.
- weight: 90
trafficRoutings:
- type: nginx
EOF