-
Notifications
You must be signed in to change notification settings - Fork 904
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Failed analysis to degrade rollout when multiple metrics are ana…
…lyzed (#1535) * fix: analysis fail for inline multi metric analysis Signed-off-by: hari rongali <[email protected]> * fix: cleanup Signed-off-by: hari rongali <[email protected]>
- Loading branch information
1 parent
1ea418d
commit 26433be
Showing
4 changed files
with
106 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
test/e2e/functional/analysistemplate-fail-multiple-job.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# AnalysisTemplate which sleeps for a specified duration and exits with a specified exit-code | ||
kind: AnalysisTemplate | ||
apiVersion: argoproj.io/v1alpha1 | ||
metadata: | ||
name: multiple-job-fail | ||
spec: | ||
args: | ||
- name: duration | ||
value: 0s | ||
- name: exit-code | ||
value: "0" | ||
- name: count | ||
value: "1" | ||
metrics: | ||
- name: sleep-job | ||
initialDelay: 10000s | ||
count: 1 | ||
provider: | ||
job: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: sleep-job | ||
image: nginx:1.19-alpine | ||
command: [sh, -c, -x] | ||
args: ["sleep {{args.duration}} && exit {{args.exit-code}}"] | ||
restartPolicy: Never | ||
backoffLimit: 0 | ||
- name: sleep-job-rep | ||
count: 2 | ||
interval: 1s | ||
failureLimit: 1 | ||
provider: | ||
job: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: sleep-job | ||
image: nginx:1.19-alpine | ||
command: [sh, -c, -x] | ||
args: ["sleep {{args.duration}} && exit 1"] | ||
restartPolicy: Never | ||
backoffLimit: 0 |
28 changes: 28 additions & 0 deletions
28
test/e2e/functional/rollout-degraded-inline-multiple-analysis.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Rollout | ||
metadata: | ||
name: rollout-inline-analysis | ||
spec: | ||
strategy: | ||
canary: | ||
steps: | ||
- setWeight: 10 | ||
- pause: {} | ||
- analysis: | ||
templates: | ||
- templateName: multiple-job-fail | ||
selector: | ||
matchLabels: | ||
app: rollout-inline-analysis | ||
template: | ||
metadata: | ||
labels: | ||
app: rollout-inline-analysis | ||
spec: | ||
containers: | ||
- name: rollouts-demo | ||
image: nginx:1.19-alpine | ||
resources: | ||
requests: | ||
memory: 16Mi | ||
cpu: 5m |