2 min • read
Rollouts CRD
The Rollout CRD is installed to your cluster when you install Argo Rollouts. This is similar to a Deployment, but it adds a rollout strategy section that defines how the rollout will incrementally happen once started. In the example below, it will route 30% of traffic to the new service for 30 seconds, followed by 60% of the traffic for another 30 seconds, then 100% of the traffic. Example YAML:
yaml
apiVersion: argoproj.io/v1alpha1kind: Rolloutmetadata:name: example-rolloutspec:selector:matchLabels:app: exampletemplate:metadata:labels:app: examplespec:containers:- image: <your-image-repo>/example-imageimagePullPolicy: Alwaysname: example-v1ports:- containerPort: 8080strategy:canary:stableService: example-stable # must match your service namecanaryService: example-canary # must match your service nametrafficRouting: # this section required to use Edge Stack for routingambassador:mappings:- examplesteps: # describes the strategy for sending traffic to the canary- setWeight: 30 # 30% of the traffic will go to the canary for 30 seconds- pause: {duration: 30}- setWeight: 60 # 60% of the traffic will go to the canary for 45 seconds- pause: {duration: 45}- setWeight: 100 # 100% of the traffic will go to the canary for 10 seconds- pause: {duration: 10}