runners

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const AutoResizeEnabledKey = "resize.topolvm.io/enabled"

AutoResizeEnabledKey is the key of flag that enables pvc-autoresizer.

View Source
const DefaultIncrease = "10%"

DefaultIncrease is the default value of ResizeIncreaseAnnotation.

View Source
const DefaultInodesThreshold = "10%"

DefaultInodesThreshold is the default value of ResizeInodesThresholdAnnotation.

View Source
const DefaultThreshold = "10%"

DefaultThreshold is the default value of ResizeThresholdAnnotation.

View Source
const InitialResizeGroupByAnnotation = "resize.topolvm.io/initial-resize-group-by"

InitialResizeGroupByAnnotation is the key of the initial-resize group by.

View Source
const PreviousCapacityBytesAnnotation = "resize.topolvm.io/pre_capacity_bytes"

PreviousCapacityBytesAnnotation is the key of previous volume capacity.

View Source
const ResizeIncreaseAnnotation = "resize.topolvm.io/increase"

ResizeIncreaseAnnotation is the key of amount increased.

View Source
const ResizeInodesThresholdAnnotation = "resize.topolvm.io/inodes-threshold"

ResizeInodesThresholdAnnotation is the key of resize threshold for inodes.

View Source
const ResizeThresholdAnnotation = "resize.topolvm.io/threshold"

ResizeThresholdAnnotation is the key of resize threshold.

View Source
const StorageLimitAnnotation = "resize.topolvm.io/storage_limit"

StorageLimitAnnotation is the key of storage limit value

Variables

This section is empty.

Functions

func NewFakeClientWrapper added in v0.1.6

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 PvcStorageLimit added in v0.7.0

func PvcStorageLimit(pvc *corev1.PersistentVolumeClaim) (resource.Quantity, error)

func SetupIndexer added in v0.1.2

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 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
JackTT - Gopher 🇻🇳