collect

package
v0.68.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: Apache-2.0 Imports: 94 Imported by: 15

Documentation

Index

Constants

View Source
const (
	KernelModuleUnknown   = "unknown"
	KernelModuleLoaded    = "loaded"
	KernelModuleLoadable  = "loadable"
	KernelModuleLoading   = "loading"
	KernelModuleUnloading = "unloading"
)
View Source
const (
	NetworkStatusAddressInUse         = "address-in-use"
	NetworkStatusConnectionRefused    = "connection-refused"
	NetworkStatusConnectionTimeout    = "connection-timeout"
	NetworkStatusConnected            = "connected"
	NetworkStatusErrorOther           = "error"
	NetworkStatusBindPermissionDenied = "bind-permission-denied"
	NetworkStatusInvalidAddress       = "invalid-address"
)
View Source
const (
	SubnetStatusAvailable     = "a-subnet-is-available"
	SubnetStatusNoneAvailable = "no-subnet-available"
)
View Source
const (
	DefaultCephNamespace = "rook-ceph"
)
View Source
const (
	DefaultLonghornNamespace = "longhorn-system"
)
View Source
const HostBlockDevicesPath = `host-collectors/system/block_devices.json`
View Source
const HostCPUPath = `host-collectors/system/cpu.json`
View Source
const HostIPV4InterfacesPath = `host-collectors/system/ipv4Interfaces.json`
View Source
const HostKernelModulesPath = `host-collectors/system/kernel_modules.json`
View Source
const HostMemoryPath = `host-collectors/system/memory.json`
View Source
const HostOSInfoPath = `host-collectors/system/hostos_info.json`
View Source
const HostServicesPath = `host-collectors/system/systemctl_services.json`
View Source
const HostTimePath = `host-collectors/system/time.json`
View Source
const KeyPairEncrypted = "key-pair-encrypted"
View Source
const KeyPairInvalid = "key-pair-invalid"
View Source
const KeyPairMismatch = "key-pair-mismatch"
View Source
const KeyPairMissing = "key-pair-missing"
View Source
const KeyPairSwitched = "key-pair-switched"
View Source
const KeyPairValid = "key-pair-valid"

Variables

View Source
var CephCommands = []CephCommand{
	{
		ID:             "status",
		Command:        []string{"ceph", "status"},
		Args:           []string{"-f", "json-pretty"},
		Format:         "json",
		DefaultTimeout: "30s",
	},
	{
		ID:             "fs",
		Command:        []string{"ceph", "fs", "status"},
		Args:           []string{"-f", "json-pretty"},
		Format:         "json",
		DefaultTimeout: "30s",
	},
	{
		ID:             "fs-ls",
		Command:        []string{"ceph", "fs", "ls"},
		Args:           []string{"-f", "json-pretty"},
		Format:         "json",
		DefaultTimeout: "30s",
	},
	{
		ID:             "osd-status",
		Command:        []string{"ceph", "osd", "status"},
		Args:           []string{"-f", "json-pretty"},
		Format:         "txt",
		DefaultTimeout: "30s",
	},
	{
		ID:             "osd-tree",
		Command:        []string{"ceph", "osd", "tree"},
		Args:           []string{"-f", "json-pretty"},
		Format:         "json",
		DefaultTimeout: "30s",
	},
	{
		ID:             "osd-pool",
		Command:        []string{"ceph", "osd", "pool", "ls", "detail"},
		Args:           []string{"-f", "json-pretty"},
		Format:         "json",
		DefaultTimeout: "30s",
	},
	{
		ID:             "health",
		Command:        []string{"ceph", "health", "detail"},
		Args:           []string{"-f", "json-pretty"},
		Format:         "json",
		DefaultTimeout: "30s",
	},
	{
		ID:             "auth",
		Command:        []string{"ceph", "auth", "ls"},
		Args:           []string{"-f", "json-pretty"},
		Format:         "json",
		DefaultTimeout: "30s",
	},
	{
		ID:             "rgw-stats",
		Command:        []string{"radosgw-admin", "bucket", "stats"},
		Args:           []string{"--rgw-cache-enabled=false"},
		Format:         "txt",
		DefaultTimeout: "30s",
	},
	{
		ID:             "rbd-du",
		Command:        []string{"rbd", "du"},
		Args:           []string{"--pool=replicapool"},
		Format:         "txt",
		DefaultTimeout: "30s",
	},
	{
		ID:             "osd-df",
		Command:        []string{"ceph", "osd", "df"},
		Args:           []string{"-f", "json-pretty"},
		Format:         "json",
		DefaultTimeout: "30s",
	},
}
View Source
var (
	// ErrCollectorNotFound is returned when an undefined host collector is
	// specified by the user.
	ErrHostCollectorNotFound = errors.New("unrecognized host collector")
)

Functions

func CreateCollector

func CreateCollector(client *kubernetes.Clientset, scheme *runtime.Scheme, ownerRef metav1.Object, name string, namespace string, nodeName string, serviceAccountName string, jobType string, collect *troubleshootv1beta2.HostCollect, image string, pullPolicy string) (*corev1.ConfigMap, *corev1.Pod, error)

func DedupCollectors added in v0.56.0

func DedupCollectors(allCollectors []*troubleshootv1beta2.Collect) []*troubleshootv1beta2.Collect

deduplicates a list of troubleshootv1beta2.Collect objects marshals object to json and then uses its string value to check for uniqueness there is no sorting of the keys in the collect object's spec so if the spec isn't an exact match line for line as written, no dedup will occur

func DeterministicIDForCollector

func DeterministicIDForCollector(collector *troubleshootv1beta2.Collect) string

func EnsureClusterResourcesFirst added in v0.46.0

