collect

package
v0.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2019 License: Apache-2.0 Imports: 30 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterInfo

func ClusterInfo() error

func ClusterResources

func ClusterResources(redact bool) error

func Copy

func Copy(copyCollector *troubleshootv1beta1.Copy, redact bool) error

func CreateCollector

func CreateCollector(client client.Client, scheme *runtime.Scheme, ownerRef metav1.Object, jobName string, jobNamespace string, serviceAccountName string, jobType string, collect *troubleshootv1beta1.Collect, image string, pullPolicy string) (*corev1.ConfigMap, *corev1.Pod, error)

func DeterministicIDForCollector

func DeterministicIDForCollector(collector *troubleshootv1beta1.Collect) string

func Exec

func Exec(execCollector *troubleshootv1beta1.Exec, redact bool) error

func HTTP

func HTTP(httpCollector *troubleshootv1beta1.HTTP, redact bool) error

func Logs

func Logs(logsCollector *troubleshootv1beta1.Logs, redact bool) error

func Run

func Run(runCollector *troubleshootv1beta1.Run, redact bool) error

func Secret

func Secret(secretCollector *troubleshootv1beta1.Secret, redact bool) error

Types

type ClusterInfoOutput

type ClusterInfoOutput struct {
	ClusterVersion []byte `json:"cluster-info/cluster_version.json,omitempty"`
	Errors         []byte `json:"cluster-info/errors.json,omitempty"`
}

type ClusterResourcesOutput

type ClusterResourcesOutput struct {
	Namespaces                      []byte            `json:"cluster-resources/namespaces.json,omitempty"`
	NamespacesErrors                []byte            `json:"cluster-resources/namespaces-errors.json,omitempty"`
	Pods                            map[string][]byte `json:"cluster-resources/pods,omitempty"`
	PodsErrors                      []byte            `json:"cluster-resources/pods-errors.json,omitempty"`
	Services                        map[string][]byte `json:"cluster-resources/services,omitempty"`
	ServicesErrors                  []byte            `json:"cluster-resources/services-errors.json,omitempty"`
	Deployments                     map[string][]byte `json:"cluster-resources/deployments,omitempty"`
	DeploymentsErrors               []byte            `json:"cluster-resources/deployments-errors.json,omitempty"`
	Ingress                         map[string][]byte `json:"cluster-resources/ingress,omitempty"`
	IngressErrors                   []byte            `json:"cluster-resources/ingress-errors.json,omitempty"`
	StorageClasses                  []byte            `json:"cluster-resources/storage-classes.json,omitempty"`
	StorageErrors                   []byte            `json:"cluster-resources/storage-errors.json,omitempty"`
	CustomResourceDefinitions       []byte            `json:"cluster-resources/custom-resource-definitions.json,omitempty"`
	CustomResourceDefinitionsErrors []byte            `json:"cluster-resources/custom-resource-definitions-errors.json,omitempty"`
	ImagePullSecrets                map[string][]byte `json:"cluster-resources/image-pull-secrets,omitempty"`
	ImagePullSecretsErrors          []byte            `json:"cluster-resources/image-pull-secrets-errors.json,omitempty"`
}

func (*ClusterResourcesOutput) Redact

type ClusterVersion

type ClusterVersion struct {
	Info   *version.Info `json:"info"`
	String string        `json:"string"`
}

type Collector

type Collector struct {
	Spec   string
	Redact bool
}

func (*Collector) RunCollectorSync

func (c *Collector) RunCollectorSync() error

type CopyOutput

type CopyOutput struct {
	Files  map[string][]byte `json:"copy/,omitempty"`
	Errors map[string][]byte `json:"copy-errors/,omitempty"`
}

type ExecOutput

type ExecOutput struct {
	Results map[string][]byte `json:"exec/,omitempty"`
	Errors  map[string][]byte `json:"exec-errors/,omitempty"`
}

func (*ExecOutput) Redact

func (r *ExecOutput) Redact() (*ExecOutput, error)

type FoundSecret

type FoundSecret struct {
	Namespace    string `json:"namespace"`
	Name         string `json:"name"`
	Key          string `json:"key"`
	SecretExists bool   `json:"secretExists"`
	KeyExists    bool   `json:"keyExists"`
	Value        string `json:"value,omitempty"`
}

type HTTPOutput

type HTTPOutput struct {
	Response map[string][]byte `json:"http/,omitempty"`
}

type LogsOutput

type LogsOutput struct {
	PodLogs map[string][]byte `json:"logs/,omitempty"`
	Errors  map[string][]byte `json:"logs-errors/,omitempty"`
}

func (*LogsOutput) Redact

func (l *LogsOutput) Redact() (*LogsOutput, error)

type RunOutput

type RunOutput struct {
	PodLogs map[string][]byte `json:"run/,omitempty"`
}

func (*RunOutput) Redact

func (r *RunOutput) Redact() (*RunOutput, error)

type SecretOutput

type SecretOutput struct {
	FoundSecret map[string][]byte `json:"secrets/,omitempty"`
	Errors      map[string][]byte `json:"secrets-errors/,omitempty"`
}

func (*SecretOutput) Redact

func (s *SecretOutput) Redact() (*SecretOutput, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL