-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using CRD resources for get commands #34
Comments
If I got your idea right, I actually thought about it when I initially wrote the tool. I didn't go as far as you have, to actually test it and check the performance. However my thought was that we anyway have to have a database of where to load the yaml files from, so why not let it (e.g, the Having said that, we can revisit the idea. So suppose if you load the CRDs from inside the must-gather, how will you tell omg where to look for yaml(s) for a specific CRD or standard resource (pod, secrets etc.) ? May be search for filenames inside the must-gather? If there is someway to address the file location problem and performance is the only issue may be we can generate the map dict at time when user runs Hmm, may be this can solve the current feature that I am contemplating on. i.e, I want to be able to provide multiple directories to omg. This would enable us to troubleshoot a custom namespace. So for example, if we are intested in a (one or more) custom projects, we can ask the user to provide must-gather + inspect of that particular namespace(s) and point omg to those (one or more) directories. And omg will combine the yamls from all directories when showing us the omg outputs. This will also address must-gathers ran with custom (e.g, service mesh etc.) images. I have done some work on this, but I stopped and was waiting to move to click before spending more time on this. If I didn't get your idea right, I apologize :) |
The CRD live in a standard location inside must-gathers, so that location could be hard-coded in omg. The location is I'll use
Yeah, that's a good idea. Caching a quick-access reference for the CRD would probably work and speed things up. The CRD shouldn't be changing on disk for a must-gather, but that's probably easy to address if it becomes a use-case (using file timestamps or something). |
Yes, I just tested that and it works great :) There's no autocomplete but I think its a worthwhile start. Having that logic run each time you hit |
Hello,
I'm curious if you can use the CRD inside of must-gathers as a source of information to complement the resource map that is manually maintained right now. The CRD contains names of resources you can
omg get
as well as the column names you would print in output.I was going to start a PR on this, but curious if you've gone through this already @kxr. A small bump in the road I have hit is that loading all the CRD is quite slow (~0.6s); that would introduce quite a bit of latency if start parsing it each
omg get
command.The text was updated successfully, but these errors were encountered: