Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Experiments with Analysis #210

Merged
merged 14 commits into from
Oct 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm excited to start using this!

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