| 
 | 1 | +apiVersion: argoproj.io/v1alpha1  | 
 | 2 | +kind: Rollout  | 
 | 3 | +metadata:  | 
 | 4 | +  name: rollouts-demo  | 
 | 5 | +spec:  | 
 | 6 | +  replicas: 5  | 
 | 7 | +  strategy:  | 
 | 8 | +    canary:  | 
 | 9 | +      canaryService: argo-rollouts-canary-service # our created canary service  | 
 | 10 | +      stableService: argo-rollouts-stable-service # our created stable service  | 
 | 11 | +      trafficRouting:  | 
 | 12 | +        managedRoutes:  | 
 | 13 | +          - name: rollouts-demo-canary-internal  | 
 | 14 | +          - name: rollouts-demo-canary-beta-customers  | 
 | 15 | +        plugins:  | 
 | 16 | +          argoproj-labs/gatewayAPI:  | 
 | 17 | +            httpRoutes:  | 
 | 18 | +              - name: argo-rollouts-http-route # our created httproute  | 
 | 19 | +                useHeaderRoutes: true  | 
 | 20 | +            namespace: default # namespace where this rollout resides  | 
 | 21 | +      steps:  | 
 | 22 | +        - setCanaryScale:  | 
 | 23 | +            weight: 1 # Scale pods equivalent to 1% of the total number of pods  | 
 | 24 | +        - setHeaderRoute:  | 
 | 25 | +            match:  | 
 | 26 | +              - headerName: X-Canary-Candidate  | 
 | 27 | +                headerValue:  | 
 | 28 | +                  exact: internal  | 
 | 29 | +            name: rollouts-demo-canary-internal  | 
 | 30 | +        - pause: {} # Run synthetics tests or manual validation from internal users  | 
 | 31 | +        - setHeaderRoute:  | 
 | 32 | +            match:  | 
 | 33 | +              - headerName: X-Canary-Candidate  | 
 | 34 | +                headerValue:  | 
 | 35 | +                  exact: beta-customers  | 
 | 36 | +            name: rollouts-demo-canary-beta-customers  | 
 | 37 | +        - pause: {} # Run analysis or manual validation from beta customers  | 
 | 38 | +        - setCanaryScale:  | 
 | 39 | +            weight: 30 # Prepare for real customer traffic  | 
 | 40 | +        - setWeight: 30  | 
 | 41 | +        - setCanaryScale:  | 
 | 42 | +            matchTrafficWeight: true # Allow pods to scale with setWeight steps  | 
 | 43 | +        - pause: { duration: 10 }  | 
 | 44 | +        - setWeight: 40  | 
 | 45 | +        - pause: { duration: 10 }  | 
 | 46 | +        - setWeight: 60  | 
 | 47 | +        - pause: { duration: 10 }  | 
 | 48 | +        - setWeight: 80  | 
 | 49 | +        - pause: { duration: 10 }  | 
 | 50 | +        - setWeight: 100  | 
 | 51 | +        - setHeaderRoute:  | 
 | 52 | +            name: rollouts-demo-canary-internal # Remove internal traffic route  | 
 | 53 | +        - setHeaderRoute:  | 
 | 54 | +            name: rollouts-demo-canary-beta-customers # Remove beta-customers traffic route  | 
 | 55 | +        - pause: {} # Final sanity check on 100% traffic  | 
 | 56 | +  revisionHistoryLimit: 2  | 
 | 57 | +  selector:  | 
 | 58 | +    matchLabels:  | 
 | 59 | +      app: rollouts-demo  | 
 | 60 | +  template:  | 
 | 61 | +    metadata:  | 
 | 62 | +      labels:  | 
 | 63 | +        app: rollouts-demo  | 
 | 64 | +    spec:  | 
 | 65 | +      containers:  | 
 | 66 | +        - name: rollouts-demo  | 
 | 67 | +          image: argoproj/rollouts-demo:red  | 
 | 68 | +          ports:  | 
 | 69 | +            - name: http  | 
 | 70 | +              containerPort: 8080  | 
 | 71 | +              protocol: TCP  | 
 | 72 | +          resources:  | 
 | 73 | +            requests:  | 
 | 74 | +              memory: 32Mi  | 
 | 75 | +              cpu: 5m  | 
0 commit comments