Documentation ¶
Overview ¶
Package bugreport provides tools for assembling debug information for nomos.
Index ¶
- Constants
- type BugReporter
- func (b *BugReporter) AddNomosStatusToZip(ctx context.Context)
- func (b *BugReporter) AddNomosVersionToZip(ctx context.Context)
- func (b *BugReporter) Close()
- func (b *BugReporter) EnabledServices() map[Product]bool
- func (b *BugReporter) FetchCMSystemPods(ctx context.Context) (rd []Readable)
- func (b *BugReporter) FetchLogSources(ctx context.Context) []Readable
- func (b *BugReporter) FetchResources(ctx context.Context) []Readable
- func (b *BugReporter) Open() (err error)
- func (b *BugReporter) WriteRawInZip(toBeRead []Readable)
- type Product
- type Readable
Constants ¶
const ( Namespace = "namespaces" ClusterScope = "cluster" Raw = "raw" Processed = "processed" )
Filepath for bugreport directory
const ( // ConfigSync config sync, AKA Nomos, AKA original ACM ConfigSync = Product("Config Sync") // ConfigSyncMonitoring controller ConfigSyncMonitoring = Product("Config Sync Monitoring") // ResourceGroup controller ResourceGroup = Product("Resource Group") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BugReporter ¶
type BugReporter struct { util.ConfigManagementClient ErrorList []error WritingErrors []error // contains filtered or unexported fields }
BugReporter handles basic data gathering tasks for generating a bug report
func New ¶
func New(ctx context.Context, c client.Client, cs *kubernetes.Clientset) (*BugReporter, error)
New creates a new BugReport
func (*BugReporter) AddNomosStatusToZip ¶
func (b *BugReporter) AddNomosStatusToZip(ctx context.Context)
AddNomosStatusToZip writes `nomos status` to bugreport zip file
func (*BugReporter) AddNomosVersionToZip ¶
func (b *BugReporter) AddNomosVersionToZip(ctx context.Context)
AddNomosVersionToZip writes `nomos version` to bugreport zip file
func (*BugReporter) EnabledServices ¶
func (b *BugReporter) EnabledServices() map[Product]bool
EnabledServices returns the set of services that are enabled
func (*BugReporter) FetchCMSystemPods ¶
func (b *BugReporter) FetchCMSystemPods(ctx context.Context) (rd []Readable)
FetchCMSystemPods provides a Readable for pods in the config-management-system, resource-group-system and config-management-monitoring namespaces.
func (*BugReporter) FetchLogSources ¶
func (b *BugReporter) FetchLogSources(ctx context.Context) []Readable
FetchLogSources provides a set of Readables for all of nomos' container logs TODO: Still need to figure out a good way to test this
func (*BugReporter) FetchResources ¶
func (b *BugReporter) FetchResources(ctx context.Context) []Readable
FetchResources provides a set of Readables for configsync, configmanagement and resourcegroup resources.
func (*BugReporter) Open ¶
func (b *BugReporter) Open() (err error)
Open initializes bugreport zip files
func (*BugReporter) WriteRawInZip ¶
func (b *BugReporter) WriteRawInZip(toBeRead []Readable)
WriteRawInZip writes raw kubernetes resource to bugreport zip file
type Readable ¶
type Readable struct { io.ReadCloser Name string }
Readable is a read handle and an accompanying name