volumeconfig

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CVCKey

func CVCKey(cvc *apisv1.CStorVolumeConfig) string

CVCKey returns an unique key of a CVC object,

Types

type Builder

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

Builder is the builder object for CStorVolumeConfig

func BuildFrom

func BuildFrom(cvc *apisv1.CStorVolumeConfig) *Builder

BuildFrom returns new instance of Builder from the provided api instance

func NewBuilder

func NewBuilder() *Builder

NewBuilder returns new instance of Builder

func (*Builder) Build

func (b *Builder) Build() (*apisv1.CStorVolumeConfig, error)

Build returns the CStorVolumeConfig API instance

func (*Builder) WithAnnotations

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

WithAnnotations merges existing annotations of CStorVolumeConfig if any with the ones that are provided here

func (*Builder) WithAnnotationsNew

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

WithAnnotationsNew resets existing annotations of CStorVolumeiClaim if any with ones that are provided here

func (*Builder) WithCapacity

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

WithCapacity sets the Capacity of CstorVOlumeClaim by converting string capacity into Quantity

func (*Builder) WithCapacityQty

func (b *Builder) WithCapacityQty(resCapacity resource.Quantity) *Builder

WithCapacityQty sets Capacity of CStorVOlumeClaim

func (*Builder) WithDependentsUpgraded

func (b *Builder) WithDependentsUpgraded() *Builder

WithDependentsUpgraded sets the field to true for new volume

func (*Builder) WithFinalizers

func (b *Builder) WithFinalizers(finalizers []string) *Builder

WithFinalizers merges existing finalizers of CStorVolumeConfig if any with the ones that are provided here

func (*Builder) WithFinalizersNew

func (b *Builder) WithFinalizersNew(finalizers []string) *Builder

WithFinalizersNew resets existing finalizers of CStorVolumeConfig if any with ones that are provided here

func (*Builder) WithGenerateName

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

WithGenerateName sets the GenerateName of CStorVolumeConfig

func (*Builder) WithLabels

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

WithLabels merges existing labels of CStorVolumeConfig 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 of CStorVolumeConfig if any with ones that are provided here

func (*Builder) WithName

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

WithName sets the Name of CStorVolumeConfig

func (*Builder) WithNamespace

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

WithNamespace resets the Namespace of CStorVolumeConfig with provided arguments

func (*Builder) WithNewVersion

func (b *Builder) WithNewVersion(version string) *Builder

WithNewVersion sets the current and desired version field of CStorVolume with provided arguments

func (*Builder) WithNodeID

func (b *Builder) WithNodeID(nodeID string) *Builder

WithNodeID sets NodeID details of CStorVolumeConfig

func (*Builder) WithProvisionCapacityQty

func (b *Builder) WithProvisionCapacityQty(resCapacity resource.Quantity) *Builder

WithProvisionCapacityQty sets initial provided Capacity of CStorVOlumeClaim as a readonly capacity requires in case of volume day2 operations

func (*Builder) WithReplicaCount

func (b *Builder) WithReplicaCount(count string) *Builder

WithReplicaCount sets replica count of CStorVolumeConfig

func (*Builder) WithSource

func (b *Builder) WithSource(volumeSource string) *Builder

WithSource sets the source of CstorVOlume

func (*Builder) WithStatusConditions

func (b *Builder) WithStatusConditions(
	conditions []apisv1.CStorVolumeConfigCondition) *Builder

WithStatusConditions updates the status of CStorVolumeConfig

func (*Builder) WithStatusConditionsNew

func (b *Builder) WithStatusConditionsNew(
	conditions []apisv1.CStorVolumeConfigCondition) *Builder

WithStatusConditionsNew resets the status of CStorVolumeConfig

func (*Builder) WithStatusPhase

func (b *Builder) WithStatusPhase(
	phase apisv1.CStorVolumeConfigPhase) *Builder

WithStatusPhase updates the phase of CStorVolumeConfig

type CStorVolumeConfig

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

CStorVolumeConfig a wrapper for ume object

func NewForAPIObject

func NewForAPIObject(obj *apisv1.CStorVolumeConfig) *CStorVolumeConfig

NewForAPIObject returns a new instance of cstorvolume

type CStorVolumeConfigList

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

List is a list of cstorvolumeclaim objects

func (*CStorVolumeConfigList) Len

func (l *CStorVolumeConfigList) Len() int

Len returns the number of items present in the CStorVolumeConfigList

type Kubeclient

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

Kubeclient enables kubernetes API operations on csi volume instance

func NewKubeclient

func NewKubeclient(opts ...KubeclientBuildOption) *Kubeclient

NewKubeclient returns a new instance of kubeclient meant for csi volume operations

func (*Kubeclient) Create

Create creates a cstorvolumeclaim instance in kubernetes cluster

func (*Kubeclient) Delete

func (k *Kubeclient) Delete(name string) error

Delete deletes the cstorvolumeclaim from kubernetes

func (*Kubeclient) Get

Get returns cstorvolumeclaim object for given name

func (*Kubeclient) GetRaw

func (k *Kubeclient) GetRaw(
	name string,
	opts metav1.GetOptions,
) ([]byte, error)

GetRaw returns cstorvolumeclaim instance in bytes

func (*Kubeclient) List

List returns a list of cstorvolumeclaim instances present in kubernetes cluster

func (*Kubeclient) Patch

func (k *Kubeclient) Patch(
	oldCVC *apismaya.CStorVolumeConfig,
	newCVC *apismaya.CStorVolumeConfig,
	subresources ...string,
) (*apismaya.CStorVolumeConfig, error)

Patch patches this cstorvolumeclaim instance against kubernetes cluster

func (*Kubeclient) Update

Update updates this cstorvolumeclaim instance against kubernetes cluster

func (*Kubeclient) WithNamespace

func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient

WithNamespace sets the provided namespace against this Kubeclient instance

type KubeclientBuildOption

type KubeclientBuildOption func(*Kubeclient)

KubeclientBuildOption defines the abstraction to build a kubeclient instance

func WithClientSet

func WithClientSet(c *clientset.Clientset) KubeclientBuildOption

WithClientSet sets the kubernetes client against the kubeclient instance

func WithKubeConfigPath

func WithKubeConfigPath(path string) KubeclientBuildOption

WithKubeConfigPath sets the kubernetes client against the provided path

func WithNamespace

func WithNamespace(namespace string) KubeclientBuildOption

WithNamespace sets the kubernetes client against the provided namespace

type ListBuilder

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

ListBuilder enables building an instance of umeCStorVolumeConfigList

func NewListBuilder

func NewListBuilder() *ListBuilder

NewListBuilder returns a new instance of listBuilder

func (*ListBuilder) List

List returns the list of CStorVolumeConfigs (cvcs) instances that was built by this builder

func (*ListBuilder) WithAPIList

func (b *ListBuilder) WithAPIList(
	list *apisv1.CStorVolumeConfigList) *ListBuilder

WithAPIList builds the list of cstorvolume claim instances based on the provided CStorVolumeConfig api instances

func (*ListBuilder) WithFilter

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

WithFilter adds filters on which the cstorvolumeclaim has to be filtered

type Predicate

type Predicate func(*CStorVolumeConfig) bool

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

type PredicateList

type PredicateList []Predicate

PredicateList holds a list of cstor volume claims based predicates

Jump to

Keyboard shortcuts

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