pvc

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder is the builder object for PVC

func NewBuilder

func NewBuilder() *Builder

NewBuilder returns new instance of Builder

func (*Builder) Build

func (b *Builder) Build() (*corev1.PersistentVolumeClaim, error)

Build returns the PVC API instance

func (*Builder) WithAccessModes

func (b *Builder) WithAccessModes(accessMode []corev1.PersistentVolumeAccessMode) *Builder

WithAccessModes sets the AccessMode field in PVC with provided arguments

func (*Builder) WithAnnotations

func (b *Builder) WithAnnotations(annotations map[string]string) *Builder

WithAnnotations sets the Annotations field of PVC with provided arguments

func (*Builder) WithCapacity

func (b *Builder) WithCapacity(capacity string) *Builder

WithCapacity sets the Capacity field in PVC with provided arguments

func (*Builder) WithGenerateName

func (b *Builder) WithGenerateName(name string) *Builder

WithGenerateName sets the GenerateName field of PVC with provided value

func (*Builder) WithLabels

func (b *Builder) WithLabels(labels map[string]string) *Builder

WithLabels merges existing labels if any with the ones that are provided here

func (*Builder) WithLabelsNew

func (b *Builder) WithLabelsNew(labels map[string]string) *Builder

WithLabelsNew resets existing labels if any with ones that are provided here

func (*Builder) WithName

func (b *Builder) WithName(name string) *Builder

WithName sets the Name field of PVC with provided value.

func (*Builder) WithNamespace

func (b *Builder) WithNamespace(namespace string) *Builder

WithNamespace sets the Namespace field of PVC provided arguments

func (*Builder) WithOwnerReferenceNew

func (b *Builder) WithOwnerReferenceNew(ownerRefernce []metav1.OwnerReference) *Builder

WithOwnerReferenceNew sets ownerreference if any with ones that are provided here

func (*Builder) WithStorageClass

func (b *Builder) WithStorageClass(scName string) *Builder

WithStorageClass sets the StorageClass field of PVC with provided arguments

type PVC

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

PVC is a wrapper over persistentvolumeclaim api object. It provides build, validations and other common logic to be used by various feature specific callers.

func NewForAPIObject

func NewForAPIObject(obj *corev1.PersistentVolumeClaim, opts ...pvcBuildOption) *PVC

NewForAPIObject returns a new instance of PVC

func (*PVC) IsBound

func (p *PVC) IsBound() bool

IsBound returns true if the pvc is bounded

func (*PVC) IsNil

func (p *PVC) IsNil() bool

IsNil returns true if the PVC instance is nil

type PVCList

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

PVCList is a wrapper over persistentvolumeclaim api object. It provides build, validations and other common logic to be used by various feature specific callers.

func (*PVCList) Len

func (p *PVCList) Len() int

Len returns the number of items present in the PVCList

func (*PVCList) ToAPIList

func (p *PVCList) ToAPIList() *corev1.PersistentVolumeClaimList

ToAPIList converts PVCList to API PVCList

type Predicate

type Predicate func(*PVC) bool

Predicate defines an abstraction to determine conditional checks against the provided pvc instance

func ContainsName

func ContainsName(name string) Predicate

ContainsName is filter function to filter pvc's based on the name

func IsBound

func IsBound() Predicate

IsBound is a predicate to filter out pvcs which is bounded

func IsNil

func IsNil() Predicate

IsNil is predicate to filter out nil PVC instances

type PredicateList

type PredicateList []Predicate

PredicateList holds a list of predicate

Jump to

Keyboard shortcuts

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