Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/instrumenta/helm-conftest
A Helm plugin for testing Helm Charts using Open Policy Agent
https://github.com/instrumenta/helm-conftest
conftest helm helm-plugin instrumenta openpolicyagent
Last synced: about 2 months ago
JSON representation
A Helm plugin for testing Helm Charts using Open Policy Agent
- Host: GitHub
- URL: https://github.com/instrumenta/helm-conftest
- Owner: instrumenta
- License: other
- Created: 2019-07-21T11:31:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-09-05T03:35:24.000Z (over 2 years ago)
- Last Synced: 2024-04-21T05:33:22.330Z (9 months ago)
- Topics: conftest, helm, helm-plugin, instrumenta, openpolicyagent
- Language: Shell
- Size: 9.77 KB
- Stars: 66
- Watchers: 4
- Forks: 16
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Conftest Helm plugin
A [Helm](https://helm.sh/) plugin for testing Helm charts with Open Policy Agent, using [conftest](https://github.com/instrumenta/conftest).
## Installation
Install the plugin using the built-in plugin manager.
```
helm plugin install https://github.com/instrumenta/helm-conftest
```## Usage
Assuming you have policy defined in the `policy` folder, you can point the plugin at your chart.
```
$ helm conftest .
FAIL - release-name-mysql must include Kubernetes recommended labels: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels
Error: plugin "conftest" exited with error
```Conftest has a number of flags which can alter it's behaviour, from changing the output formatting to
specifying where to find the policy files. Conftest options are automatically passed to Conftest,
with any other options being passed to Helm in the same way as `helm template`. This means you
could set values before validating the chart. eg.```
helm conftest charts/stable/nginx-ingress --set controller.image.tag=latest
```## Docker
The Helm Conftest plugin is also available as a standalone Docker image. Simply mount your Chart source
code at `/chart` and include the `policy` dirctory along with your chart and run:```
docker run --rm -it -v $(pwd)/snyky:/chart instrumenta/helm-conftest
```