apiVersion: core.oam.dev/v1alpha2
kind: ApplicationConfiguration
metadata:
  name: sample-application-rollout
spec:
  components:
    - revisionName: rollout-demo-app-v1
      traits:
        - trait:
            apiVersion: flagger.app/v1beta1
            kind: Canary
            metadata:
              name: rollback-demo-app
            spec:
              sourceRef:
                apiVersion: apps/v1
                kind: Deployment
                name: rollout-demo-app-v2
                namespace: default
              provider: smi
              progressDeadlineSeconds: 60
              service:
                name: rollout-demo-app
                # ClusterIP port number
                port: 80
                # container port number or name
                targetPort: 8080
              analysis:
                # schedule interval (default 60s)
                interval: 15s
                # max number of failed metric checks before rollback
                threshold: 10
                # max traffic percentage routed to canary
                # percentage (0-100)
                maxWeight: 50
                # canary increment step
                # percentage (0-100)
                stepWeight: 10
                # max replicas scale up to canary
                maxReplicas: 7