func EnsureClusterResourcesFirst(list []*troubleshootv1beta2.Collect) []*troubleshootv1beta2.Collect

collect ClusterResources earliest in the list so the pod list does not include pods started by collectors

func EnsureCollectorInList added in v0.46.0

func EnsureCollectorInList(list []*troubleshootv1beta2.Collect, collector troubleshootv1beta2.Collect) []*troubleshootv1beta2.Collect

Ensure that the specified collector is in the list of collectors

func GetCephCollectorFilepath added in v0.9.50

func GetCephCollectorFilepath(name, namespace string) string

func GetCollector added in v0.44.0

func GetCollector(collector *troubleshootv1beta2.Collect, bundlePath string, namespace string, clientConfig *rest.Config, client kubernetes.Interface, sinceTime *time.Time) (interface{}, bool)

func GetConfigMapErrorsFileName added in v0.13.3

func GetConfigMapErrorsFileName(configMapCollector *troubleshootv1beta2.ConfigMap) string

func GetConfigMapFileName added in v0.13.3

func GetConfigMapFileName(configMapCollector *troubleshootv1beta2.ConfigMap, name string) string

func GetContainerLogs added in v0.15.0

func GetContainerLogs(ctx context.Context, client kubernetes.Interface, namespace string, podName string, containerName string, waitForComplete bool, interval time.Duration) (string, error)

func GetLonghornBackingImageManagersDirectory added in v0.11.0

func GetLonghornBackingImageManagersDirectory(namespace string) string

func GetLonghornBackingImagesDirectory added in v0.11.0

func GetLonghornBackingImagesDirectory(namespace string) string

func GetLonghornEngineImagesDirectory added in v0.11.0

func GetLonghornEngineImagesDirectory(namespace string) string

func GetLonghornEnginesDirectory added in v0.11.0

func GetLonghornEnginesDirectory(namespace string) string

func GetLonghornInstanceManagersDirectory added in v0.11.0

func GetLonghornInstanceManagersDirectory(namespace string) string

func GetLonghornLogsDirectory added in v0.11.0

func GetLonghornLogsDirectory(namespace string) string

func GetLonghornNodesDirectory added in v0.11.0

func GetLonghornNodesDirectory(namespace string) string

func GetLonghornReplicaChecksum added in v0.12.0

func GetLonghornReplicaChecksum(clientConfig *rest.Config, replica longhornv1beta1types.Replica, podName string) (string, error)

func GetLonghornReplicasDirectory added in v0.11.0

func GetLonghornReplicasDirectory(namespace string) string

func GetLonghornSettingsFile added in v0.11.0

func GetLonghornSettingsFile(namespace string) string

func GetLonghornShareManagersDirectory added in v0.11.0

func GetLonghornShareManagersDirectory(namespace string) string

func GetLonghornVolumesDirectory added in v0.11.0

func GetLonghornVolumesDirectory(namespace string) string

func GetSecretErrorsFileName added in v0.13.3

func GetSecretErrorsFileName(secretCollector *troubleshootv1beta2.Secret) string

func GetSecretFileName added in v0.13.3

func GetSecretFileName(secretCollector *troubleshootv1beta2.Secret, name string) string

func IsRBACError added in v0.9.15

func IsRBACError(err error) bool

func ListInstanceManagerReplicaPods added in v0.12.0

func ListInstanceManagerReplicaPods(ctx context.Context, clientConfig *rest.Config, namespace string) (map[string]string, error)

Returns a map of nodeName:podName

func ParseCollectorFromDoc added in v0.15.0

func ParseCollectorFromDoc(doc []byte) (*troubleshootv1beta2.Collector, error)

func ParseHostCollectorFromDoc added in v0.15.0

func ParseHostCollectorFromDoc(doc []byte) (*troubleshootv1beta2.HostCollector, error)

func ParseRemoteCollectorFromDoc added in v0.15.0

func ParseRemoteCollectorFromDoc(doc []byte) (*troubleshootv1beta2.RemoteCollector, error)

func ParseReplicaChecksum added in v0.12.0

func ParseReplicaChecksum(data []byte) (map[string]string, error)

func RedactResult added in v0.38.0

func RedactResult(bundlePath string, input CollectorResult, additionalRedactors []*troubleshootv1beta2.Redact) error

func RunPodLogs added in v0.14.0

func RunPodLogs(ctx context.Context, client v1.CoreV1Interface, podSpec *corev1.Pod) ([]byte, error)

RunPodLogs runs a pod to completion on a node and returns its logs

func RunPodsReadyNodes added in v0.14.0

func RunPodsReadyNodes(ctx context.Context, client v1.CoreV1Interface, opts RunPodOptions) (map[string][]byte, error)

func TarSupportBundleDir added in v0.13.15

func TarSupportBundleDir(bundlePath string, input CollectorResult, outputFilename string) error

TarSupportBundleDir wraps ArchiveSupportBundle for backwards compatibility Deprecated: Remove in a future version (v1.0)

func WaitForPodCompleted added in v0.15.0

func WaitForPodCompleted(ctx context.Context, client kubernetes.Interface, namespace string, podName string, interval time.Duration) error

WaitForPodCompleted returns nil if the pod reached state success, or an error if it reached failure or ran too long.

func WaitForPodCondition added in v0.15.0

func WaitForPodCondition(ctx context.Context, client kubernetes.Interface, namespace string, podName string, interval time.Duration, condition podCondition) error

WaitForPodCondition waits for a pod to match the given condition.

Types

type BlockDeviceInfo added in v0.10.2

