|
1 | 1 | apiVersion: argoproj.io/v1alpha1
|
2 |
| -kind: AnalysisTemplate |
3 |
| -metadata: |
4 |
| - name: success-rate-pre ######## pre-promotion-analysis |
5 |
| -spec: |
6 |
| - args: |
7 |
| - - name: service-port |
8 |
| - value: "5000" |
9 |
| - - name: service-namespace |
10 |
| - metrics: |
11 |
| - - name: success-rate-pre |
12 |
| - provider: |
13 |
| - job: |
14 |
| - metadata: |
15 |
| - labels: |
16 |
| - analysis: pre-promotion # labels defined here will be copied to the Job object |
17 |
| - spec: |
18 |
| - backoffLimit: 0 |
19 |
| - template: |
20 |
| - spec: |
21 |
| - containers: |
22 |
| - - name: success-rate-pre |
23 |
| - image: analysis ##### this is the same image that we built to get success_rate . you can find related files (Dockerfile, app-success-rate.sh) in the current directory |
24 |
| - imagePullPolicy: Never |
25 |
| - env: |
26 |
| - - name: service_url |
27 |
| - value: "http://rollout-bluegreen-preview.{{args.service-namespace}}.svc.cluster.local:{{args.service-port}}" |
28 |
| - command: ["/bin/bash", "-c"] |
29 |
| - args: |
30 |
| - - ./app-success-rate.sh |
31 |
| - restartPolicy: Never |
32 |
| ---- |
33 |
| -apiVersion: argoproj.io/v1alpha1 |
34 |
| -kind: AnalysisTemplate |
35 |
| -metadata: |
36 |
| - name: success-rate-post ######## post-promotion-analysis |
37 |
| -spec: |
38 |
| - args: |
39 |
| - - name: service-port |
40 |
| - value: "5000" |
41 |
| - - name: service-namespace |
42 |
| - metrics: |
43 |
| - - name: success-rate-post |
44 |
| - provider: |
45 |
| - job: |
46 |
| - metadata: |
47 |
| - labels: |
48 |
| - analysis: post-promotion # labels defined here will be copied to the Job object |
49 |
| - spec: |
50 |
| - backoffLimit: 0 |
51 |
| - template: |
52 |
| - spec: |
53 |
| - containers: |
54 |
| - - name: success-rate-post |
55 |
| - image: analysis |
56 |
| - imagePullPolicy: Never |
57 |
| - env: |
58 |
| - - name: service_url |
59 |
| - value: "http://rollout-bluegreen-active.{{args.service-namespace}}.svc.cluster.local:{{args.service-port}}" |
60 |
| - command: ["/bin/bash", "-c"] |
61 |
| - args: |
62 |
| - - ./app-success-rate.sh |
63 |
| - restartPolicy: Never |
64 |
| ---- |
65 |
| -apiVersion: argoproj.io/v1alpha1 |
66 | 2 | kind: Rollout
|
67 | 3 | metadata:
|
68 | 4 | name: blue-green-deployment
|
@@ -90,18 +26,18 @@ spec:
|
90 | 26 | activeService: rollout-bluegreen-active
|
91 | 27 | previewService: rollout-bluegreen-preview
|
92 | 28 | autoPromotionEnabled: true
|
93 |
| - prePromotionAnalysis: |
| 29 | + prePromotionAnalysis: #### Pre-Promotion Analysis |
94 | 30 | templates:
|
95 | 31 | - templateName: success-rate-pre
|
96 | 32 | args:
|
97 | 33 | - name: service-namespace
|
98 | 34 | value: blue-green
|
99 |
| - postPromotionAnalysis: |
100 |
| - templates: |
101 |
| - - templateName: success-rate-post |
102 |
| - args: |
103 |
| - - name: service-namespace |
104 |
| - value: blue-green |
| 35 | + # postPromotionAnalysis: #### Post-Promotion Analysis |
| 36 | + # templates: |
| 37 | + # - templateName: success-rate-post |
| 38 | + # args: |
| 39 | + # - name: service-namespace |
| 40 | + # value: blue-green |
105 | 41 | # abortScaleDownDelaySeconds: 10
|
106 | 42 | # scaleDownDelaySeconds: 60
|
107 | 43 | # previewReplicaCount: 2
|
|
0 commit comments