operator-controller
operator-controller copied to clipboard
Adds a utility to make an "ownership tree" like an ls-tree for a k8s namespace
Also allows to store a state "fingerprint" based on getting the YAML for each resource in the tree and prompting an LLM for what is wrong with the ClusterExtension install.
commands are:
hack/tools/ownership_tree.py <namespace>
prints an lstree style list of the resources found in the namespace
hack/tools/ownership_tree.py <namespace> --no-events
same as w/ no flags, but Event resources are not shown
hack/tools/ownership_tree.py <namespace> --with-event-info
same as w/ no flags, but Event resources messages are also shown
hack/tools/ownership_tree.py <namespace> --gather-cluster-extension-state
same as w/ no flags, but also a "fingerprint" is created from getting all the YAML for the each resource in the tree, file is JSON and will have the name: <namespace>-state.json
hack/tools/ownership_tree.py <namespace> --prompt
same as with --gather-cluster-extension-state flag set, but the "fingerprint" is created and sent as part of a prompt to an LLM for diagnosis of ClusterExtension problems.