config

package
v0.0.2-0...-a7ce6ec Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultResyncInterval is the default interval for the controller to
	// resync PersistentVolumeClaims.
	DefaultResyncInterval = 30 * time.Second

	// DefaultDeleteAfter is the default time after which
	// PersistentVolumeClaims are deleted where their managing StatefulSet was
	// deleted.
	DefaultDeleteAfter = 24 * time.Hour

	// DefaultLabelSelector is the default label selector that is used to
	// identify StatefulSets whose PersistentVolumeClaims should be managed by
	// kube-volume-cleaner.
	DefaultLabelSelector = "kube-volume-cleaner.io/on-delete=cleanup-pvcs"

	// DefaultControllerID is the default ID of the controller used to annotate
	// PersistentVolumeClaims with in order to allow multiple controllers to
	// coexist without interfering.
	DefaultControllerID = "kube-volume-resizer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	ControllerID   string
	Namespace      string
	LabelSelector  string
	NoDelete       bool
	DeleteAfter    time.Duration
	ResyncInterval time.Duration
}

Options holds the options that can be configured via cli flags.

func NewDefaultOptions

func NewDefaultOptions() *Options

NewDefaultOptions creates a new *Options value with defaults set.

func (*Options) AddFlags

func (o *Options) AddFlags(cmd *cobra.Command)

AddFlags adds cli flags for configurable options to the command.

func (*Options) Validate

func (o *Options) Validate() error

Validate validates options.

Jump to

Keyboard shortcuts

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