Comments (5)
I think that's the logic I wrote down.
👍 pre-coffee parsing never works for me. Thanks for the input!
from kail.
Hi @rcoup, thanks for the input!
I agree that the kube-system
ns is distracting. That being said, kail
is meant to be a simple "just give me the damn logs" utility; kubectl
's --all-namespaces
is particularly annoying to me.
I think something like the following would be a reasonable approach:
- Ignore system namespaces: Add an
--ignore-ns=...
flag that defaults to (kube-system
). Similar to the current--ignore
flag. - Use "current" namespace: Add
--current-ns=true|false
flag. - Collect
--ignore-ns
,--current-ns
,--ns
, etc... values from environment variables.
Let me know if you have any thoughts on this.
Currently, --ns matches all namespaces, and --ns= matches nothing.
Thanks for pointing that out, these should have the same behavior.
from kail.
We mostly use namespaces for logical app separation, so (virtually) everything relevant is in the same namespace. But I guess that can be different for everyone.
I'm not that keen on another flag for --current-ns
. But everything is additive, I'd forgotten that, which would make a bare --ns
trickier to implement. 👍
So:
kail
-> {$all}-{$ignored}kail --ns=foo
-> {foo}kail --ns=foo --ns=bar
-> {foo} + {bar}kail --current-ns
-> {$current}kail --current-ns --ns=foo
-> {foo} + {$current}--ignore-ns
setting would only be used when--ns
or--current-ns
aren't specified (can't see it helps any other approach?)
from kail.
I'm not that keen on another flag for --current-ns.
Me neither, but if it's easy to use and not confusing, I'd go for it. At the end of the day, this can all be done with scripting, but it's nice to have some things baked in instead of this:
alias kailc='kail --ns $(kubectl config view -o jsonpath="{.contexts[?(.name==\"$(kubectl config current-context)\")].context.namespace}") '
I frankly don't even know if it's possible to get the current namespace from client-go
--ignore-ns setting would only be used when --ns or --current-ns aren't specified (can't see it helps any other approach?)
I was thinking it'd default to kube-system
. It can be disabled by making it empty; --ns
and --current-ns
could have precedence over it too I guess. It helps because I don't think many people want to see the kube-system
logs.
from kail.
It can be disabled by making it empty; --ns and --current-ns could have precedence over it too I guess.
I think that's the logic I wrote down? If you specify ns/current-ns then you don't get "all" anymore, and anything you do specify should override the ignore list anyway.
from kail.
Related Issues (20)
- Feature request: --follow=false HOT 2
- Advantages over stern?
- Support regular expression or auto completion?
- Release? DNS on macOS with VPNs doesn't work HOT 1
- not able to get logs of two pods
- Running Kail without cluster role
- Feature: ARM64 builds HOT 11
- Add support proxy-url from config
- Homebrew: Calling `bottle :unneeded` is deprecated HOT 3
- Become a Krew extension HOT 3
- arm64 support in krew HOT 6
- Allow not printing prefix HOT 1
- Release of sts support HOT 1
- Plans for a Windows binary? HOT 8
- RBAC HOT 1
- missing example of ignore HOT 1
- Access issue in release github action, failing to update homebrew-repo kail.rb
- brew error: SHA256 mismatch HOT 4
- Update link for `minikube` HOT 1
- Feature request: automatically reconnect 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 kail.