-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Qing Ye
committed
Sep 25, 2021
1 parent
d9f6f41
commit f8bbb47
Showing
4 changed files
with
32 additions
and
12 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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
builds: | ||
- main: main.go | ||
binary: helm3-monitor | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- darwin | ||
- linux | ||
|
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 |
---|---|---|
@@ -1,3 +1,21 @@ | ||
# helm3-monitor | ||
Monitor K8S Helm3 release, rollback on Prometheus query | ||
# Helm3 Monitor Plugin | ||
|
||
Monitor a Helm3 release, rollback to a previous version depending on the result of a PromQL (Prometheus) query result | ||
|
||
## Install | ||
|
||
```shell | ||
> helm plugin install https://github.com/yq314/helm3-monitor | ||
``` | ||
|
||
## Usage | ||
|
||
A rollback happen only if the number of result from the query is greater than 0. | ||
|
||
You can find a step-by-step example in the ./examples directory. | ||
|
||
```shell | ||
> helm monitor prometheus --prometheus=http://prometheus:9090 \ | ||
<release_name> \ | ||
'rate(http_requests_total{statusClass!="2XX"}[5m]) / rate(http_requests_total[5m]) > 0.01' | ||
``` |
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