-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add option to fail audit below a certain score (#157)
update README
- Loading branch information
Bobby Brennan
authored
Jun 27, 2019
1 parent
f784c48
commit 20a6028
Showing
2 changed files
with
21 additions
and
17 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 |
---|---|---|
|
@@ -14,10 +14,13 @@ | |
[circleci-image]: https://circleci.com/gh/reactiveops/polaris.svg?style=svg | ||
[circleci-link]: https://circleci.com/gh/reactiveops/polaris.svg | ||
|
||
Polaris helps keep your cluster healthy. It runs a variety of checks to ensure that Kubernetes deployments are configured using best practices that will avoid potential problems in the future. The project includes two primary components: | ||
Polaris helps keep your cluster healthy. It runs a variety of checks to ensure that | ||
Kubernetes deployments are configured using best practices, helping you avoid | ||
problems in the future. Polaris can be run in a few different modes: | ||
|
||
- A dashboard that provides an overview of how well current deployments are configured within a cluster. | ||
- An experimental validating webhook that can prevent any future deployments that do not live up to a configured standard. | ||
- A command-line audit that can be incorporated into your CI/CD pipeline | ||
|
||
**Want to learn more?** ReactiveOps holds [office hours on Zoom](https://zoom.us/j/242508205) the first Friday of every month, at 12pm Eastern. You can also reach out via email at `[email protected]` | ||
|
||
|
@@ -115,14 +118,11 @@ polaris --audit --audit-path ./deploy/ | |
|
||
##### Running with CI/CD | ||
You can integrate Polaris into CI/CD for repositories containing infrastructure-as-code. | ||
For example, to fail whenever the Polaris score drops below 90%: | ||
For example, to fail if polaris detects *any* error-level issues, or if the score drops below 90%: | ||
```bash | ||
score=`polaris --audit --audit-path ./deploy/ --output-format score` | ||
if [[ $score -lt 90 ]]; then | ||
exit 1 | ||
else | ||
exit 0 | ||
fi | ||
polaris --audit --audit-path ./deploy/ \ | ||
--set-exit-code-on-error \ | ||
--set-exit-code-below-score 90 | ||
``` | ||
|
||
## Configuration | ||
|
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