Documentation ¶
Index ¶
- func DumpAllNamespaceInfo(c clientset.Interface, namespace string)
- func DumpNodeDebugInfo(c clientset.Interface, nodeNames []string, ...)
- type ContainerResourceGatherer
- type ContainerResourceUsage
- type EventsLister
- type LogSizeDataTimeseries
- type LogSizeGatherer
- type LogsSizeData
- type LogsSizeDataSummary
- type LogsSizeVerifier
- type NodesSet
- type ResourceConstraint
- type ResourceGathererOptions
- type ResourceUsagePerContainer
- type ResourceUsageSummary
- type SingleContainerSummary
- type SingleLogSummary
- type TimestampedSize
- type WorkItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpAllNamespaceInfo ¶
DumpAllNamespaceInfo dumps events, pods and nodes information in the given namespace.
Types ¶
type ContainerResourceGatherer ¶
type ContainerResourceGatherer struct {
// contains filtered or unexported fields
}
ContainerResourceGatherer is a struct for gathering container resource.
func NewResourceUsageGatherer ¶
func NewResourceUsageGatherer(c clientset.Interface, options ResourceGathererOptions, pods *v1.PodList) (*ContainerResourceGatherer, error)
NewResourceUsageGatherer returns a new ContainerResourceGatherer.
func (*ContainerResourceGatherer) StartGatheringData ¶
func (g *ContainerResourceGatherer) StartGatheringData()
StartGatheringData starts a stat gathering worker blocks for each node to track, and blocks until StopAndSummarize is called.
func (*ContainerResourceGatherer) StopAndSummarize ¶
func (g *ContainerResourceGatherer) StopAndSummarize(percentiles []int, constraints map[string]ResourceConstraint) (*ResourceUsageSummary, error)
StopAndSummarize stops stat gathering workers, processes the collected stats, generates resource summary for the passed-in percentiles, and returns the summary. It returns an error if the resource usage at any percentile is beyond the specified resource constraints.
type ContainerResourceUsage ¶
type ContainerResourceUsage struct { Name string Timestamp time.Time CPUUsageInCores float64 MemoryUsageInBytes uint64 MemoryWorkingSetInBytes uint64 MemoryRSSInBytes uint64 // The interval used to calculate CPUUsageInCores. CPUInterval time.Duration }
ContainerResourceUsage is a structure for gathering container resource usage.
type EventsLister ¶
EventsLister is a func that lists events.
type LogSizeDataTimeseries ¶
type LogSizeDataTimeseries map[string]map[string][]TimestampedSize
LogSizeDataTimeseries is map of timestamped size.
type LogSizeGatherer ¶
type LogSizeGatherer struct {
// contains filtered or unexported fields
}
LogSizeGatherer is a worker which grabs a WorkItem from the channel and does assigned work.
func (*LogSizeGatherer) Work ¶
func (g *LogSizeGatherer) Work() bool
Work does a single unit of work: tries to take out a WorkItem from the queue, ssh-es into a given machine, gathers data, writes it to the shared <data> map, and creates a gorouting which reinserts work item into the queue with a <pollingPeriod> delay. Returns false if worker should exit.
type LogsSizeData ¶
type LogsSizeData struct {
// contains filtered or unexported fields
}
LogsSizeData is a structure for handling timeseries of log size data and lock.
type LogsSizeDataSummary ¶
type LogsSizeDataSummary map[string]map[string]SingleLogSummary
LogsSizeDataSummary is map of log summary. node -> file -> data
func (*LogsSizeDataSummary) PrintHumanReadable ¶
func (s *LogsSizeDataSummary) PrintHumanReadable() string
PrintHumanReadable returns string of log size data summary. TODO: make sure that we don't need locking here
func (*LogsSizeDataSummary) PrintJSON ¶
func (s *LogsSizeDataSummary) PrintJSON() string
PrintJSON returns the summary of log size data with JSON format.
func (*LogsSizeDataSummary) SummaryKind ¶
func (s *LogsSizeDataSummary) SummaryKind() string
SummaryKind returns the summary of log size data summary.
type LogsSizeVerifier ¶
type LogsSizeVerifier struct {
// contains filtered or unexported fields
}
LogsSizeVerifier gathers data about log files sizes from master and node machines. It oversees a <workersNo> workers which do the gathering.
func NewLogsVerifier ¶
func NewLogsVerifier(c clientset.Interface, stopChannel chan bool) *LogsSizeVerifier
NewLogsVerifier creates a new LogsSizeVerifier which will stop when stopChannel is closed
func (*LogsSizeVerifier) GetSummary ¶
func (s *LogsSizeVerifier) GetSummary() *LogsSizeDataSummary
GetSummary returns a summary (average generation rate and number of probes) of the data gathered by LogSizeVerifier
func (*LogsSizeVerifier) Run ¶
func (s *LogsSizeVerifier) Run()
Run starts log size gathering. It starts a gorouting for every worker and then blocks until stopChannel is closed
type ResourceConstraint ¶
ResourceConstraint is a struct to hold constraints.
type ResourceGathererOptions ¶
type ResourceGathererOptions struct { InKubemark bool Nodes NodesSet ResourceDataGatheringPeriod time.Duration ProbeDuration time.Duration PrintVerboseLogs bool }
ResourceGathererOptions is a struct to hold options for resource.
type ResourceUsagePerContainer ¶
type ResourceUsagePerContainer map[string]*ContainerResourceUsage
ResourceUsagePerContainer is map of ContainerResourceUsage
type ResourceUsageSummary ¶
type ResourceUsageSummary map[string][]SingleContainerSummary
ResourceUsageSummary is a struct to hold resource usage summary. we can't have int here, as JSON does not accept integer keys.
func (*ResourceUsageSummary) PrintHumanReadable ¶
func (s *ResourceUsageSummary) PrintHumanReadable() string
PrintHumanReadable prints resource usage summary in human readable.
func (*ResourceUsageSummary) PrintJSON ¶
func (s *ResourceUsageSummary) PrintJSON() string
PrintJSON prints resource usage summary in JSON.
func (*ResourceUsageSummary) SummaryKind ¶
func (s *ResourceUsageSummary) SummaryKind() string
SummaryKind returns string of ResourceUsageSummary
type SingleContainerSummary ¶
SingleContainerSummary is a struct to hold single container summary.
type SingleLogSummary ¶
SingleLogSummary is a structure for handling average generation rate and number of probes.
type TimestampedSize ¶
type TimestampedSize struct {
// contains filtered or unexported fields
}
TimestampedSize contains a size together with a time of measurement.
Directories ¶
Path | Synopsis |
---|---|
Package init sets debug.DumpAllNamespaceInfo as implementation in the framework and enables log size verification and resource gathering.
|
Package init sets debug.DumpAllNamespaceInfo as implementation in the framework and enables log size verification and resource gathering. |