-
Notifications
You must be signed in to change notification settings - Fork 888
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
get/retry experiment
commands. Support experiment retries
- Loading branch information
Showing
25 changed files
with
1,087 additions
and
504 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# This file contains AnalysisTemplates referenced by Rollouts and Experiments in the examples. | ||
# Please apply this file first, before running any of the examples. | ||
|
||
--- | ||
# This AnalysisTemplate will run a Kubernetes Job every 5 seconds that succeeds. | ||
kind: AnalysisTemplate | ||
apiVersion: argoproj.io/v1alpha1 | ||
metadata: | ||
name: pass | ||
spec: | ||
metrics: | ||
- name: pass | ||
interval: 5 | ||
maxFailures: 1 | ||
provider: | ||
job: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: sleep | ||
image: alpine:3.8 | ||
command: [sh, -c] | ||
args: [exit 0] | ||
restartPolicy: Never | ||
backoffLimit: 0 | ||
|
||
--- | ||
# This AnalysisTemplate will run a Kubernetes Job every 5 seconds, with a 50% chance of failure. | ||
# When the number of accumulated failures exceeds maxFailures, it will cause the analysis run to | ||
# fail, and subsequently cause the rollout or experiment to abort. | ||
kind: AnalysisTemplate | ||
apiVersion: argoproj.io/v1alpha1 | ||
metadata: | ||
name: random-fail | ||
spec: | ||
metrics: | ||
- name: random-fail | ||
interval: 5 | ||
maxFailures: 1 | ||
provider: | ||
job: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: sleep | ||
image: alpine:3.8 | ||
command: [sh, -c] | ||
args: [FLIP=$(($(($RANDOM%10))%2)) && exit $FLIP] | ||
restartPolicy: Never | ||
backoffLimit: 0 |
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,43 @@ | ||
# This example demonstrates an experiment which starts two ReplicaSets with different images, and | ||
# additionally starts an AnalysisRun in the background | ||
# | ||
# Prerequisites: | ||
# * kubectl apply -f analysis-templates.yaml | ||
# | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Experiment | ||
metadata: | ||
name: experiment-with-analysis | ||
spec: | ||
templates: | ||
- name: purple | ||
selector: | ||
matchLabels: | ||
app: rollouts-demo | ||
template: | ||
metadata: | ||
labels: | ||
app: rollouts-demo | ||
spec: | ||
containers: | ||
- name: rollouts-demo | ||
image: argoproj/rollouts-demo:purple | ||
imagePullPolicy: Always | ||
- name: orange | ||
selector: | ||
matchLabels: | ||
app: rollouts-demo | ||
template: | ||
metadata: | ||
labels: | ||
app: rollouts-demo | ||
spec: | ||
containers: | ||
- name: rollouts-demo | ||
image: argoproj/rollouts-demo:orange | ||
imagePullPolicy: Always | ||
analyses: | ||
- name: random-fail | ||
templateName: random-fail | ||
- name: pass | ||
templateName: pass |
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
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
Oops, something went wrong.