Skip to content

Commit

Permalink
Integrate Experiments with Analysis (argoproj#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessesuen authored Oct 28, 2019
1 parent ca99e35 commit 6278c47
Show file tree
Hide file tree
Showing 59 changed files with 2,489 additions and 797 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dist/
cmd/**/debug
debug.test
coverage.out
coverage.html
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ PACKAGE=github.com/argoproj/argo-rollouts
CURRENT_DIR=$(shell pwd)
DIST_DIR=${CURRENT_DIR}/dist
PLUGIN_CLI_NAME?=kubectl-argo-rollouts
TEST_TARGET ?= ./...

VERSION=$(shell cat ${CURRENT_DIR}/VERSION)
BUILD_DATE=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand Down Expand Up @@ -80,7 +81,12 @@ lint:

.PHONY: test
test:
go test -failfast -covermode=count -coverprofile=coverage.out `go list ./...`
go test -failfast -covermode=count -coverprofile=coverage.out ${TEST_TARGET}

.PHONY: coverage
coverage: test
go tool cover -html=coverage.out -o coverage.html
open coverage.html

.PHONY: mocks
mocks:
Expand Down
3 changes: 2 additions & 1 deletion controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ func NewManager(
kubeclientset,
argoprojclientset,
replicaSetInformer,
rolloutsInformer,
experimentsInformer,
analysisRunInformer,
analysisTemplateInformer,
resyncPeriod,
rolloutWorkqueue,
experimentWorkqueue,
Expand Down
2 changes: 1 addition & 1 deletion docs/features/analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ kind: Experiment
name:
name: guestbook-6c54544bf9-0
spec:
durationSeconds: 3600
duration: 3600
templates:
- name: baseline
replicas: 1
Expand Down
10 changes: 8 additions & 2 deletions docs/features/rollout.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
minReadySeconds: 30
# The number of old ReplicaSets to retain. If unspecified, will retain 10 old ReplicaSets
revisionHistoryLimit: 3
# Indiciates if the rollout is paused
# Indicates if the rollout is paused
paused: false
# The maximum time in seconds for a rollout to make progress before it is considered to be failed. Argo Rollouts will continue to process failed rollouts and a condition with a ProgressDeadlineExceeded reason will be surfaced in the rollout status. Note that progress will not be estimated during the time a rollout is paused. Defaults to 600s.
progressDeadlineSeconds: 600
Expand Down Expand Up @@ -54,4 +54,10 @@ spec:
duration: 3600 # One hour
- setWeight: 40
# Sets .spec.paused to true and waits until the field is changed back
- pause: {}
- pause: {}
status:
pauseConditions:
- reason: StepPause
startTime: 2019-10-00T1234
- reason: BlueGreenPause
- reason: AnalysisRunInconclusive
29 changes: 12 additions & 17 deletions examples/example-experiment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,31 @@ metadata:
spec:
duration: 60
templates:
- replicas: 1
name: baseline
- name: baseline
selector:
matchLabels:
app: guestbook
version: v1
app: rollouts-demo
color: blue
template:
metadata:
labels:
app: guestbook
app: rollouts-demo
color: blue
spec:
containers:
- name: guestbook
image: gcr.io/heptio-images/ks-guestbook-demo:0.1
ports:
- containerPort: 80
- replicas: 1
name: canary
image: argoproj/rollouts-demo:blue
- name: canary
selector:
matchLabels:
app: guestbook
version: v2
app: rollouts-demo
color: yellow
template:
metadata:
labels:
app: guestbook
version: v2
app: rollouts-demo
color: yellow
spec:
containers:
- name: guestbook
image: gcr.io/heptio-images/ks-guestbook-demo:0.2
ports:
- containerPort: 80
image: argoproj/rollouts-demo:yellow
3 changes: 1 addition & 2 deletions examples/example-rollout-bluegreen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ spec:
spec:
containers:
- name: guestbook
# The image below can be flip from 0.1 to 0.2
image: gcr.io/heptio-images/ks-guestbook-demo:0.1
image: argoproj/rollouts-demo:blue
ports:
- containerPort: 80
minReadySeconds: 30
Expand Down
3 changes: 1 addition & 2 deletions examples/example-rollout-canary-run-tmp-canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ spec:
spec:
containers:
- name: guestbook
# The image below can be flip from 0.1 to 0.2
image: gcr.io/heptio-images/ks-guestbook-demo:0.1
image: argoproj/rollouts-demo:blue
ports:
- containerPort: 80
minReadySeconds: 30
Expand Down
5 changes: 2 additions & 3 deletions examples/example-rollout-canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ spec:
replicas: 5
selector:
matchLabels:
app: guestbook
app: rollout
template:
metadata:
labels:
app: guestbook
spec:
containers:
- name: guestbook
# The image below can be flip from 0.1 to 0.2
image: gcr.io/heptio-images/ks-guestbook-demo:0.1
image: argoproj/rollouts-demo:blue
ports:
- containerPort: 80
minReadySeconds: 30
Expand Down
3 changes: 1 addition & 2 deletions examples/example-rollout-rolling-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ spec:
spec:
containers:
- name: guestbook
# The image below can be flip from 0.1 to 0.2
image: gcr.io/heptio-images/ks-guestbook-demo:0.1
image: argoproj/rollouts-demo:blue
ports:
- containerPort: 80
minReadySeconds: 30
Expand Down
Loading

0 comments on commit 6278c47

Please sign in to comment.