Code Monkey home page Code Monkey logo

Comments (4)

dimabru avatar dimabru commented on June 27, 2024

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

from helm-datree.

matthewbarreiro avatar matthewbarreiro commented on June 27, 2024

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 [email protected]: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

from helm-datree.

eyarz avatar eyarz commented on June 27, 2024

@dimabru also happening to me when I use the latest version of the plugin.
an older version is working fine.

from helm-datree.

dimabru avatar dimabru commented on June 27, 2024

@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 :)

from helm-datree.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.