runners

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeClientWrapper

func NewFakeClientWrapper(c client.Client) client.Client

func NewPVCAutoresizer

func NewPVCAutoresizer(mc MetricsClient, c client.Client, log logr.Logger, interval time.Duration,
	recorder record.EventRecorder) manager.Runnable

NewPVCAutoresizer returns a new pvcAutoresizer struct

func SetupIndexer

func SetupIndexer(mgr ctrl.Manager, skipAnnotationCheck bool) error

SetupIndexer setup indices for PVC auto resizer

Types

type MetricsClient

type MetricsClient interface {
	// GetMetrics returns volume stats metrics of PVCs
	//
	// The volume stats consist of available bytes, capacity bytes, available inodes and capacity
	// inodes. This method returns volume stats for a PVC only if all four metrics of the PVC was
	// retrieved from the metrics source.
	GetMetrics(ctx context.Context) (map[types.NamespacedName]*VolumeStats, error)
}

MetricsClient is an interface for getting metrics

func NewK8sMetricsApiClient added in v0.12.0

func NewK8sMetricsApiClient() (MetricsClient, error)

NewK8sMetricsApiClient returns a new k8sMetricsApiClient client

func NewPrometheusClient

func NewPrometheusClient(url string) (MetricsClient, error)

NewPrometheusClient returns a new prometheusClient

type VolumeStats

type VolumeStats struct {
	AvailableBytes     int64
	CapacityBytes      int64
	AvailableInodeSize int64
	CapacityInodeSize  int64
}

VolumeStats is a struct containing metrics used by pvc-autoresizer

Jump to

Keyboard shortcuts

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