Documentation ¶
Index ¶
- Constants
- func FilterNamespaces(kubeClient kubernetes.Interface, filter string) ([]string, error)
- func QueryHostData(kubeClient kubernetes.Interface, recorder *QueryRecorder, cfg *config.Config) error
- func QueryPodLogs(kubeClient kubernetes.Interface, recorder *QueryRecorder, ns string, ...) error
- func QueryResources(client *dynamic.APIHelper, recorder *QueryRecorder, ...) error
- func QueryServerData(kubeClient kubernetes.Interface, recorder *QueryRecorder, cfg *config.Config) error
- func Run(restConf *rest.Config, cfg *config.Config) (errCount int)
- func SerializeObj(obj interface{}, outpath string, file string) error
- type QueryData
- type QueryRecorder
Constants ¶
const ( // NSResourceLocation is the place under which namespaced API resources (pods, etc) are stored NSResourceLocation = "resources/ns" // ClusterResourceLocation is the place under which non-namespaced API resources (nodes, etc) are stored ClusterResourceLocation = "resources/cluster" // HostsLocation is the place under which host information (configz, healthz) is stored HostsLocation = "hosts" // MetaLocation is the place under which snapshot metadata (query times, config) is stored MetaLocation = "meta" )
const ( // PodLogsLocation is the location within the results tarball where pod // information is stored. PodLogsLocation = "podlogs" )
Variables ¶
This section is empty.
Functions ¶
func FilterNamespaces ¶
func FilterNamespaces(kubeClient kubernetes.Interface, filter string) ([]string, error)
FilterNamespaces filter the list of namespaces according to the filter string
func QueryHostData ¶ added in v0.14.2
func QueryHostData(kubeClient kubernetes.Interface, recorder *QueryRecorder, cfg *config.Config) error
QueryHostData gets the host data and records it.
func QueryPodLogs ¶ added in v0.14.2
func QueryPodLogs(kubeClient kubernetes.Interface, recorder *QueryRecorder, ns string, cfg *config.Config) error
QueryPodLogs gets the pod logs for each pod in the given namespace.
func QueryResources ¶ added in v0.14.2
func QueryResources( client *dynamic.APIHelper, recorder *QueryRecorder, resources []schema.GroupVersionResource, ns *string, cfg *config.Config) error
QueryResources will query all the intended resources. If given a non-nil namespace it queries only namespaced objects; non-namespaced otherwise. Writing them out to <resultsdir>/resources/ns/<ns>/*.json or <resultsdir>/resources/cluster/*.json.
func QueryServerData ¶ added in v0.14.2
func QueryServerData(kubeClient kubernetes.Interface, recorder *QueryRecorder, cfg *config.Config) error
QueryServerData gets the server version and server group data and records it.
func SerializeObj ¶
SerializeObj will write out an object
Types ¶
type QueryData ¶ added in v0.11.0
type QueryData struct { QueryObj string `json:"queryobj,omitempty"` Namespace string `json:"namespace,omitempty"` ElapsedTime string `json:"time,omitempty"` Error error `json:"error,omitempty"` }
QueryData captures the results of the run for post-processing
type QueryRecorder ¶ added in v0.9.0
type QueryRecorder struct {
// contains filtered or unexported fields
}
QueryRecorder records a sequence of queries
func NewQueryRecorder ¶ added in v0.9.0
func NewQueryRecorder() *QueryRecorder
NewQueryRecorder returns a new empty QueryRecorder
func (*QueryRecorder) DumpQueryData ¶ added in v0.9.0
func (q *QueryRecorder) DumpQueryData(filepath string) error
DumpQueryData writes query information out to a file at the give filepath
func (*QueryRecorder) RecordQuery ¶ added in v0.9.0
func (q *QueryRecorder) RecordQuery(name string, namespace string, duration time.Duration, recerr error)
RecordQuery transcribes a query by name, namespace, duration and error