Documentation
¶
Index ¶
- func NewAnalyzerFactory() *analyzerFactory
- func NewFactory(opts EksaDiagnosticBundleFactoryOpts) *eksaDiagnosticBundleFactory
- func ParseTimeFromDuration(since string) (*time.Time, error)
- func ParseTimeOptions(since string, sinceTime string) (*time.Time, error)
- type Analyze
- type AnalyzerFactory
- type BundleClient
- type Collect
- type CollectorFactory
- type DiagnosticBundle
- type DiagnosticBundleFactory
- type EKSACollectorFactory
- func (c *EKSACollectorFactory) AuditLogCollectors() []*Collect
- func (c *EKSACollectorFactory) DataCenterConfigCollectors(datacenter v1alpha1.Ref, spec *cluster.Spec) []*Collect
- func (c *EKSACollectorFactory) DefaultCollectors() []*Collect
- func (c *EKSACollectorFactory) EksaHostCollectors(machineConfigs []providers.MachineConfig) []*Collect
- func (c *EKSACollectorFactory) FileCollectors(paths []string) []*Collect
- func (c *EKSACollectorFactory) HostCollectors(datacenter v1alpha1.Ref) []*Collect
- func (c *EKSACollectorFactory) ManagementClusterCollectors() []*Collect
- func (c *EKSACollectorFactory) PackagesCollectors() []*Collect
- type EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) CollectAndAnalyze(ctx context.Context, sinceTimeValue *time.Time) error
- func (e *EksaDiagnosticBundle) PrintAnalysis() error
- func (e *EksaDiagnosticBundle) PrintBundleConfig() error
- func (e *EksaDiagnosticBundle) WithAuditLogs() *EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) WithDatacenterConfig(config v1alpha1.Ref, spec *cluster.Spec) *EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) WithDefaultAnalyzers() *EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) WithDefaultCollectors() *EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) WithDefaultHostCollectors(config v1alpha1.Ref) *EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) WithExternalEtcd(config *v1alpha1.ExternalEtcdConfiguration) *EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) WithFileCollectors(paths []string) *EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) WithGitOpsConfig(config *v1alpha1.GitOpsConfig) *EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) WithHostCollectors(config v1alpha1.Ref) *EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) WithLogTextAnalyzers() *EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) WithMachineConfigs(configs []providers.MachineConfig) *EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) WithManagementCluster(isSelfManaged bool) *EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) WithOidcConfig(config *v1alpha1.OIDCConfig) *EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) WithPackagesCollectors() *EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) WriteAnalysisToFile() (path string, err error)
- func (e *EksaDiagnosticBundle) WriteBundleConfig() error
- type EksaDiagnosticBundleFactoryOpts
- type FileReader
- type Run
- type RunDaemonSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAnalyzerFactory ¶
func NewAnalyzerFactory() *analyzerFactory
func NewFactory ¶
func NewFactory(opts EksaDiagnosticBundleFactoryOpts) *eksaDiagnosticBundleFactory
Types ¶
type Analyze ¶
type Analyze struct {
CustomResourceDefinition *customResourceDefinition `json:"customResourceDefinition,omitempty"`
Secret *analyzeSecret `json:"secret,omitempty"`
ImagePullSecret *imagePullSecret `json:"imagePullSecret,omitempty"`
DeploymentStatus *deploymentStatus `json:"deploymentStatus,omitempty"`
TextAnalyze *textAnalyze `json:"textAnalyze,omitempty"`
}
type AnalyzerFactory ¶
type AnalyzerFactory interface {
DefaultAnalyzers() []*Analyze
EksaGitopsAnalyzers() []*Analyze
EksaLogTextAnalyzers(collectors []*Collect) []*Analyze
EksaOidcAnalyzers() []*Analyze
EksaExternalEtcdAnalyzers() []*Analyze
DataCenterConfigAnalyzers(datacenter v1alpha1.Ref) []*Analyze
ManagementClusterAnalyzers() []*Analyze
PackageAnalyzers() []*Analyze
}
type BundleClient ¶
type Collect ¶
type Collect struct {
ClusterInfo *clusterInfo `json:"clusterInfo,omitempty"`
ClusterResources *clusterResources `json:"clusterResources,omitempty"`
Secret *secret `json:"secret,omitempty"`
Logs *logs `json:"logs,omitempty"`
Data *data `json:"data,omitempty"`
CopyFromHost *copyFromHost `json:"copyFromHost,omitempty"`
Exec *exec `json:"exec,omitempty"`
RunPod *runPod `json:"runPod,omitempty"`
Run *Run `json:"run,omitempty"`
RunDaemonSet *RunDaemonSet `json:"runDaemonSet,omitempty"`
}
type CollectorFactory ¶
type CollectorFactory interface {
PackagesCollectors() []*Collect
DefaultCollectors() []*Collect
HostCollectors(datacenter v1alpha1.Ref) []*Collect
AuditLogCollectors() []*Collect
FileCollectors(paths []string) []*Collect
ManagementClusterCollectors() []*Collect
EksaHostCollectors(configs []providers.MachineConfig) []*Collect
DataCenterConfigCollectors(datacenter v1alpha1.Ref, spec *cluster.Spec) []*Collect
}
CollectorFactory generates support-bundle collectors.
type DiagnosticBundle ¶
type DiagnosticBundle interface {
PrintBundleConfig() error
WriteBundleConfig() error
PrintAnalysis() error
WriteAnalysisToFile() (path string, err error)
CollectAndAnalyze(ctx context.Context, sinceTimeValue *time.Time) error
WithDefaultAnalyzers() *EksaDiagnosticBundle
WithDefaultCollectors() *EksaDiagnosticBundle
WithFileCollectors(paths []string) *EksaDiagnosticBundle
WithDatacenterConfig(config v1alpha1.Ref, spec *cluster.Spec) *EksaDiagnosticBundle
WithOidcConfig(config *v1alpha1.OIDCConfig) *EksaDiagnosticBundle
WithExternalEtcd(config *v1alpha1.ExternalEtcdConfiguration) *EksaDiagnosticBundle
WithGitOpsConfig(config *v1alpha1.GitOpsConfig) *EksaDiagnosticBundle
WithMachineConfigs(configs []providers.MachineConfig) *EksaDiagnosticBundle
WithLogTextAnalyzers() *EksaDiagnosticBundle
}
type DiagnosticBundleFactory ¶
type DiagnosticBundleFactory interface {
DiagnosticBundle(spec *cluster.Spec, provider providers.Provider, kubeconfig string, bundlePath string, auditLogs bool) (DiagnosticBundle, error)
DiagnosticBundleWorkloadCluster(spec *cluster.Spec, provider providers.Provider, kubeconfig string, auditLogs bool) (DiagnosticBundle, error)
DiagnosticBundleManagementCluster(spec *cluster.Spec, kubeconfig string) (DiagnosticBundle, error)
DiagnosticBundleDefault() DiagnosticBundle
DiagnosticBundleCustom(kubeconfig string, bundlePath string) DiagnosticBundle
}
type EKSACollectorFactory ¶ added in v0.15.0
type EKSACollectorFactory struct {
DiagnosticCollectorImage string
// contains filtered or unexported fields
}
EKSACollectorFactory generates support-bundle collectors for eks-a clusters.
func NewCollectorFactory ¶
func NewCollectorFactory(diagnosticCollectorImage string, reader FileReader) *EKSACollectorFactory
NewCollectorFactory builds a collector factory.
func NewDefaultCollectorFactory ¶
func NewDefaultCollectorFactory(reader FileReader) *EKSACollectorFactory
NewDefaultCollectorFactory builds a collector factory that will use the default diagnostic collector image.
func (*EKSACollectorFactory) AuditLogCollectors ¶ added in v0.23.0
func (c *EKSACollectorFactory) AuditLogCollectors() []*Collect
AuditLogCollectors returns the audit log collectors that run on all control plane nodes.
func (*EKSACollectorFactory) DataCenterConfigCollectors ¶ added in v0.15.0
func (c *EKSACollectorFactory) DataCenterConfigCollectors(datacenter v1alpha1.Ref, spec *cluster.Spec) []*Collect
DataCenterConfigCollectors returns the collectors for the provider datacenter config in the cluster spec.
func (*EKSACollectorFactory) DefaultCollectors ¶ added in v0.15.0
func (c *EKSACollectorFactory) DefaultCollectors() []*Collect
DefaultCollectors returns the collectors that apply to all clusters.
func (*EKSACollectorFactory) EksaHostCollectors ¶ added in v0.15.0
func (c *EKSACollectorFactory) EksaHostCollectors(machineConfigs []providers.MachineConfig) []*Collect
EksaHostCollectors returns the collectors that interact with the kubernetes node machine hosts.
func (*EKSACollectorFactory) FileCollectors ¶ added in v0.15.0
func (c *EKSACollectorFactory) FileCollectors(paths []string) []*Collect
FileCollectors returns the collectors that interact with files.
func (*EKSACollectorFactory) HostCollectors ¶ added in v0.22.6
func (c *EKSACollectorFactory) HostCollectors(datacenter v1alpha1.Ref) []*Collect
HostCollectors returns the collectors that run on host machines.
func (*EKSACollectorFactory) ManagementClusterCollectors ¶ added in v0.15.0
func (c *EKSACollectorFactory) ManagementClusterCollectors() []*Collect
ManagementClusterCollectors returns the collectors that only apply to management clusters.
func (*EKSACollectorFactory) PackagesCollectors ¶ added in v0.15.0
func (c *EKSACollectorFactory) PackagesCollectors() []*Collect
PackagesCollectors returns the collectors that read information for curated packages.
type EksaDiagnosticBundle ¶
type EksaDiagnosticBundle struct {
// contains filtered or unexported fields
}
func (*EksaDiagnosticBundle) CollectAndAnalyze ¶
func (*EksaDiagnosticBundle) PrintAnalysis ¶
func (e *EksaDiagnosticBundle) PrintAnalysis() error
func (*EksaDiagnosticBundle) PrintBundleConfig ¶
func (e *EksaDiagnosticBundle) PrintBundleConfig() error
func (*EksaDiagnosticBundle) WithAuditLogs ¶ added in v0.23.0
func (e *EksaDiagnosticBundle) WithAuditLogs() *EksaDiagnosticBundle
WithAuditLogs configures bundle to collect audit logs from control plane nodes.
func (*EksaDiagnosticBundle) WithDatacenterConfig ¶
func (e *EksaDiagnosticBundle) WithDatacenterConfig(config v1alpha1.Ref, spec *cluster.Spec) *EksaDiagnosticBundle
func (*EksaDiagnosticBundle) WithDefaultAnalyzers ¶
func (e *EksaDiagnosticBundle) WithDefaultAnalyzers() *EksaDiagnosticBundle
func (*EksaDiagnosticBundle) WithDefaultCollectors ¶
func (e *EksaDiagnosticBundle) WithDefaultCollectors() *EksaDiagnosticBundle
func (*EksaDiagnosticBundle) WithDefaultHostCollectors ¶ added in v0.22.6
func (e *EksaDiagnosticBundle) WithDefaultHostCollectors(config v1alpha1.Ref) *EksaDiagnosticBundle
WithDefaultHostCollectors collects the default collectors that run on the host machine.
func (*EksaDiagnosticBundle) WithExternalEtcd ¶
func (e *EksaDiagnosticBundle) WithExternalEtcd(config *v1alpha1.ExternalEtcdConfiguration) *EksaDiagnosticBundle
func (*EksaDiagnosticBundle) WithFileCollectors ¶ added in v0.13.0
func (e *EksaDiagnosticBundle) WithFileCollectors(paths []string) *EksaDiagnosticBundle
WithFileCollectors appends collectors that collect static data from the specified paths to the bundle.
func (*EksaDiagnosticBundle) WithGitOpsConfig ¶
func (e *EksaDiagnosticBundle) WithGitOpsConfig(config *v1alpha1.GitOpsConfig) *EksaDiagnosticBundle
func (*EksaDiagnosticBundle) WithHostCollectors ¶ added in v0.22.6
func (e *EksaDiagnosticBundle) WithHostCollectors(config v1alpha1.Ref) *EksaDiagnosticBundle
WithHostCollectors configures host bundle with collectors that run on host machines.
func (*EksaDiagnosticBundle) WithLogTextAnalyzers ¶
func (e *EksaDiagnosticBundle) WithLogTextAnalyzers() *EksaDiagnosticBundle
func (*EksaDiagnosticBundle) WithMachineConfigs ¶
func (e *EksaDiagnosticBundle) WithMachineConfigs(configs []providers.MachineConfig) *EksaDiagnosticBundle
func (*EksaDiagnosticBundle) WithManagementCluster ¶
func (e *EksaDiagnosticBundle) WithManagementCluster(isSelfManaged bool) *EksaDiagnosticBundle
func (*EksaDiagnosticBundle) WithOidcConfig ¶
func (e *EksaDiagnosticBundle) WithOidcConfig(config *v1alpha1.OIDCConfig) *EksaDiagnosticBundle
func (*EksaDiagnosticBundle) WithPackagesCollectors ¶ added in v0.9.0
func (e *EksaDiagnosticBundle) WithPackagesCollectors() *EksaDiagnosticBundle
func (*EksaDiagnosticBundle) WriteAnalysisToFile ¶
func (e *EksaDiagnosticBundle) WriteAnalysisToFile() (path string, err error)
func (*EksaDiagnosticBundle) WriteBundleConfig ¶
func (e *EksaDiagnosticBundle) WriteBundleConfig() error
type EksaDiagnosticBundleFactoryOpts ¶
type EksaDiagnosticBundleFactoryOpts struct {
AnalyzerFactory AnalyzerFactory
Client BundleClient
CollectorFactory CollectorFactory
Kubectl *executables.Kubectl
Writer filewriter.FileWriter
}
type FileReader ¶ added in v0.15.0
FileReader reads files from local disk or http urls.
type Run ¶ added in v0.22.6
type Run struct {
CollectorName string `json:"collectorName,omitempty"`
Command string `json:"command"`
Args []string `json:"args"`
Env []string `json:"env,omitempty"`
IgnoreParentEnvs bool `json:"ignoreParentEnvs,omitempty"`
InheritEnvs []string `json:"inheritEnvs,omitempty"`
OutputDir string `json:"outputDir,omitempty"`
Input map[string]string `json:"input,omitempty"`
Timeout string `json:"timeout,omitempty"`
}
Run is used to define config for commands ran on host via troubleshoot.
type RunDaemonSet ¶ added in v0.23.0
type RunDaemonSet struct {
Name string `json:"name,omitempty"`
Namespace string `json:"namespace,omitempty"`
PodSpec *v1.PodSpec `json:"podSpec"`
Timeout string `json:"timeout,omitempty"`
// contains filtered or unexported fields
}
RunDaemonSet is used to define config for daemonset ran on hosts via troubleshoot.