workloads

package
v0.0.0-...-898015a Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gatherer

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

func New

func New(gatherKubeConfig, gatherProtoKubeConfig *rest.Config) *Gatherer

func (*Gatherer) GatherHelmInfo

func (g *Gatherer) GatherHelmInfo(ctx context.Context) ([]record.Record, []error)

GatherHelmInfo Collects statistics about resources deployed via HelmChart, counting only the resources with `app.kubernetes.io/managed-by=Helm` and `helm.sh/chart` labels. The data is then summarized and grouped by hashed namespace.

Resource types included: - ReplicaSets - DaemonSets - StatefulSets - Services - Deployments

### API Reference None

### Sample data - docs/insights-archive-sample/config/helmchart_info.json

### Location in archive - `config/helmchart_info.json`

### Config ID `workloads/helmchart_info`

### Released version - 4.15.0

### Backported versions None

func (*Gatherer) GatherWorkloadInfo

func (g *Gatherer) GatherWorkloadInfo(ctx context.Context) ([]record.Record, []error)

GatherWorkloadInfo Collects summarized info about the workloads on a cluster in a generic fashion

### API Reference None

### Sample data - docs/insights-archive-sample/config/workload_info.json

### Location in archive - `config/workload_info.json`

### Config ID `workloads/workload_info`

### Released version - 4.8.0

### Backported versions None

### Changes - Image repository is now collected if it comes from outside the Red Hat domain

func (*Gatherer) GetGatheringFunctions

func (g *Gatherer) GetGatheringFunctions(context.Context) (map[string]gatherers.GatheringClosure, error)

func (*Gatherer) GetName

func (g *Gatherer) GetName() string

func (*Gatherer) ShouldBeProcessedNow

func (g *Gatherer) ShouldBeProcessedNow() bool

func (*Gatherer) UpdateLastProcessingTime

func (g *Gatherer) UpdateLastProcessingTime()

type HelmChartInfo

type HelmChartInfo struct {
	Name      string         `json:"name"`
	Version   string         `json:"version"`
	Resources map[string]int `json:"resources"`
}

HelmChartInfo describes the helm chart data collected by the gather

type HelmChartInfoList

type HelmChartInfoList struct {
	Namespaces map[string][]HelmChartInfo
}

HelmChartInfoList encapsulate the logic to add items to the namespace map

Jump to

Keyboard shortcuts

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