runners

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2020 License: MIT Imports: 19 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 DefaultThreshold = "10%"

DefaultThreshold is the default value of ResizeThresholdAnnotation.

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 ResizeThresholdAnnotation = "resize.topolvm.io/threshold"

ResizeThresholdAnnotation is the key of resize threshold.

Variables

This section is empty.

Functions

func NewPVCAutoresizer

func NewPVCAutoresizer(mc MetricsClient, interval time.Duration, recorder record.EventRecorder) manager.Runnable

NewPVCAutoresizer returns a new pvcAutoresizer struct

func SetupIndexer added in v0.1.2

func SetupIndexer(mgr ctrl.Manager) error

SetupIndexer setup indices for PVC auto resizer

Types

type MetricsClient

type MetricsClient interface {
	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
	UsedBytes      int64
	CapacityBytes  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 🇻🇳