type BlockDeviceInfo struct {
	Name             string `json:"name"`
	KernelName       string `json:"kernel_name"`
	ParentKernelName string `json:"parent_kernel_name"`
	Type             string `json:"type"`
	Major            int    `json:"major"`
	Minor            int    `json:"minor"`
	Size             uint64 `json:"size"`
	FilesystemType   string `json:"filesystem_type"`
	Mountpoint       string `json:"mountpoint"`
	Serial           string `json:"serial"`
	ReadOnly         bool   `json:"read_only"`
	Removable        bool   `json:"removable"`
}

type CPUInfo added in v0.10.0

type CPUInfo struct {
	LogicalCount  int `json:"logicalCount"`
	PhysicalCount int `json:"physicalCount"`
}

type CephCommand added in v0.9.50

type CephCommand struct {
	ID             string
	Command        []string
	Args           []string
	Format         string
	DefaultTimeout string
}

type CertCollection added in v0.62.0

type CertCollection struct {
	Source           *CertificateSource  `json:"source"`
	Errors           []string            `json:"errors,omitempty"`
	CertificateChain []ParsedCertificate `json:"certificateChain,omitempty"`
}

Certificate collection struct

type CertificateSource added in v0.62.0

type CertificateSource struct {
	SecretName    string `json:"secret,omitempty"`
	ConfigMapName string `json:"configMap,omitempty"`
	Namespace     string `json:"namespace,omitempty"`
}

Certificate source

type ClusterVersion

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

type CollectCeph added in v0.44.0

type CollectCeph struct {
	Collector    *troubleshootv1beta2.Ceph
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectCeph) Collect added in v0.44.0

func (c *CollectCeph) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectCeph) IsExcluded added in v0.44.0

func (c *CollectCeph) IsExcluded() (bool, error)

func (*CollectCeph) Title added in v0.44.0

func (c *CollectCeph) Title() string

type CollectCertificates added in v0.62.0

type CollectCertificates struct {
	Collector    *troubleshootv1beta2.Certificates
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectCertificates) Collect added in v0.62.0

func (c *CollectCertificates) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectCertificates) IsExcluded added in v0.62.0

func (c *CollectCertificates) IsExcluded() (bool, error)

func (*CollectCertificates) Title added in v0.62.0

func (c *CollectCertificates) Title() string

type CollectClusterInfo added in v0.44.0

type CollectClusterInfo struct {
	Collector    *troubleshootv1beta2.ClusterInfo
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	RBACErrors
}

func (*CollectClusterInfo) Collect added in v0.44.0

func (c *CollectClusterInfo) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectClusterInfo) IsExcluded added in v0.44.0

func (c *CollectClusterInfo) IsExcluded() (bool, error)

func (*CollectClusterInfo) Title added in v0.44.0

func (c *CollectClusterInfo) Title() string

type CollectClusterResources added in v0.44.0

type CollectClusterResources struct {
	Collector    *troubleshootv1beta2.ClusterResources
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	RBACErrors
}

func (*CollectClusterResources) Collect added in v0.44.0

func (c *CollectClusterResources) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectClusterResources) IsExcluded added in v0.44.0

func (c *CollectClusterResources) IsExcluded() (bool, error)

func (*CollectClusterResources) Merge added in v0.44.0

func (c *CollectClusterResources) Merge(allCollectors []Collector) ([]Collector, error)

func (*CollectClusterResources) Title added in v0.44.0

func (c *CollectClusterResources) Title() string

type CollectCollectd added in v0.44.0

type CollectCollectd struct {
	Collector    *troubleshootv1beta2.Collectd
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectCollectd) Collect added in v0.44.0

func (c *CollectCollectd) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectCollectd) IsExcluded added in v0.44.0

func (c *CollectCollectd) IsExcluded() (bool, error)

func (*CollectCollectd) Title added in v0.44.0

func (c *CollectCollectd) Title() string

type CollectConfigMap added in v0.44.0

type CollectConfigMap struct {
	Collector    *troubleshootv1beta2.ConfigMap
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectConfigMap) Collect added in v0.44.0

func (c *CollectConfigMap) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectConfigMap) IsExcluded added in v0.44.0

func (c *CollectConfigMap) IsExcluded() (bool, error)

func (*CollectConfigMap) Title added in v0.44.0

func (c *CollectConfigMap) Title() string

type CollectCopy added in v0.44.0

type CollectCopy struct {
	Collector    *troubleshootv1beta2.Copy
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectCopy) Collect added in v0.44.0

func (c *CollectCopy) Collect(progressChan chan<- interface{}) (CollectorResult, error)

Copy function gets a file or folder from a container specified in the specs.

func (*CollectCopy) IsExcluded added in v0.44.0

func (c *CollectCopy) IsExcluded() (bool, error)

func (*CollectCopy) Title added in v0.44.0

func (c *CollectCopy) Title() string

type CollectCopyFromHost added in v0.44.0

type CollectCopyFromHost struct {
	Collector    *troubleshootv1beta2.CopyFromHost
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectCopyFromHost) Collect added in v0.44.0

func (c *CollectCopyFromHost) Collect(progressChan chan<- interface{}) (CollectorResult, error)

copies a file or directory from a host or hosts to include in the bundle.

func (*CollectCopyFromHost) IsExcluded added in v0.44.0

func (c *CollectCopyFromHost) IsExcluded() (bool, error)

func (*CollectCopyFromHost) Title added in v0.44.0

func (c *CollectCopyFromHost) Title() string

type CollectData added in v0.44.0

type CollectData struct {
	Collector    *troubleshootv1beta2.Data
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectData) Collect added in v0.44.0

func (c *CollectData) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectData) IsExcluded added in v0.44.0

func (c *CollectData) IsExcluded() (bool, error)

func (*CollectData) Title added in v0.44.0

func (c *CollectData) Title() string

type CollectExec added in v0.44.0

