workloads

package
v0.0.0-...-8b9bd6b Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 38 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, runtimeExtractorEnabled bool) *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 - [Tech Preview] runtime info for workloads are collected (since 4.18.0)

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

type RuntimeComponent

type RuntimeComponent struct {
	// Name of a runtime used to run the application in the container
	Name string `json:"name,omitempty"`
	// The version of this runtime
	Version string `json:"version,omitempty"`
}

Jump to

Keyboard shortcuts

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