zegl / kube-score

Kubernetes object analysis with recommendations for improved reliability and security. kube-score actively prevents downtime and bugs in your Kubernetes YAML and Charts. Static code analysis for Kubernetes.
https://kube-score.com
MIT License
2.68k stars 175 forks source link

how to run kube-score in "report" mode ? returning exit-code 0 regardless of the issues discovered #466

Closed rvillane closed 2 years ago

rvillane commented 2 years ago

Hi, how can I run kube-score to always return exit code 0 regardless of the issues discovered while scanning YAML files?

I'm planning to add kube-score as a quality gate in a CI/CD pipeline and run it in "report" mode, just informing users about issues but without breaking the pipeline execution during some time, and then enforce the validations.

thanks

zegl commented 2 years ago

This is something that your shell can do, so I don't think that it's worth adding to kube-score directly.

If you're using bash, it's as easy as running kube-score ... || true, and the command will always exit 0.