periodic

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const UnknownUtilizationValue = "unknown"

UnknownUtilizationValue is the value which will be used when the free space/inodes utilization is unknown.

Variables

View Source
var ErrNoClient = errors.New("no client provided")

ErrNoClient is an error which is returned when the periodic Runner was configured configured without a Kubernetes API client.

View Source
var ErrNoMetricsSource = errors.New("no metrics source provided")

ErrNoMetricsSource is returned when the Runner is configured without a metrics source.

View Source
var ErrStorageClassDoesNotSupportExpansion = errors.New("storage class does not support expansion")

ErrStorageClassDoesNotSupportExpansion is an error which is returned when an annotated PVC uses a storage class that does not support volume expansion.

View Source
var ErrStorageClassNotFound = errors.New("no storage class found")

ErrStorageClassNotFound is an error which is returned when the storage class for a PVC is not found.

View Source
var ErrVolumeModeIsNotFilesystem = errors.New("volume mode is not filesystem")

ErrVolumeModeIsNotFilesystem is an error which is returned if a target PVC for resizing is not using the Filesystem VolumeMode.

Functions

This section is empty.

Types

type Option

type Option func(r *Runner)

Option is a function which configures the Runner.

func WithClient

func WithClient(c client.Client) Option

WithClient configures the Runner with the given client.

func WithEventChannel

func WithEventChannel(ch chan event.GenericEvent) Option

WithEventChannel configures the Runner to use the given channel for enqueuing.

func WithEventRecorder

func WithEventRecorder(recorder record.EventRecorder) Option

WithEventRecorder configures the Runner to use the given event recorder.

func WithInterval

func WithInterval(interval time.Duration) Option

WithInterval configures the Runner with the given interval.

func WithMetricsSource

func WithMetricsSource(src metricssource.Source) Option

WithMetricsSource configures the Runner to use the given source of metrics.

type Runner

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

Runner is a sigs.k8s.io/controller-runtime/pkg/manager.Runnable, which enqueues v1alpha1.PersistentVolumeClaimAutoscaler items for reconciling on regular basis.

func New

func New(opts ...Option) (*Runner, error)

New creates a new Runner with the given options.

func (*Runner) Start

func (r *Runner) Start(ctx context.Context) error

Start implements the sigs.k8s.io/controller-runtime/pkg/manager.Runnable interface.

Jump to

Keyboard shortcuts

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