Comments (3)
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.
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.
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)
- Multi Tenant Shared EKS cluster HOT 3
- Entries appear that are not in config HOT 5
- Multiple additional kinds of the same resource are not respected HOT 2
- Failure to retrieve AKS cluster resources - kubelogin not found HOT 1
- PodSecurityPolicy Deprecation Not Detected HOT 4
- Skip already removed APIs HOT 2
- Add FAQ explaining potential false positives HOT 7
- Depreciation api call triggered in the kubernetes migration notification window HOT 2
- New release HOT 3
- Missing kubectl.kubernetes.io/last-applied-configuration Annotation in Kubernetes Resources and Inclusion in kubectl Reports HOT 2
- WRN failed to discover supported resources for policy/v1beta1 HOT 3
- Feature request - validate helm charts HOT 2
- kubeconfig context feature does not work in 0.7.1 version HOT 1
- Autofix using a --fix or --autofix flag HOT 2
- Distinguish between deprecated / removed apis in CI mode error code HOT 2
- Kubent cause AWS EKS upgrade warning HOT 4
- Helm charts scanning for deprecated APIs HOT 2
- Missing kubernetes 1.28 deprecations HOT 3
- Unable to give multiple manifest files for scanning HOT 3
- [BUG] Kubent reports updated manifests as outdated if their last applied configuration is outdated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kube-no-trouble.