type CollectExec struct {
	Collector    *troubleshootv1beta2.Exec
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectExec) Collect added in v0.44.0

func (c *CollectExec) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectExec) IsExcluded added in v0.44.0

func (c *CollectExec) IsExcluded() (bool, error)

func (*CollectExec) Title added in v0.44.0

func (c *CollectExec) Title() string

type CollectHTTP added in v0.44.0

type CollectHTTP struct {
	Collector    *troubleshootv1beta2.HTTP
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	RBACErrors
}

func (*CollectHTTP) Collect added in v0.44.0

func (c *CollectHTTP) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectHTTP) IsExcluded added in v0.44.0

func (c *CollectHTTP) IsExcluded() (bool, error)

func (*CollectHTTP) Title added in v0.44.0

func (c *CollectHTTP) Title() string

type CollectHostBlockDevices added in v0.10.8

type CollectHostBlockDevices struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostBlockDevices) Collect added in v0.10.8

func (c *CollectHostBlockDevices) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostBlockDevices) IsExcluded added in v0.10.8

func (c *CollectHostBlockDevices) IsExcluded() (bool, error)

func (*CollectHostBlockDevices) Title added in v0.10.8

func (c *CollectHostBlockDevices) Title() string

type CollectHostCPU added in v0.10.8

type CollectHostCPU struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostCPU) Collect added in v0.10.8

func (c *CollectHostCPU) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostCPU) IsExcluded added in v0.10.8

func (c *CollectHostCPU) IsExcluded() (bool, error)

func (*CollectHostCPU) Title added in v0.10.8

func (c *CollectHostCPU) Title() string

type CollectHostCertificate added in v0.10.8

type CollectHostCertificate struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostCertificate) Collect added in v0.10.8

func (c *CollectHostCertificate) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostCertificate) IsExcluded added in v0.10.8

func (c *CollectHostCertificate) IsExcluded() (bool, error)

func (*CollectHostCertificate) Title added in v0.10.8

func (c *CollectHostCertificate) Title() string

type CollectHostCopy added in v0.61.0

type CollectHostCopy struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostCopy) Collect added in v0.61.0

func (c *CollectHostCopy) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostCopy) IsExcluded added in v0.61.0

func (c *CollectHostCopy) IsExcluded() (bool, error)

func (*CollectHostCopy) Title added in v0.61.0

func (c *CollectHostCopy) Title() string

type CollectHostDiskUsage added in v0.10.8

type CollectHostDiskUsage struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostDiskUsage) Collect added in v0.10.8

func (c *CollectHostDiskUsage) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostDiskUsage) IsExcluded added in v0.10.8

func (c *CollectHostDiskUsage) IsExcluded() (bool, error)

func (*CollectHostDiskUsage) Title added in v0.10.8

func (c *CollectHostDiskUsage) Title() string

type CollectHostFilesystemPerformance added in v0.10.8

type CollectHostFilesystemPerformance struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostFilesystemPerformance) Collect added in v0.10.8

func (c *CollectHostFilesystemPerformance) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostFilesystemPerformance) IsExcluded added in v0.10.8

func (c *CollectHostFilesystemPerformance) IsExcluded() (bool, error)

func (*CollectHostFilesystemPerformance) Title added in v0.10.8

type CollectHostHTTP added in v0.10.8

type CollectHostHTTP struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostHTTP) Collect added in v0.10.8

func (c *CollectHostHTTP) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostHTTP) IsExcluded added in v0.10.8

func (c *CollectHostHTTP) IsExcluded() (bool, error)

func (*CollectHostHTTP) Title added in v0.10.8

func (c *CollectHostHTTP) Title() string

type CollectHostHTTPLoadBalancer added in v0.10.8

type CollectHostHTTPLoadBalancer struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostHTTPLoadBalancer) Collect added in v0.10.8

func (c *CollectHostHTTPLoadBalancer) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostHTTPLoadBalancer) IsExcluded added in v0.10.8

func (c *CollectHostHTTPLoadBalancer) IsExcluded() (bool, error)

func (*CollectHostHTTPLoadBalancer) Title added in v0.10.8

type CollectHostIPV4Interfaces added in v0.10.8

type CollectHostIPV4Interfaces struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostIPV4Interfaces) Collect added in v0.10.8

func (c *CollectHostIPV4Interfaces) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostIPV4Interfaces) IsExcluded added in v0.10.8

func (c *CollectHostIPV4Interfaces) IsExcluded() (bool, error)

func (*CollectHostIPV4Interfaces) Title added in v0.10.8

func (c *CollectHostIPV4Interfaces) Title() string

type CollectHostKernelModules added in v0.15.0

type CollectHostKernelModules struct {
	BundlePath string
	// contains filtered or unexported fields
}

CollectHostKernelModules is responsible for collecting kernel module status from the host.

func (*CollectHostKernelModules) Collect added in v0.15.0

func (c *CollectHostKernelModules) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

Collect the kernel module status from the host. Modules are returned as a map keyed on the module name used by the kernel, e.g:

{
  "system/kernel_modules.json": {
    ...
    "dm_snapshot": {
      "instances": 8,
      "size": 45056,
      "status": "loaded"
    },
    ...
  },
}

Module status may be: loaded, loadable, loading, unloading or unknown. When a module is loaded, it may have one or more instances. The size represents the amount of memory (in bytes) that the module is using.

func (*CollectHostKernelModules) IsExcluded added in v0.15.0

func (c *CollectHostKernelModules) IsExcluded() (bool, error)

IsExcluded returns true if the collector has been excluded from the results.

func (*CollectHostKernelModules) Title added in v0.15.0

func (c *CollectHostKernelModules) Title() string

Title is the name of the collector.

