diagnostics

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnalyzerFactory

func NewAnalyzerFactory() *analyzerFactory

func NewCollectorFactory

func NewCollectorFactory(diagnosticCollectorImage string) *collectorFactory

func NewDefaultCollectorFactory

func NewDefaultCollectorFactory() *collectorFactory

func NewFactory

func NewFactory(opts EksaDiagnosticBundleFactoryOpts) *eksaDiagnosticBundleFactory

func ParseTimeFromDuration

func ParseTimeFromDuration(since string) (*time.Time, error)

func ParseTimeOptions

func ParseTimeOptions(since string, sinceTime string) (*time.Time, error)

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 BundleClient interface {
	Collect(ctx context.Context, bundlePath string, sinceTime *time.Time, kubeconfig string) (archivePath string, err error)
	Analyze(ctx context.Context, bundleSpecPath string, archivePath string) ([]*executables.SupportBundleAnalysis, error)
}

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"`
	CopyFromHost     *copyFromHost     `json:"copyFromHost,omitempty"`
	Exec             *exec             `json:"exec,omitempty"`
	Run              *run              `json:"run,omitempty"`
}

type CollectorFactory

type CollectorFactory interface {
	PackagesCollectors() []*Collect
	DefaultCollectors() []*Collect
	ManagementClusterCollectors() []*Collect
	EksaHostCollectors(configs []providers.MachineConfig) []*Collect
	DataCenterConfigCollectors(datacenter v1alpha1.Ref) []*Collect
}

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
	WithDatacenterConfig(config v1alpha1.Ref) *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) (DiagnosticBundle, error)
	DiagnosticBundleWorkloadCluster(spec *cluster.Spec, provider providers.Provider, kubeconfig string) (DiagnosticBundle, error)
	DiagnosticBundleManagementCluster(spec *cluster.Spec, kubeconfig string) (DiagnosticBundle, error)
	DiagnosticBundleDefault() DiagnosticBundle
	DiagnosticBundleCustom(kubeconfig string, bundlePath string) DiagnosticBundle
}

type EksaDiagnosticBundle

type EksaDiagnosticBundle struct {
	// contains filtered or unexported fields
}

func (*EksaDiagnosticBundle) CollectAndAnalyze

func (e *EksaDiagnosticBundle) CollectAndAnalyze(ctx context.Context, sinceTimeValue *time.Time) error

func (*EksaDiagnosticBundle) PrintAnalysis

func (e *EksaDiagnosticBundle) PrintAnalysis() error

func (*EksaDiagnosticBundle) PrintBundleConfig

func (e *EksaDiagnosticBundle) PrintBundleConfig() error

func (*EksaDiagnosticBundle) WithDatacenterConfig

func (e *EksaDiagnosticBundle) WithDatacenterConfig(config v1alpha1.Ref) *EksaDiagnosticBundle

func (*EksaDiagnosticBundle) WithDefaultAnalyzers

func (e *EksaDiagnosticBundle) WithDefaultAnalyzers() *EksaDiagnosticBundle

func (*EksaDiagnosticBundle) WithDefaultCollectors

func (e *EksaDiagnosticBundle) WithDefaultCollectors() *EksaDiagnosticBundle

func (*EksaDiagnosticBundle) WithExternalEtcd

func (*EksaDiagnosticBundle) WithGitOpsConfig

func (e *EksaDiagnosticBundle) WithGitOpsConfig(config *v1alpha1.GitOpsConfig) *EksaDiagnosticBundle

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
}

Directories

Path Synopsis
interfaces
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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