Comments (7)
This looks good, so the final commands will look something like:
karmor logs --output json
karmor logs --output pretty-json
karmor logs --output text
The --json
flag will still be present:
karmor logs --json
And the normal log output:
karmor logs
Right?
from kubearmor-client.
Hi, @navin772 ! Can I work on this enhancement?
from kubearmor-client.
This sounds good to me. Though users can use external tools like jq for beautifying but having the ability to do so in karmor itself might come in handy if user doesn't have the tools present.
IMO We can keep the default output as non-beautified and have a --beautify
flag which will pretty-print the JSON.
cc @daemon1024 @kranurag7
from kubearmor-client.
Yes... let's keep the current output and also the --json
flag. We can add an --output
/-o
flag:
--output json
- plain json
--output pretty-json
- beautified json
--output text
- usual text output
from kubearmor-client.
Agree with Rudraksh here, We also ingest these logs to some logging solutions which will prefer the default that we have now.
For flag I think we can go for something like --format
and --output
with value of jsonindent
or similar something. With this, we can support multiple values in future if required like yaml, table etc. that we have with other CLIs.
from kubearmor-client.
Don't remove --json
that would be a breaking change and we should avoid that.
Adding another value to the flag would be ideal I think.
Edit: We can discuss more on if jsonindent is the name we prefer because it doesn't sound intuitive in my head.
from kubearmor-client.
So, the final command will look something like karmor logs --output jsonindent
replacing the --json
flag completely?
This will require a docs update as --json
flag is used widely. Thoughts?
from kubearmor-client.
Related Issues (20)
- [Bug] Karmor logs sometimes not showing syscall events HOT 1
- [feat] Improving Broken-link-check scope HOT 3
- Update Long description for karmor install HOT 3
- `--save` command is broken in karmor profile HOT 2
- karmor probe panic HOT 4
- `karmor install --env=generic --save` should work without kubernetes cluster access HOT 4
- karmor install percentage completion showing more than 100% HOT 4
- update `karmor install` to deploy kubearmor-relay sa and associated rbac policies for kubearmor relay HOT 4
- Running karmor probe on operator installation throws incorrect posture values HOT 7
- Karmor probe not showing armored pods
- add instructions to verify the tarballs using cosign HOT 3
- Install karmor without `sudo` HOT 4
- fix scorecard github action HOT 2
- fix renovate go.sum updates HOT 2
- `karmor uninstall` should remove annotations/policies by default HOT 1
- Improve `karmor probe` error handling HOT 1
- `karmor sysdump` should contain logs from all pods with `kubearmor-app` label HOT 1
- Show current status of daemonset in `karmor install` HOT 3
- `karmor recommend` doesn't recommend all expected policies with Docker v26 HOT 1
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 kubearmor-client.