type CollectHostMemory added in v0.10.8

type CollectHostMemory struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostMemory) Collect added in v0.10.8

func (c *CollectHostMemory) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostMemory) IsExcluded added in v0.10.8

func (c *CollectHostMemory) IsExcluded() (bool, error)

func (*CollectHostMemory) Title added in v0.10.8

func (c *CollectHostMemory) Title() string

type CollectHostOS added in v0.16.0

type CollectHostOS struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostOS) Collect added in v0.16.0

func (c *CollectHostOS) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostOS) IsExcluded added in v0.16.0

func (c *CollectHostOS) IsExcluded() (bool, error)

func (*CollectHostOS) Title added in v0.16.0

func (c *CollectHostOS) Title() string

type CollectHostRun added in v0.37.0

type CollectHostRun struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostRun) Collect added in v0.37.0

func (c *CollectHostRun) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostRun) IsExcluded added in v0.37.0

func (c *CollectHostRun) IsExcluded() (bool, error)

func (*CollectHostRun) Title added in v0.37.0

func (c *CollectHostRun) Title() string

type CollectHostServices added in v0.10.15

type CollectHostServices struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostServices) Collect added in v0.10.15

func (c *CollectHostServices) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostServices) IsExcluded added in v0.10.15

func (c *CollectHostServices) IsExcluded() (bool, error)

func (*CollectHostServices) Title added in v0.10.15

func (c *CollectHostServices) Title() string

type CollectHostSubnetAvailable added in v0.59.0

type CollectHostSubnetAvailable struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostSubnetAvailable) Collect added in v0.59.0

func (c *CollectHostSubnetAvailable) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostSubnetAvailable) IsExcluded added in v0.59.0

func (c *CollectHostSubnetAvailable) IsExcluded() (bool, error)

func (*CollectHostSubnetAvailable) Title added in v0.59.0

type CollectHostSystemPackages added in v0.24.0

type CollectHostSystemPackages struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostSystemPackages) Collect added in v0.24.0

func (c *CollectHostSystemPackages) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostSystemPackages) IsExcluded added in v0.24.0

func (c *CollectHostSystemPackages) IsExcluded() (bool, error)

func (*CollectHostSystemPackages) Title added in v0.24.0

func (c *CollectHostSystemPackages) Title() string

type CollectHostTCPConnect added in v0.10.8

type CollectHostTCPConnect struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostTCPConnect) Collect added in v0.10.8

func (c *CollectHostTCPConnect) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostTCPConnect) IsExcluded added in v0.10.8

func (c *CollectHostTCPConnect) IsExcluded() (bool, error)

func (*CollectHostTCPConnect) Title added in v0.10.8

func (c *CollectHostTCPConnect) Title() string

type CollectHostTCPLoadBalancer added in v0.10.8

type CollectHostTCPLoadBalancer struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostTCPLoadBalancer) Collect added in v0.10.8

func (c *CollectHostTCPLoadBalancer) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostTCPLoadBalancer) IsExcluded added in v0.10.8

func (c *CollectHostTCPLoadBalancer) IsExcluded() (bool, error)

func (*CollectHostTCPLoadBalancer) Title added in v0.10.8

type CollectHostTCPPortStatus added in v0.10.8

type CollectHostTCPPortStatus struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostTCPPortStatus) Collect added in v0.10.8

func (c *CollectHostTCPPortStatus) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostTCPPortStatus) IsExcluded added in v0.10.8

func (c *CollectHostTCPPortStatus) IsExcluded() (bool, error)

func (*CollectHostTCPPortStatus) Title added in v0.10.8

func (c *CollectHostTCPPortStatus) Title() string

type CollectHostTime added in v0.10.8

type CollectHostTime struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostTime) Collect added in v0.10.8

func (c *CollectHostTime) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostTime) IsExcluded added in v0.10.8

func (c *CollectHostTime) IsExcluded() (bool, error)

func (*CollectHostTime) Title added in v0.10.8

func (c *CollectHostTime) Title() string

type CollectHostUDPPortStatus added in v0.55.0

type CollectHostUDPPortStatus struct {
	BundlePath string
	// contains filtered or unexported fields
}

func (*CollectHostUDPPortStatus) Collect added in v0.55.0

func (c *CollectHostUDPPortStatus) Collect(progressChan chan<- interface{}) (map[string][]byte, error)

func (*CollectHostUDPPortStatus) IsExcluded added in v0.55.0

func (c *CollectHostUDPPortStatus) IsExcluded() (bool, error)

func (*CollectHostUDPPortStatus) Title added in v0.55.0

func (c *CollectHostUDPPortStatus) Title() string

type CollectLogs added in v0.44.0

type CollectLogs struct {
	Collector    *troubleshootv1beta2.Logs
	BundlePath   string
	Namespace    string // TODO: There is a Namespace parameter in troubleshootv1beta2.Logs. Should we remove this?
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	SinceTime    *time.Time
	RBACErrors
}

func (*CollectLogs) Collect added in v0.44.0

func (c *CollectLogs) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectLogs) CollectWithClient added in v0.54.0

func (c *CollectLogs) CollectWithClient(progressChan chan<- interface{}, client kubernetes.Interface) (CollectorResult, error)

CollectWithClient is a helper function that allows passing in a kubernetes client It's a stopgap implementation before it's decided whether to either always use a single client for collectors or leave the implementation as is. Ref: https://github.com/replicatedhq/troubleshoot/pull/821#discussion_r1026258904

func (*CollectLogs) IsExcluded added in v0.44.0

func (c *CollectLogs) IsExcluded() (bool, error)

func (*CollectLogs) Title added in v0.44.0

func (c *CollectLogs) Title() string

