Documentation ¶
Index ¶
- type AdditionalOptions
- type ClassBuilder
- func (builder *ClassBuilder) Create() (*ClassBuilder, error)
- func (builder *ClassBuilder) Delete() error
- func (builder *ClassBuilder) Exists() bool
- func (builder *ClassBuilder) Update(force bool) (*ClassBuilder, error)
- func (builder *ClassBuilder) WithOptions(options ...AdditionalOptions) *ClassBuilder
- func (builder *ClassBuilder) WithParameter(parameterKey, parameterValue string) *ClassBuilder
- func (builder *ClassBuilder) WithReclaimPolicy(reclaimPolicy corev1.PersistentVolumeReclaimPolicy) *ClassBuilder
- func (builder *ClassBuilder) WithVolumeBindingMode(bindingMode storageV1.VolumeBindingMode) *ClassBuilder
- type PVBuilder
- type PVCBuilder
- func (builder *PVCBuilder) Create() (*PVCBuilder, error)
- func (builder *PVCBuilder) Delete() error
- func (builder *PVCBuilder) DeleteAndWait(timeout time.Duration) error
- func (builder *PVCBuilder) Exists() bool
- func (builder *PVCBuilder) WithPVCAccessMode(accessMode string) (*PVCBuilder, error)
- func (builder *PVCBuilder) WithPVCCapacity(capacity string) (*PVCBuilder, error)
- func (builder *PVCBuilder) WithStorageClass(storageClass string) (*PVCBuilder, error)
- func (builder *PVCBuilder) WithVolumeMode(volumeMode string) (*PVCBuilder, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalOptions ¶
type AdditionalOptions func(builder *ClassBuilder) (*ClassBuilder, error)
AdditionalOptions additional options for storageclass object.
type ClassBuilder ¶
type ClassBuilder struct { // Storageclass definition. Used to create the storageclass object. Definition *storageV1.StorageClass // Created storageclass object Object *storageV1.StorageClass // contains filtered or unexported fields }
ClassBuilder provides struct for storageclass object containing connection to the cluster and the storageclass definitions.
func NewClassBuilder ¶
func NewClassBuilder(apiClient *clients.Settings, name, provisioner string) *ClassBuilder
NewClassBuilder creates a new instance of ClassBuilder.
func (*ClassBuilder) Create ¶
func (builder *ClassBuilder) Create() (*ClassBuilder, error)
Create generates a storageclass in cluster and stores the created object in struct.
func (*ClassBuilder) Delete ¶
func (builder *ClassBuilder) Delete() error
Delete removes a storageclass.
func (*ClassBuilder) Exists ¶
func (builder *ClassBuilder) Exists() bool
Exists checks whether the given storageclass exists.
func (*ClassBuilder) Update ¶
func (builder *ClassBuilder) Update(force bool) (*ClassBuilder, error)
Update renovates the existing storageclass object with the storageclass definition in builder.
func (*ClassBuilder) WithOptions ¶
func (builder *ClassBuilder) WithOptions(options ...AdditionalOptions) *ClassBuilder
WithOptions creates a storageclass with generic mutation options.
func (*ClassBuilder) WithParameter ¶
func (builder *ClassBuilder) WithParameter(parameterKey, parameterValue string) *ClassBuilder
WithParameter adds a parameter to the storage class definition.
func (*ClassBuilder) WithReclaimPolicy ¶
func (builder *ClassBuilder) WithReclaimPolicy( reclaimPolicy corev1.PersistentVolumeReclaimPolicy) *ClassBuilder
WithReclaimPolicy adds a reclaimPolicy to the storageclass definition.
func (*ClassBuilder) WithVolumeBindingMode ¶
func (builder *ClassBuilder) WithVolumeBindingMode( bindingMode storageV1.VolumeBindingMode) *ClassBuilder
WithVolumeBindingMode adds a volumeBindingMode to the storage class definition.
type PVBuilder ¶
type PVBuilder struct { // PersistentVolume definition. Used to create a persistentvolume object Definition *corev1.PersistentVolume // Created persistentvolume object Object *corev1.PersistentVolume // contains filtered or unexported fields }
PVBuilder provides struct for persistentvolume object containing connection to the cluster and the persistentvolume definitions.
func PullPersistentVolume ¶
PullPersistentVolume gets an existing PersistentVolume from the cluster.
type PVCBuilder ¶
type PVCBuilder struct { // PersistentVolumeClaim definition. Used to create a persistentvolumeclaim object Definition *corev1.PersistentVolumeClaim // Created persistentvolumeclaim object Object *corev1.PersistentVolumeClaim // contains filtered or unexported fields }
PVCBuilder provides struct for persistentvolumeclaim object containing connection to the cluster and the persistentvolumeclaim definitions.
func NewPVCBuilder ¶
func NewPVCBuilder(apiClient *clients.Settings, name, nsname string) *PVCBuilder
NewPVCBuilder creates a new structure for persistentvolumeclaim.
func PullPersistentVolumeClaim ¶
func PullPersistentVolumeClaim( apiClient *clients.Settings, persistentVolumeClaim string, nsname string) ( *PVCBuilder, error)
PullPersistentVolumeClaim gets an existing PersistentVolumeClaim from the cluster.
func (*PVCBuilder) Create ¶
func (builder *PVCBuilder) Create() (*PVCBuilder, error)
Create generates a PVC in cluster and stores the created object in struct.
func (*PVCBuilder) Delete ¶
func (builder *PVCBuilder) Delete() error
Delete removes PVC from cluster.
func (*PVCBuilder) DeleteAndWait ¶
func (builder *PVCBuilder) DeleteAndWait(timeout time.Duration) error
DeleteAndWait deletes PersistentVolumeClaim and waits until it is removed from the cluster.
func (*PVCBuilder) Exists ¶
func (builder *PVCBuilder) Exists() bool
Exists checks whether the given PersistentVolumeClaim exists.
func (*PVCBuilder) WithPVCAccessMode ¶
func (builder *PVCBuilder) WithPVCAccessMode(accessMode string) (*PVCBuilder, error)
WithPVCAccessMode configure access mode for the PV.
func (*PVCBuilder) WithPVCCapacity ¶
func (builder *PVCBuilder) WithPVCCapacity(capacity string) (*PVCBuilder, error)
WithPVCCapacity configures the minimum resources the volume should have.
func (*PVCBuilder) WithStorageClass ¶
func (builder *PVCBuilder) WithStorageClass(storageClass string) (*PVCBuilder, error)
WithStorageClass configures storageClass required by the claim.
func (*PVCBuilder) WithVolumeMode ¶
func (builder *PVCBuilder) WithVolumeMode(volumeMode string) (*PVCBuilder, error)
WithVolumeMode configures what type of volume is required by the claim.