Documentation ¶
Index ¶
- Constants
- 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)
- type StorageClusterBuilder
- func (builder *StorageClusterBuilder) Create() (*StorageClusterBuilder, error)
- func (builder *StorageClusterBuilder) Delete() error
- func (builder *StorageClusterBuilder) Exists() bool
- func (builder *StorageClusterBuilder) Get() (*ocsoperatorv1.StorageCluster, error)
- func (builder *StorageClusterBuilder) GetManageNodes() (bool, error)
- func (builder *StorageClusterBuilder) GetManagedResources() (*ocsoperatorv1.ManagedResourcesSpec, error)
- func (builder *StorageClusterBuilder) GetMonDataDirHostPath() (string, error)
- func (builder *StorageClusterBuilder) GetMultiCloudGateway() (*ocsoperatorv1.MultiCloudGatewaySpec, error)
- func (builder *StorageClusterBuilder) GetStorageDeviceSets() ([]ocsoperatorv1.StorageDeviceSet, error)
- func (builder *StorageClusterBuilder) Update() (*StorageClusterBuilder, error)
- func (builder *StorageClusterBuilder) WithManageNodes(expectedManagedNodesValue bool) *StorageClusterBuilder
- func (builder *StorageClusterBuilder) WithManagedResources(expectedManagedResources ocsoperatorv1.ManagedResourcesSpec) *StorageClusterBuilder
- func (builder *StorageClusterBuilder) WithMonDataDirHostPath(expectedMonDataDirHostPath string) *StorageClusterBuilder
- func (builder *StorageClusterBuilder) WithMultiCloudGateway(expectedMultiCloudGateway ocsoperatorv1.MultiCloudGatewaySpec) *StorageClusterBuilder
- func (builder *StorageClusterBuilder) WithStorageDeviceSet(expectedStorageDeviceSet ocsoperatorv1.StorageDeviceSet) *StorageClusterBuilder
Constants ¶
const ( // APIGroup represents storageCluster api group. APIGroup = "ocs.openshift.io" // APIVersion represents version of storageCluster api. APIVersion = "v1" // StorageClusterKind represents kind of storageCluster object. StorageClusterKind = "StorageCluster" )
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.
type StorageClusterBuilder ¶
type StorageClusterBuilder struct { // StorageCluster definition. Used to create a storageCluster object Definition *ocsoperatorv1.StorageCluster // Created storageCluster object Object *ocsoperatorv1.StorageCluster // contains filtered or unexported fields }
StorageClusterBuilder provides struct for StorageCluster object containing connection to the cluster and the storageCluster definitions.
func NewStorageClusterBuilder ¶
func NewStorageClusterBuilder(apiClient *clients.Settings, name, nsname string) *StorageClusterBuilder
NewStorageClusterBuilder creates a new instance of Builder.
func PullStorageCluster ¶
func PullStorageCluster(apiClient *clients.Settings, name, namespace string) (*StorageClusterBuilder, error)
PullStorageCluster gets an existing storageCluster object from the cluster.
func (*StorageClusterBuilder) Create ¶
func (builder *StorageClusterBuilder) Create() (*StorageClusterBuilder, error)
Create makes a storageCluster in the cluster and stores the created object in struct.
func (*StorageClusterBuilder) Delete ¶
func (builder *StorageClusterBuilder) Delete() error
Delete removes storageCluster object from a cluster.
func (*StorageClusterBuilder) Exists ¶
func (builder *StorageClusterBuilder) Exists() bool
Exists checks whether the given storageCluster exists.
func (*StorageClusterBuilder) Get ¶
func (builder *StorageClusterBuilder) Get() (*ocsoperatorv1.StorageCluster, error)
Get fetches existing storageCluster from cluster.
func (*StorageClusterBuilder) GetManageNodes ¶
func (builder *StorageClusterBuilder) GetManageNodes() (bool, error)
GetManageNodes fetches storageCluster manageNodes value.
func (*StorageClusterBuilder) GetManagedResources ¶
func (builder *StorageClusterBuilder) GetManagedResources() (*ocsoperatorv1.ManagedResourcesSpec, error)
GetManagedResources fetches storageCluster managedResources value.
func (*StorageClusterBuilder) GetMonDataDirHostPath ¶
func (builder *StorageClusterBuilder) GetMonDataDirHostPath() (string, error)
GetMonDataDirHostPath fetches storageCluster monDataDirHostPath value.
func (*StorageClusterBuilder) GetMultiCloudGateway ¶
func (builder *StorageClusterBuilder) GetMultiCloudGateway() (*ocsoperatorv1.MultiCloudGatewaySpec, error)
GetMultiCloudGateway fetches storageCluster multiCloudGateway value.
func (*StorageClusterBuilder) GetStorageDeviceSets ¶
func (builder *StorageClusterBuilder) GetStorageDeviceSets() ([]ocsoperatorv1.StorageDeviceSet, error)
GetStorageDeviceSets fetches storageCluster storageDeviceSets value.
func (*StorageClusterBuilder) Update ¶
func (builder *StorageClusterBuilder) Update() (*StorageClusterBuilder, error)
Update renovates the storageCluster in the cluster and stores the created object in struct.
func (*StorageClusterBuilder) WithManageNodes ¶
func (builder *StorageClusterBuilder) WithManageNodes(expectedManagedNodesValue bool) *StorageClusterBuilder
WithManageNodes sets the storageCluster's managedNodes value.
func (*StorageClusterBuilder) WithManagedResources ¶
func (builder *StorageClusterBuilder) WithManagedResources( expectedManagedResources ocsoperatorv1.ManagedResourcesSpec) *StorageClusterBuilder
WithManagedResources sets the storageCluster's managedResources value.
func (*StorageClusterBuilder) WithMonDataDirHostPath ¶
func (builder *StorageClusterBuilder) WithMonDataDirHostPath( expectedMonDataDirHostPath string) *StorageClusterBuilder
WithMonDataDirHostPath sets the storageCluster's monDataDirHostPath value.
func (*StorageClusterBuilder) WithMultiCloudGateway ¶
func (builder *StorageClusterBuilder) WithMultiCloudGateway( expectedMultiCloudGateway ocsoperatorv1.MultiCloudGatewaySpec) *StorageClusterBuilder
WithMultiCloudGateway sets the storageCluster's multiCloudGateway value.
func (*StorageClusterBuilder) WithStorageDeviceSet ¶
func (builder *StorageClusterBuilder) WithStorageDeviceSet( expectedStorageDeviceSet ocsoperatorv1.StorageDeviceSet) *StorageClusterBuilder
WithStorageDeviceSet sets the storageCluster's storageDeviceSets value.