type CollectLonghorn added in v0.44.0

type CollectLonghorn struct {
	Collector    *troubleshootv1beta2.Longhorn
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectLonghorn) Collect added in v0.44.0

func (c *CollectLonghorn) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectLonghorn) IsExcluded added in v0.44.0

func (c *CollectLonghorn) IsExcluded() (bool, error)

func (*CollectLonghorn) Title added in v0.44.0

func (c *CollectLonghorn) Title() string

type CollectMssql added in v0.60.0

type CollectMssql struct {
	Collector    *troubleshootv1beta2.Database
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectMssql) Collect added in v0.60.0

func (c *CollectMssql) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectMssql) IsExcluded added in v0.60.0

func (c *CollectMssql) IsExcluded() (bool, error)

func (*CollectMssql) Title added in v0.60.0

func (c *CollectMssql) Title() string

type CollectMysql added in v0.44.0

type CollectMysql struct {
	Collector    *troubleshootv1beta2.Database
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectMysql) Collect added in v0.44.0

func (c *CollectMysql) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectMysql) IsExcluded added in v0.44.0

func (c *CollectMysql) IsExcluded() (bool, error)

func (*CollectMysql) Title added in v0.44.0

func (c *CollectMysql) Title() string

type CollectPostgres added in v0.44.0

type CollectPostgres struct {
	Collector    *troubleshootv1beta2.Database
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectPostgres) Collect added in v0.44.0

func (c *CollectPostgres) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectPostgres) IsExcluded added in v0.44.0

func (c *CollectPostgres) IsExcluded() (bool, error)

func (*CollectPostgres) Title added in v0.44.0

func (c *CollectPostgres) Title() string

type CollectProgress added in v0.15.0

type CollectProgress struct {
	CurrentName    string
	CurrentStatus  string
	CompletedCount int
	TotalCount     int
}

type CollectRedis added in v0.44.0

type CollectRedis struct {
	Collector    *troubleshootv1beta2.Database
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectRedis) Collect added in v0.44.0

func (c *CollectRedis) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectRedis) IsExcluded added in v0.44.0

func (c *CollectRedis) IsExcluded() (bool, error)

func (*CollectRedis) Title added in v0.44.0

func (c *CollectRedis) Title() string

type CollectRegistry added in v0.44.0

type CollectRegistry struct {
	Collector    *troubleshootv1beta2.RegistryImages
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectRegistry) Collect added in v0.44.0

func (c *CollectRegistry) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectRegistry) IsExcluded added in v0.44.0

func (c *CollectRegistry) IsExcluded() (bool, error)

func (*CollectRegistry) Title added in v0.44.0

func (c *CollectRegistry) Title() string

type CollectRun added in v0.44.0

type CollectRun struct {
	Collector    *troubleshootv1beta2.Run
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectRun) Collect added in v0.44.0

func (c *CollectRun) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectRun) IsExcluded added in v0.44.0

func (c *CollectRun) IsExcluded() (bool, error)

func (*CollectRun) Title added in v0.44.0

func (c *CollectRun) Title() string

type CollectRunPod added in v0.44.0

type CollectRunPod struct {
	Collector    *troubleshootv1beta2.RunPod
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectRunPod) Collect added in v0.44.0

func (c *CollectRunPod) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectRunPod) IsExcluded added in v0.44.0

func (c *CollectRunPod) IsExcluded() (bool, error)

func (*CollectRunPod) Title added in v0.44.0

func (c *CollectRunPod) Title() string

type CollectSecret added in v0.44.0

type CollectSecret struct {
	Collector    *troubleshootv1beta2.Secret
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectSecret) Collect added in v0.44.0

func (c *CollectSecret) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectSecret) IsExcluded added in v0.44.0

func (c *CollectSecret) IsExcluded() (bool, error)

func (*CollectSecret) Title added in v0.44.0

func (c *CollectSecret) Title() string

type CollectSysctl added in v0.44.0

type CollectSysctl struct {
	Collector    *troubleshootv1beta2.Sysctl
	BundlePath   string
	Namespace    string
	ClientConfig *rest.Config
	Client       kubernetes.Interface
	Context      context.Context
	RBACErrors
}

func (*CollectSysctl) Collect added in v0.44.0

func (c *CollectSysctl) Collect(progressChan chan<- interface{}) (CollectorResult, error)

func (*CollectSysctl) IsExcluded added in v0.44.0

func (c *CollectSysctl) IsExcluded() (bool, error)

func (*CollectSysctl) Title added in v0.44.0

func (c *CollectSysctl) Title() string

type Collector

type Collector interface {
	Title() string
	IsExcluded() (bool, error)
	GetRBACErrors() []error
	HasRBACErrors() bool
	CheckRBAC(ctx context.Context, c Collector, collector *troubleshootv1beta2.Collect, clientConfig *rest.Config, namespace string) error
	Collect(progressChan chan<- interface{}) (CollectorResult, error)
}

type CollectorResult added in v0.13.15

type CollectorResult map[string][]byte

func CollectorResultFromBundle added in v0.53.0

func CollectorResultFromBundle(bundleDir string) (CollectorResult, error)

CollectorResultFromBundle creates a CollectorResult from a bundle directory The bundle directory is not necessarily a support bundle, it can be any directory of collected files as part of other operations or files that are already on disk.

func NewResult added in v0.13.15

func NewResult() CollectorResult

func (CollectorResult) AddResult added in v0.49.1

func (r CollectorResult) AddResult(other CollectorResult)

AddResult combines another results object into this collector result. This ensures when archiving a bundle from the result, all files are included. It also ensures that when operating on the results in memory (e.g preflights), all files are included.

func (CollectorResult) ArchiveSupportBundle added in v0.53.0

