Closed matthewbarreiro closed 3 years ago
Hi @matthewbarreiro,
Please note that in order to use helm flags you need to add --
.
Try the following:
helm datree test . -- --values my-values.yaml
Any flag used before adding --
will be sent directly into datree plugin, which is probably why you're getting the error.
You can view the usage in our docs: https://hub.datree.io/helm-plugin
yes, sorry for the typo. That being said, I am still getting errors no matter how I try to invoke the helm plugin:
Exactly as shown in your docs:
➜ ~ git clone git@github.com:datreeio/examples.git
➜ ~ helm datree test examples/helm-chart/nginx
No files detected
Error: plugin "datree" exited with error
If I cd
in and use .
I get:
➜ ~ cd examples/helm-chart/nginx
➜ nginx git:(main) helm datree test .
No files detected
Error: plugin "datree" exited with error
If I select a specific file:
➜ nginx git:(main) helm datree test Chart.yaml
>> File: /Users/matt/examples/helm-chart/nginx/Chart.yaml
[V] YAML validation
[X] Kubernetes schema validation
❌ k8s schema validation error: error while parsing: missing 'kind' key
[?] Policy check didn’t run for this file
(Summary)
- Passing YAML validation: 1/1
- Passing Kubernetes (1.20.7) schema validation: 0/1
- Passing policy check: 0/1
+-----------------------------------+----------------------------------------------------------+
| Enabled rules in policy “Default” | 30 |
| Configs tested against policy | 0 |
| Total rules evaluated | 0 |
| Total rules failed | 0 |
| Total rules passed | 0 |
| See all rules in policy | REMOVED
+-----------------------------------+----------------------------------------------------------+
Error: plugin "datree" exited with error
Note how it did not evaluate any rules. It also didn't display any issues, and I assume the example helm chart has intentional issues that are not being detected here for some reason.
Thanks
@dimabru also happening to me when I use the latest version of the plugin. an older version is working fine.
@matthewbarreiro A fix is already in the works, thanks for reporting.
Just an fyi, helm is expecting a chart folder as input and not the Chart.yaml
itself. Running helm datree test Chart.yaml
will result in datree trying to evaluate the Chart.yaml
file without helm rendering it, so the output here is valid because it was indeed not a valid k8s file :)
Describe the bug Plugin crashes with helm v3.6.2
To Reproduce
Expected behavior Datree should analyze the Helm template.
Desktop:
Datree plugin version (run
helm datree verion
):Additional context