v1alpha1

package
v1.12.0-RC1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: Apache-2.0 Imports: 5 Imported by: 2

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 enables building an instance of StorageClass

func NewBuilder

func NewBuilder() *Builder

NewBuilder returns new instance of Builder

func (*Builder) Build

func (b *Builder) Build() (*storagev1.StorageClass, error)

Build returns the StorageClass API instance

func (*Builder) WithAnnotations

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

WithAnnotations sets the Annotations field of storageclass with provided value.

func (*Builder) WithGenerateName

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

WithGenerateName appends a random string after the name

func (*Builder) WithName

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

WithName sets the Name field of storageclass with provided argument.

func (*Builder) WithParametersNew

func (b *Builder) WithParametersNew(parameters map[string]string) *Builder

WithParametersNew resets existing parameters if any with ones that are provided here

func (*Builder) WithProvisioner

func (b *Builder) WithProvisioner(provisioner string) *Builder

WithProvisioner sets the Provisioner field of storageclass with provided argument.

func (*Builder) WithVolumeBindingMode

func (b *Builder) WithVolumeBindingMode(bindingMode storagev1.VolumeBindingMode) *Builder

WithVolumeBindingMode sets the volume binding mode of storageclass with provided argument. VolumeBindingMode indicates how PersistentVolumeClaims should be bound. VolumeBindingImmediate indicates that PersistentVolumeClaims should be immediately provisioned and bound. This is the default mode. VolumeBindingWaitForFirstConsumer indicates that PersistentVolumeClaims should not be provisioned and bound until the first Pod is created that references the PeristentVolumeClaim. The volume provisioning and binding will occur during Pod scheduing.

func (*Builder) WithVolumeExpansion

func (b *Builder) WithVolumeExpansion(expansionAllowed bool) *Builder

WithVolumeExpansion sets the AllowedVolumeExpansion field of storageclass with provided argument.

type KubeClientBuildOption

type KubeClientBuildOption func(*Kubeclient)

KubeClientBuildOption defines the abstraction to build a kubeclient instance

func WithClientSet

func WithClientSet(c *kubernetes.Clientset) KubeClientBuildOption

WithClientSet sets the kubernetes client against the kubeclient instance

func WithKubeConfigPath

func WithKubeConfigPath(path string) KubeClientBuildOption

WithKubeConfigPath sets the kubeConfig path against client instance

type Kubeclient

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

Kubeclient enables kubernetes API operations on storageclass instance

func NewKubeClient

func NewKubeClient(opts ...KubeClientBuildOption) *Kubeclient

NewKubeClient returns a new instance of kubeclient meant for storageclass

func (*Kubeclient) Create

Create creates and returns a storageclass instance

func (*Kubeclient) Delete

func (k *Kubeclient) Delete(name string, opts *metav1.DeleteOptions) error

Delete deletes the storageclass if present in kubernetes cluster

func (*Kubeclient) Get

Get return a storageclass instance present in kubernetes cluster

func (*Kubeclient) List

List returns a list of storageclass instances present in kubernetes cluster

type ListBuilder

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

ListBuilder enables building an instance of StorageClassList

func ListBuilderForAPIList

func ListBuilderForAPIList(scl *storagev1.StorageClassList) *ListBuilder

ListBuilderForAPIList builds the ListBuilder object based on SC API list

func ListBuilderForObjects

func ListBuilderForObjects(scl *StorageClassList) *ListBuilder

ListBuilderForObjects returns a instance of ListBuilder from SC instances

func NewListBuilder

func NewListBuilder() *ListBuilder

NewListBuilder returns a instance of ListBuilder

func (*ListBuilder) APIList

func (b *ListBuilder) APIList() (*storagev1.StorageClassList, error)

APIList builds core API PVC list using listbuilder

func (*ListBuilder) Len

func (b *ListBuilder) Len() (int, error)

Len returns the number of items present in the PVCList of a builder

func (*ListBuilder) List

func (b *ListBuilder) List() (*StorageClassList, error)

List returns the list of StorageClass instances that was built by this builder

func (*ListBuilder) WithFilter

func (b *ListBuilder) WithFilter(pred ...Predicate) *ListBuilder

WithFilter add filters on which the StorageClass has to be filtered

type Predicate

type Predicate func(*StorageClass) bool

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

type StorageClass

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

StorageClass is a wrapper over API based storage class instance

func NewForAPIObject

func NewForAPIObject(obj *storagev1.StorageClass) *StorageClass

NewForAPIObject returns a new instance of StorageClass

type StorageClassList

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

StorageClassList holds the list of StorageClass instances

func (*StorageClassList) Len

func (scl *StorageClassList) Len() int

Len returns the number of items present in the StorageClassList

func (*StorageClassList) ToAPIList

func (scl *StorageClassList) ToAPIList() *storagev1.StorageClassList

ToAPIList converts StorageClassList to API StorageClassList

Jump to

Keyboard shortcuts

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