func (r CollectorResult) ArchiveSupportBundle(bundlePath string, outputFilename string) error

func (CollectorResult) CloseWriter added in v0.13.17

func (r CollectorResult) CloseWriter(bundlePath string, relativePath string, writer interface{}) error

func (CollectorResult) GetReader added in v0.13.15

func (r CollectorResult) GetReader(bundlePath string, relativePath string) (io.ReadCloser, error)

func (CollectorResult) GetWriter added in v0.13.15

func (r CollectorResult) GetWriter(bundlePath string, relativePath string) (io.Writer, error)

func (CollectorResult) ReplaceResult added in v0.13.15

func (r CollectorResult) ReplaceResult(bundlePath string, relativePath string, reader io.Reader) error

func (CollectorResult) SaveResult added in v0.13.15

func (r CollectorResult) SaveResult(bundlePath string, relativePath string, reader io.Reader) error

SaveResult saves the collector result to relativePath file on disk. If bundlePath is empty, no file is created on disk. The relativePath is always saved in the result map.

func (CollectorResult) SymLinkResult added in v0.48.0

func (r CollectorResult) SymLinkResult(bundlePath, relativeLinkPath, relativeFilePath string) error

SymLinkResult creates a symlink (relativeLinkPath) of relativeFilePath in the bundle. If bundlePath is empty, no symlink is created. The relativeLinkPath is always saved in the result map.

type CollectorRunOpts added in v0.15.0

type CollectorRunOpts struct {
	Namespace                 string
	CollectWithoutPermissions bool
	HttpClient                *http.Client
	KubernetesRestConfig      *rest.Config
	Image                     string
	PullPolicy                string
	LabelSelector             string
	Timeout                   time.Duration
	ProgressChan              chan interface{}
}

type ConfigMapOutput added in v0.13.3

type ConfigMapOutput struct {
	Namespace       string            `json:"namespace"`
	Name            string            `json:"name"`
	Key             string            `json:"key"`
	ConfigMapExists bool              `json:"configMapExists"`
	KeyExists       bool              `json:"keyExists"`
	Value           string            `json:"value,omitempty"`
	Data            map[string]string `json:"data,omitonempty"`
}

type DatabaseConnection added in v0.9.27

type DatabaseConnection struct {
	IsConnected bool              `json:"isConnected"`
	Error       string            `json:"error,omitempty"`
	Version     string            `json:"version,omitempty"`
	Variables   map[string]string `json:"variables,omitempty"`
}

type DiskUsageInfo added in v0.10.0

type DiskUsageInfo struct {
	TotalBytes uint64 `json:"total_bytes"`
	UsedBytes  uint64 `json:"used_bytes"`
}

type Durations added in v0.10.4

type Durations []time.Duration

func (Durations) Len added in v0.10.4

func (d Durations) Len() int

func (Durations) Less added in v0.10.4

func (d Durations) Less(i, j int) bool

func (Durations) Swap added in v0.10.4

func (d Durations) Swap(i, j int)

type FSPerfResults added in v0.10.4

func (FSPerfResults) String added in v0.10.18

func (f FSPerfResults) String() string

type HTTPError added in v0.10.2

type HTTPError struct {
	Message string `json:"message"`
}

type HTTPResponse added in v0.10.2

type HTTPResponse struct {
	Status  int               `json:"status"`
	Body    string            `json:"body"`
	Headers map[string]string `json:"headers"`
}

type HostCollectResult added in v0.15.0

type HostCollectResult struct {
	AllCollectedData map[string][]byte
	Collectors       []HostCollector
	Spec             *troubleshootv1beta2.HostCollector
}

func CollectHost added in v0.15.0

CollectHost runs the collection phase for a local collector.

type HostCollector added in v0.10.0

type HostCollector interface {
	Title() string
	IsExcluded() (bool, error)
	Collect(progressChan chan<- interface{}) (map[string][]byte, error)
}

func GetHostCollector added in v0.10.8

func GetHostCollector(collector *troubleshootv1beta2.HostCollect, bundlePath string) (HostCollector, bool)

type HostOSInfo added in v0.16.0

type HostOSInfo struct {
	Name            string `json:"name"`
	KernelVersion   string `json:"kernelVersion"`
	PlatformVersion string `json:"platformVersion"`
	Platform        string `json:"platform"`
}

type HostRunInfo added in v0.37.0

type HostRunInfo struct {
	Command  string `json:"command"`
	ExitCode string `json:"exitCode"`
	Error    string `json:"error"`
}

type ImageRunner added in v0.38.0

type ImageRunner interface {
	GetImage() string
	SetImage(string)

	GetImagePullSecret() *v1beta2.ImagePullSecrets
	SetImagePullSecret(*v1beta2.ImagePullSecrets)

	GetNamespace() string
}

type KernelModuleInfo added in v0.15.0

type KernelModuleInfo struct {
	Size      uint64             `json:"size"`
	Instances uint               `json:"instances"`
	Status    KernelModuleStatus `json:"status"`
}

type KernelModuleStatus added in v0.15.0

type KernelModuleStatus string

type MemoryInfo added in v0.10.0

type MemoryInfo struct {
	Total uint64 `json:"total"`
}

type MergeableCollector added in v0.44.0

type MergeableCollector interface {
	Collector
	Merge(allCollectors []Collector) ([]Collector, error)
}

type NTPStatus added in v0.10.2

type NTPStatus string

type NetworkStatus added in v0.10.0

type NetworkStatus string

type NetworkStatusResult added in v0.10.0

type NetworkStatusResult struct {
	Status  NetworkStatus `json:"status"`
	Message string        `json:"message"`
}

type ParsedCertificate added in v0.62.0

