Skip to content

Commit

Permalink
feat: Canary triggered on canary track only
Browse files Browse the repository at this point in the history
Previously the canary behaviour to disable service and ingress was
triggered on non-stable tracks. Now this behaviour is triggered
explicitly only on canary tracks.
  • Loading branch information
colinjfw committed Sep 8, 2019
1 parent d1ff905 commit 671da40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
## Example canary
If a track is chosen that is not equal to stable, this updates the helm chart
If a track is chosen that is equal to canary, this updates the helm chart
in a few ways:
1. Release name is changed to `{release}-{track}` (eg. myapp-canary).
Expand Down Expand Up @@ -108,4 +108,3 @@ jobs:
env:
KUBECONFIG_FILE: '${{ secrets.KUBECONFIG }}'
```

7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,10 @@ async function run() {
if (version) args.push(`--set=app.version=${version}`);
valueFiles.forEach(f => args.push(`--values=${f}`));

// Stable track only deploys service and ingress resources. Any other track
// name can be treated like a canary deployment.
if (track !== "stable") {
// Special behaviour is triggered if the track is labelled 'canary'. The
// service and ingress resources are disabled. Access to the canary
// deployments can be routed via the main stable service resource.
if (track === "canary") {
args.push("--set=service.enabled=false", "--set=ingress.enabled=false");
}

Expand Down

0 comments on commit 671da40

Please sign in to comment.