diff --git a/canary-rollout-ingress/analysis.yaml b/canary-rollout-ingress/analysis.yaml index 33d0a1f96b..47ebe74940 100644 --- a/canary-rollout-ingress/analysis.yaml +++ b/canary-rollout-ingress/analysis.yaml @@ -7,7 +7,7 @@ spec: metrics: - name: pass-roll-2 count: 3 - interval: 5s + interval: 20s failureLimit: 1 provider: job: @@ -21,10 +21,17 @@ spec: args: [exit 0] restartPolicy: Never backoffLimit: 0 +--- +kind: AnalysisTemplate +apiVersion: argoproj.io/v1alpha1 +metadata: + name: mixed-fail +spec: + metrics: - name: randfail - count: 1 - interval: 5s - failureLimit: 1 + count: 3 + interval: 10s + failureLimit: 3 provider: job: spec: diff --git a/canary-rollout-ingress/canary-rollout.yaml b/canary-rollout-ingress/canary-rollout.yaml index c5c821cfad..d533c25604 100644 --- a/canary-rollout-ingress/canary-rollout.yaml +++ b/canary-rollout-ingress/canary-rollout.yaml @@ -2,12 +2,19 @@ apiVersion: argoproj.io/v1alpha1 kind: Rollout metadata: name: canary-demo + labels: + sdad: sdsd spec: + progressDeadlineSeconds: 300 replicas: 2 revisionHistoryLimit: 1 strategy: canary: steps: + - setWeight: 20 + - analysis: + templates: + - templateName: mixed-fail - pause: duration: 20s - analysis: @@ -26,7 +33,7 @@ spec: spec: containers: - name: express-microservice - image: idanarbel/rollouts-demo:red + image: gcr.io/heptio-images/ks-guestbook-demo:0.1 ports: - containerPort: 3000 resources: diff --git a/helm-guestbook/templates/service.yaml b/helm-guestbook/templates/service.yaml index b7aab0ba3c..9d53151426 100644 --- a/helm-guestbook/templates/service.yaml +++ b/helm-guestbook/templates/service.yaml @@ -17,3 +17,49 @@ spec: selector: app: {{ template "helm-guestbook.name" . }} release: {{ .Release.Name }} +--- +kind: AnalysisTemplate +apiVersion: argoproj.io/v1alpha1 +metadata: + name: mixed-roll-tests +spec: + metrics: + - name: pass-roll-2 + count: 3 + interval: 20s + failureLimit: 1 + provider: + job: + spec: + template: + spec: + containers: + - name: sleep-pass + image: alpine:3.8 + command: [sh, -c] + args: [exit 0] + restartPolicy: Never + backoffLimit: 0 +--- +kind: AnalysisTemplate +apiVersion: argoproj.io/v1alpha1 +metadata: + name: mixed-fail +spec: + metrics: + - name: randfail + count: 3 + interval: 10s + failureLimit: 3 + provider: + job: + spec: + template: + spec: + containers: + - name: sleep-fail + image: alpine:3.8 + command: [sh, -c] + args: [FLIP=$(($(($RANDOM%10))%2)) && exit $FLIP] + restartPolicy: Never + backoffLimit: 0