type ParsedCertificate struct {
	CertName                string    `json:"certificate"`
	Subject                 string    `json:"subject"`
	SubjectAlternativeNames []string  `json:"subjectAlternativeNames"`
	Issuer                  string    `json:"issuer"`
	NotAfter                time.Time `json:"notAfter"`
	NotBefore               time.Time `json:"notBefore"`
	IsValid                 bool      `json:"isValid"`
	IsCA                    bool      `json:"isCA"`
}

Certificate Struct

func CertParser added in v0.62.0

func CertParser(certName string, certs []byte, currentTime time.Time) ([]ParsedCertificate, []string)

Certificate parser

type PodSpecRunner added in v0.38.0

type PodSpecRunner interface {
	GetPodSpec() corev1.PodSpec
	SetPodSpec(corev1.PodSpec)

	GetImagePullSecret() *v1beta2.ImagePullSecrets
	SetImagePullSecret(*v1beta2.ImagePullSecrets)

	GetNamespace() string
}

type RBACError added in v0.9.15

type RBACError struct {
	DisplayName string
	Namespace   string
	Resource    string
	Verb        string
}

func (RBACError) Error added in v0.9.15

func (e RBACError) Error() string

type RBACErrors added in v0.44.0

type RBACErrors []error

func (*RBACErrors) CheckRBAC added in v0.44.0

func (e *RBACErrors) CheckRBAC(ctx context.Context, c Collector, collector *troubleshootv1beta2.Collect, clientConfig *rest.Config, namespace string) error

func (RBACErrors) GetRBACErrors added in v0.44.0

func (e RBACErrors) GetRBACErrors() []error

func (RBACErrors) HasRBACErrors added in v0.44.0

func (e RBACErrors) HasRBACErrors() bool

type RegistryImage added in v0.10.16

type RegistryImage struct {
	Exists bool   `json:"exists"`
	Error  string `json:"error,omitempty"`
}

type RegistryInfo added in v0.10.16

type RegistryInfo struct {
	Images map[string]RegistryImage `json:"images"`
}

type RemoteCollectResult added in v0.15.0

type RemoteCollectResult struct {
	AllCollectedData map[string][]byte
	Collectors       RemoteCollectors
	Spec             *troubleshootv1beta2.RemoteCollector
	// contains filtered or unexported fields
}

func CollectRemote added in v0.15.0

CollectRemote runs the collection phase for a remote collector.

type RemoteCollector added in v0.15.0

type RemoteCollector struct {
	Collect       *troubleshootv1beta2.RemoteCollect
	Redact        bool
	RBACErrors    []error
	ClientConfig  *rest.Config
	Image         string
	PullPolicy    string
	LabelSelector string
	Namespace     string
	BundlePath    string
	Timeout       time.Duration
}

func (*RemoteCollector) CheckRBAC added in v0.15.0

func (c *RemoteCollector) CheckRBAC(ctx context.Context) error

func (*RemoteCollector) GetDisplayName added in v0.15.0

func (c *RemoteCollector) GetDisplayName() string

func (*RemoteCollector) IsExcluded added in v0.15.0

func (c *RemoteCollector) IsExcluded() bool

checks if a given collector has a spec with 'exclude' that evaluates to true.

func (*RemoteCollector) RunCollectorSync added in v0.15.0

func (c *RemoteCollector) RunCollectorSync(globalRedactors []*troubleshootv1beta2.Redact) (CollectorResult, error)

func (*RemoteCollector) RunRemote added in v0.15.0

func (c *RemoteCollector) RunRemote(ctx context.Context, runner runner, nodes []string, collector *troubleshootv1beta2.HostCollect, nameGenerator names.NameGenerator, namePrefix string) (map[string][]byte, error)

type RemoteCollectors added in v0.15.0

type RemoteCollectors []*RemoteCollector

func (RemoteCollectors) CheckRBAC added in v0.15.0

func (cs RemoteCollectors) CheckRBAC(ctx context.Context) error

type RunPodOptions added in v0.14.0

type RunPodOptions struct {
	Image               string
	ImagePullPolicy     string
	Namespace           string
	Command             []string
	ImagePullSecretName string
	HostNetwork         bool
}

RunPodOptions and RunPodReadyNodes currently only used for the Sysctl collector TODO: refactor sysctl collector and runPod collector to share the same code

type SecretOutput

type SecretOutput 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 ServiceInfo added in v0.10.15

type ServiceInfo struct {
	Unit   string `json:"Unit"`
	Load   string `json:"Load"`
	Active string `json:"Active"`
	Sub    string `json:"Sub"`
}

type SubnetAvailableResult added in v0.59.0

type SubnetAvailableResult struct {
	CIDRRangeAlloc string `json:"CIDRRangeAlloc"`
	DesiredCIDR    int    `json:"desiredCIDR"`
	// If subnet-available, at least 1 of the DesiredCIDR size is available within CIDRRangeAlloc
	Status SubnetStatus `json:"status"`
}

type SubnetStatus added in v0.59.0

type SubnetStatus string

type SystemPackage added in v0.24.0

type SystemPackage struct {
	Name     string `json:"name"`
	Details  string `json:"details"`
	ExitCode string `json:"exitCode"`
	Error    string `json:"error,omitempty"`
}

type SystemPackagesInfo added in v0.24.0

type SystemPackagesInfo struct {
	OS        string          `json:"os"`
	OSVersion string          `json:"osVersion"`
	Packages  []SystemPackage `json:"packages"`
}

type TimeInfo added in v0.10.2

type TimeInfo struct {
	Timezone        string `json:"timezone"`
	NTPSynchronized bool   `json:"ntp_synchronized"`
	NTPActive       bool   `json:"ntp_active"`
}

Jump to

Keyboard shortcuts

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