Skip to content

Commit

Permalink
feat: docs for canary scaling up/down
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Dec 20, 2023
1 parent cd3c928 commit 2be4ac5
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 3 deletions.
43 changes: 43 additions & 0 deletions canary-checker/docs/concepts/scaling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Scaling Canaries up/down

Canaries can be scaled up or down just like other kubernetes resources. However, scaling to more than one replica is identical to having just one replica. In other words, scaling a canary can be thought of as a mechanism to turn on/off the canary.

## Example

1. List all the canaries

```bash
kubectl get canaries -o wide
# NAME REPLICAS INTERVAL STATUS LAST CHECK UPTIME 1H LATENCY 1H LAST TRANSITIONED ...
# folder-pass 1 300 Failed 34s 0/35 0% 16ms
# folder-pass-empty 1 300 Passed 34s 37/37 (100.0%) 0ms
# s3-bucket-pass 1 30 Failed 3s 0/358 0% 1s
```

2. Scale one of the canaries to 10 replicas

```bash
kubectl scale --replicas=10 canaries.canaries.flanksource.com folder-pass
# canary.canaries.flanksource.com/folder-pass scaled
```

```bash
kubectl get canaries folder-pass -o wide
# NAME REPLICAS INTERVAL STATUS LAST CHECK UPTIME 1H LATENCY 1H LAST TRANSITIONED MESSAGE ERROR
# folder-pass 10 300 Failed 3m13s 0/35 0% 16ms
```

3. Scale it down to 0 replicas

```bash
kubectl scale --replicas=0 canaries.canaries.flanksource.com folder-pass
# canary.canaries.flanksource.com/folder-pass scaled
```

```bash
kubectl get canaries folder-pass -o wide
# NAME REPLICAS INTERVAL STATUS LAST CHECK UPTIME 1H LATENCY 1H LAST TRANSITIONED MESSAGE ERROR
# folder-pass 0 300 Failed 3m13s 0/35 0% 16ms
```

This effectively stops the canary from running.
8 changes: 5 additions & 3 deletions canary-checker/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ module.exports = {
},
{
type: 'doc',

id: 'concepts/artifacts',
label: 'Artifacts',
},


{
type: 'doc',
id: 'concepts/scaling',
label: 'Scaling Canaries',
},
{
type: 'doc',
id: 'concepts/secret-management',
Expand Down

0 comments on commit 2be4ac5

Please sign in to comment.