Giter VIP home page Giter VIP logo

Comments (3)

stepanstipl avatar stepanstipl commented on July 25, 2024 1

This was closed via #49, -e flag will now make kubent to return non-zero (200) exit code in case issues are found. Also Use in CI section was added to the docs mentioning this new flag and some other examples. Finally, we've added tests to make sure the error-code behaviour is as expected and will stay so. 🚀 . Thanks @estahn and @Djiit for you input on the topic! 👍

(This is now only in master, but I expect to cut a new release probably early next week).

from kube-no-trouble.

stepanstipl avatar stepanstipl commented on July 25, 2024

Thanks @estahn, this is good suggestion. I was thinking about this earlier, and initially decided to reserve non-zero return codes to actual failure - ie. if there's an error.

It should be fairly simple to do basic test in CI, as "log" outputs go to stderr, and only findings go to stdout. Following should give you the non-zero if there are any findings:

test -z "$(kubent)"

Would that cover your use case?

There's also json output mode (-o json) that should allow for amore convenient further processing of results.

Alternatively, what behaviour would you expect in terms of differentiating between error and deprecated resources found?

from kube-no-trouble.

Djiit avatar Djiit commented on July 25, 2024

FWIW, Trivy has this exit-code parameter (https://github.com/aquasecurity/trivy#specify-exit-code). The default is 0, but you can tell Trivy to return 1 (or whatever) if it makes sense. If a real error is encountered, this parameter is ignored.

from kube-no-trouble.

Related Issues (20)

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.