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) 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) 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) WithDatacenterConfig(config v1alpha1.Ref, spec *cluster.Spec) *EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) WithDefaultAnalyzers() *EksaDiagnosticBundle
- func (e *EksaDiagnosticBundle) WithDefaultCollectors() *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) 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
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"` }
type CollectorFactory ¶
type CollectorFactory interface { PackagesCollectors() []*Collect DefaultCollectors() []*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) (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 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) 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) 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) 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) 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) 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.