-
Notifications
You must be signed in to change notification settings - Fork 346
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
Proposal and docs for changes to snapshot layout #43
Conversation
d767ff3
to
22c16af
Compare
@kensimon I have some screenshots that I think makes this info easier to digest, e.g. see below for Once the structure is nailed down, let me know if you think these are helpful to incorporate. I can push them onto this branch if that's easiest. ^also, will we be unzipping nested tarballs? |
Sure, screenshots would be awesome. Up to you if you want to put them before or after we merge... I think so long as it's clear the document is a work-in-progress we can merge early and often on this one. The tar-within-tar problem will be fixed in a separate PR, I think we can update the documentation then, although I don't think the docs will have to change. Reason being: I think the fix for plugins that send tarfiles will be to implicitly extract them before putting them in the main tarball... that way, for someone consuming a sonobuoy snapshot, they'll never see a nested tarball in the first place (thus it's probably fine that the docs don't mention them.) |
d8ecef4
to
1456b81
Compare
Makes sense! (re the tar-within-tar) |
@timothysc if you're happy with this, feel free to approve (or just merge), I think we can iterate more if there's feedback. I have another PR that implements these changes too, but I'll wait for us to have a consensus on this first. |
@kensimon Let's give this some time for other folks and I'll send out an email too. |
The `/resources` directory contains JSON-serialized Kubernetes objects, taken from querying the Kubernetes REST API. The directory has the following structure: | ||
|
||
- `/resources/ns/<namespace>/<type>.json` - For all resources that belong to a namespace, where `<namespace>` is the namespace of that resource (eg. `kube-system`), and `<type>` is the type of resource, pluralized (eg. `Pods`). | ||
- `/resources/cluster/<type>.json` - For all resources that don't belong to a namespace, where `<type>` is the type of resource, pluralized (eg. `Nodes`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your image shows non-ns vs. cluster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
The `/meta` directory contains metadata about this Sonobuoy run, including configuration and query runtime. | ||
|
||
- `/meta/query-time.json` - Contains metadata about how long each query took, example: `{"queryobj":"Pods","time":12.345ms"}` | ||
> NOTE: this file is currently distributed throughout the tarball in `/resources/.../results.json`. Proposal is to move it here, and create other `.json` files under `/meta` if we start capturing other things than query time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll have to see if this is problematic or not.
|
||
### /serverversion.json | ||
|
||
> NOTE: this is currently `/serverversion/serverversion.json`, proposal here is to just make it `/serverversion.json` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not cluster ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm , we may need to revise as we implement b/c it may not be worth the effort to shuffle some things around, we'll have to see.
@kensimon or @abiogenesis-now feel free to rebase then merge. |
f104d4c
to
52867e2
Compare
This functions as both a proposal for how the snapshot tarballs should be structured, as well as documentation for that structure. Places with a "NOTE:" section are places where changes are proposed. Signed-off-by: Ken Simon <[email protected]>
52867e2
to
d9c0681
Compare
FYI added the snapshot file to the docs table-of-contents |
This shifts some of the layout based on the doc changes in vmware-tanzu#43. Also adds some docs explaining the auto-extraction of plugin tar files Signed-off-by: Ken Simon <[email protected]>
This shifts some of the layout based on the doc changes in vmware-tanzu#43. Also adds some docs explaining the auto-extraction of plugin tar files Changes: - Pod logs moved to `/podlogs` inside the tarball - Query times moved to `/meta/query-time.json` instead of dispersed throughout `/resources/**/results.json` - `/resources/non-ns` is now `/resources/cluster` - `/config.json` is now `/meta/config.json` Signed-off-by: Ken Simon <[email protected]>
This shifts some of the layout based on the doc changes in vmware-tanzu#43. Also adds some docs explaining the auto-extraction of plugin tar files Changes: - Pod logs moved to `/podlogs` inside the tarball - Query times moved to `/meta/query-time.json` instead of dispersed throughout `/resources/**/results.json` - `/resources/non-ns` is now `/resources/cluster` - `/config.json` is now `/meta/config.json` Signed-off-by: Ken Simon <[email protected]>
Proposal and docs for changes to snapshot layout Signed-off-by: Jesse Hamilton [email protected]
This shifts some of the layout based on the doc changes in vmware-tanzu#43. Also adds some docs explaining the auto-extraction of plugin tar files Changes: - Pod logs moved to `/podlogs` inside the tarball - Query times moved to `/meta/query-time.json` instead of dispersed throughout `/resources/**/results.json` - `/resources/non-ns` is now `/resources/cluster` - `/config.json` is now `/meta/config.json` Signed-off-by: Ken Simon <[email protected]> Signed-off-by: Jesse Hamilton [email protected]
Proposal and docs for changes to snapshot layout Signed-off-by: Jesse Hamilton [email protected] Signed-off-by: Jesse Hamilton [email protected]
This shifts some of the layout based on the doc changes in vmware-tanzu#43. Also adds some docs explaining the auto-extraction of plugin tar files Changes: - Pod logs moved to `/podlogs` inside the tarball - Query times moved to `/meta/query-time.json` instead of dispersed throughout `/resources/**/results.json` - `/resources/non-ns` is now `/resources/cluster` - `/config.json` is now `/meta/config.json` Signed-off-by: Ken Simon <[email protected]> Signed-off-by: Jesse Hamilton [email protected] Signed-off-by: Jesse Hamilton [email protected]
This functions as both a proposal for how the snapshot tarballs should
be structured, as well as documentation for that structure.
Places with a "NOTE:" section are places where changes are proposed.