Documentation ¶
Index ¶
- Constants
- func FilterNamespaces(kubeClient kubernetes.Interface, filter string) []string
- func QueryClusterResources(kubeClient kubernetes.Interface, cfg *config.Config) error
- func QueryNSResources(kubeClient kubernetes.Interface, ns string, cfg *config.Config) error
- func Run(kubeClient kubernetes.Interface, cfg *config.Config) (errCount uint)
- func SerializeArrayObj(objs []interface{}, outpath string, file string) error
- func SerializeObj(obj interface{}, outpath string, file string) error
- func SerializeObjAppend(f *os.File, obj interface{}) error
- type ObjQuery
- type UntypedListQuery
- type UntypedQuery
Constants ¶
const ( // NSResourceLocation is the place under which namespaced API resources (pods, etc) are stored NSResourceLocation = "resources/ns" // NonNSResourceLocation is the place under which non-namespaced API resources (nodes, etc) are stored NonNSResourceLocation = "resources/non-ns" // HostsLocation is the place under which host information (configz, healthz) is stored HostsLocation = "hosts" )
const ( // PodsLocation is the location within the results tarball where pod // information is stored. PodsLocation = "pods" )
Variables ¶
This section is empty.
Functions ¶
func FilterNamespaces ¶
func FilterNamespaces(kubeClient kubernetes.Interface, filter string) []string
FilterNamespaces filter the list of namespaces according to the filter string
func QueryClusterResources ¶
func QueryClusterResources(kubeClient kubernetes.Interface, cfg *config.Config) error
QueryClusterResources queries non-namespace resources in the cluster, writing them out to <resultsdir>/resources/non-ns/*.json TODO: Eliminate dependencies from config.Config and pass in data
func QueryNSResources ¶
QueryNSResources will query namespace-specific resources in the cluster, writing them out to <resultsdir>/resources/ns/<ns>/*.json TODO: Eliminate dependencies from config.Config and pass in data
func Run ¶
func Run(kubeClient kubernetes.Interface, cfg *config.Config) (errCount uint)
Run is the main entrypoint for discovery
func SerializeArrayObj ¶
SerializeArrayObj will write out an array of object
func SerializeObj ¶
SerializeObj will write out an object
func SerializeObjAppend ¶
SerializeObjAppend will serialize an object and append to the end of file
Types ¶
type UntypedListQuery ¶
type UntypedListQuery func() ([]interface{}, error)
UntypedListQuery is a query function that return an untyped array of objs
type UntypedQuery ¶
type UntypedQuery func() (interface{}, error)
UntypedQuery is a query function that return an untyped array of objs