Documentation ¶
Index ¶
- func IsClusterHealthy(testClient *TestClient, namespace string) error
- type BlockImage
- type BlockOperation
- func (b *BlockOperation) BlockMap(manifest string) (string, error)
- func (b *BlockOperation) Create(manifest string, size int) (string, error)
- func (b *BlockOperation) CreatePvc(claimName, storageClassName, mode, size string) error
- func (b *BlockOperation) CreateStorageClass(poolName, storageClassName, reclaimPolicy, namespace string, ...) error
- func (b *BlockOperation) DeleteBlock(manifest string) (string, error)
- func (b *BlockOperation) DeleteBlockImage(image BlockImage, namespace string) error
- func (b *BlockOperation) DeletePvc(claimName, storageClassName, mode, size string) error
- func (b *BlockOperation) DeleteStorageClass(poolName, storageClassName, reclaimPolicy, namespace string) error
- func (b *BlockOperation) List(namespace string) ([]BlockImage, error)
- type BucketOperation
- func (b *BucketOperation) CheckOBC(obcName, check string) bool
- func (b *BucketOperation) CreateBucketStorageClass(namespace string, storeName string, storageClassName string, ...) error
- func (b *BucketOperation) CreateObc(obcName string, storageClassName string, bucketName string, createBucket bool) error
- func (b *BucketOperation) DeleteBucketStorageClass(namespace string, storeName string, storageClassName string, ...) error
- func (b *BucketOperation) DeleteObc(obcName string, storageClassName string, bucketName string, createBucket bool) error
- func (b *BucketOperation) GetAccessKey(obcName string) (string, error)
- func (b *BucketOperation) GetSecretKey(obcName string) (string, error)
- type ClientOperation
- func (c *ClientOperation) Create(name, namespace string, caps map[string]string) error
- func (c *ClientOperation) Delete(name, namespace string) error
- func (c *ClientOperation) Get(namespace string, clientName string) (key string, error error)
- func (c *ClientOperation) Update(namespace string, clientName string, caps map[string]string) (updatedcaps map[string]string, error error)
- type FilesystemOperation
- type NFSOperation
- type ObjectOperation
- type ObjectUserOperation
- func (o *ObjectUserOperation) Create(namespace string, userid string, displayName string, store string) error
- func (o *ObjectUserOperation) Delete(namespace string, userid string) error
- func (o *ObjectUserOperation) GetUser(namespace string, store string, userid string) (*rgw.ObjectUser, error)
- func (o *ObjectUserOperation) UserSecretExists(namespace string, store string, userid string) bool
- type PoolOperation
- func (p *PoolOperation) CephPoolExists(namespace, name string) (bool, error)
- func (p *PoolOperation) Create(name, namespace string, replicas int) error
- func (p *PoolOperation) CreateStorageClass(namespace, poolName, storageClassName, reclaimPolicy string) error
- func (p *PoolOperation) CreateStorageClassAndPvc(namespace, poolName, storageClassName, reclaimPolicy, blockName, mode string) error
- func (p *PoolOperation) Delete(name string, namespace string) error
- func (p *PoolOperation) DeletePool(blockClient *BlockOperation, namespace, poolName string) error
- func (p *PoolOperation) DeletePvc(namespace, pvcName string) error
- func (p *PoolOperation) DeleteStorageClass(storageClassName string) error
- func (p *PoolOperation) GetCephPoolDetails(namespace, name string) (client.CephStoragePoolDetails, error)
- func (p *PoolOperation) ListCephPools(namespace string) ([]client.CephStoragePoolSummary, error)
- func (p *PoolOperation) ListPoolCRDs(namespace string) ([]cephv1.CephBlockPool, error)
- func (p *PoolOperation) PoolCRDExists(namespace, name string) (bool, error)
- func (p *PoolOperation) Update(name, namespace string, replicas int) error
- type ReadWriteOperation
- type TestClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsClusterHealthy ¶
func IsClusterHealthy(testClient *TestClient, namespace string) error
IsClusterHealthy determines if the Rook cluster is currently healthy or not.
Types ¶
type BlockImage ¶
type BlockOperation ¶
type BlockOperation struct {
// contains filtered or unexported fields
}
BlockOperation is wrapper for k8s rook block operations
func CreateBlockOperation ¶
func CreateBlockOperation(k8shelp *utils.K8sHelper, manifests installer.CephManifests) *BlockOperation
CreateBlockOperation - Constructor to create BlockOperation - client to perform rook Block operations on k8s
func (*BlockOperation) BlockMap ¶
func (b *BlockOperation) BlockMap(manifest string) (string, error)
BlockMap Function to map a Block using Rook Input parameters - manifest - Pod definition - pod should be defined to use a pvc that was created earlier Output - k8s create pod operation output and/or error
func (*BlockOperation) Create ¶
func (b *BlockOperation) Create(manifest string, size int) (string, error)
BlockCreate Function to create a Block using Rook Input parameters - manifest - pod definition that creates a pvc in k8s - yaml should describe name and size of pvc being created size - not user for k8s implementation since its descried on the pvc yaml definition Output - k8s create pvc operation output and/or error
func (*BlockOperation) CreatePvc ¶
func (b *BlockOperation) CreatePvc(claimName, storageClassName, mode, size string) error
func (*BlockOperation) CreateStorageClass ¶
func (b *BlockOperation) CreateStorageClass(poolName, storageClassName, reclaimPolicy, namespace string, varClusterName bool) error
func (*BlockOperation) DeleteBlock ¶
func (b *BlockOperation) DeleteBlock(manifest string) (string, error)
BlockDelete Function to delete a Block using Rook Input parameters - manifest - pod definition where pvc is described - delete is run on the the yaml definition Output - k8s delete pvc operation output and/or error
func (*BlockOperation) DeleteBlockImage ¶
func (b *BlockOperation) DeleteBlockImage(image BlockImage, namespace string) error
DeleteBlockImage Function to list all the blocks created/being managed by rook
func (*BlockOperation) DeletePvc ¶
func (b *BlockOperation) DeletePvc(claimName, storageClassName, mode, size string) error
func (*BlockOperation) DeleteStorageClass ¶
func (b *BlockOperation) DeleteStorageClass(poolName, storageClassName, reclaimPolicy, namespace string) error
func (*BlockOperation) List ¶
func (b *BlockOperation) List(namespace string) ([]BlockImage, error)
List Function to list all the blocks created/being managed by rook
type BucketOperation ¶
type BucketOperation struct {
// contains filtered or unexported fields
}
BucketOperation is a wrapper for rook bucket operations
func CreateBucketOperation ¶
func CreateBucketOperation(k8sh *utils.K8sHelper, manifests installer.CephManifests) *BucketOperation
CreateBucketOperation creates a new bucket client
func (*BucketOperation) CheckOBC ¶
func (b *BucketOperation) CheckOBC(obcName, check string) bool
CheckOBC, returns true if the obc, secret and configmap are all in the "check" state, and returns false if any of these resources are not in the "check" state. Check state values:
"created", all must exist, "deleted", all must be missing.
func (*BucketOperation) CreateBucketStorageClass ¶
func (*BucketOperation) DeleteBucketStorageClass ¶
func (*BucketOperation) GetAccessKey ¶
func (b *BucketOperation) GetAccessKey(obcName string) (string, error)
Fetch SecretKey, AccessKey for s3 client.
func (*BucketOperation) GetSecretKey ¶
func (b *BucketOperation) GetSecretKey(obcName string) (string, error)
type ClientOperation ¶
type ClientOperation struct {
// contains filtered or unexported fields
}
ClientOperation is a wrapper for k8s rook file operations
func CreateClientOperation ¶
func CreateClientOperation(k8sh *utils.K8sHelper, manifests installer.CephManifests) *ClientOperation
CreateClientOperation Constructor to create ClientOperation - client to perform rook file system operations on k8s
func (*ClientOperation) Create ¶
func (c *ClientOperation) Create(name, namespace string, caps map[string]string) error
Create creates a client in Rook
func (*ClientOperation) Delete ¶
func (c *ClientOperation) Delete(name, namespace string) error
Delete deletes a client in Rook
type FilesystemOperation ¶
type FilesystemOperation struct {
// contains filtered or unexported fields
}
FilesystemOperation is a wrapper for k8s rook file operations
func CreateFilesystemOperation ¶
func CreateFilesystemOperation(k8sh *utils.K8sHelper, manifests installer.CephManifests) *FilesystemOperation
CreateFilesystemOperation Constructor to create FilesystemOperation - client to perform rook file system operations on k8s
func (*FilesystemOperation) Create ¶
func (f *FilesystemOperation) Create(name, namespace string) error
Create creates a filesystem in Rook
func (*FilesystemOperation) Delete ¶
func (f *FilesystemOperation) Delete(name, namespace string) error
Delete deletes a filesystem in Rook
func (*FilesystemOperation) List ¶
func (f *FilesystemOperation) List(namespace string) ([]client.CephFilesystem, error)
List lists filesystems in Rook
func (*FilesystemOperation) ScaleDown ¶
func (f *FilesystemOperation) ScaleDown(name, namespace string) error
ScaleDown scales down the number of active metadata servers of a filesystem in Rook
type NFSOperation ¶
type NFSOperation struct {
// contains filtered or unexported fields
}
NFSOperation is a wrapper for k8s rook file operations
func CreateNFSOperation ¶
func CreateNFSOperation(k8sh *utils.K8sHelper, manifests installer.CephManifests) *NFSOperation
CreateNFSOperation Constructor to create NFSOperation - client to perform ceph nfs operations on k8s
func (*NFSOperation) Create ¶
func (n *NFSOperation) Create(namespace, name, pool string, daemonCount int) error
Create creates a filesystem in Rook
func (*NFSOperation) Delete ¶
func (n *NFSOperation) Delete(namespace, name string) error
Delete deletes a filesystem in Rook
type ObjectOperation ¶
type ObjectOperation struct {
// contains filtered or unexported fields
}
ObjectOperation is wrapper for k8s rook object operations
func CreateObjectOperation ¶
func CreateObjectOperation(k8sh *utils.K8sHelper, manifests installer.CephManifests) *ObjectOperation
CreateObjectOperation creates new rook object client
func (*ObjectOperation) Create ¶
func (o *ObjectOperation) Create(namespace, storeName string, replicaCount int32) error
ObjectCreate Function to create a object store in rook
func (*ObjectOperation) Delete ¶
func (o *ObjectOperation) Delete(namespace, storeName string) error
func (*ObjectOperation) GetEndPointUrl ¶
func (o *ObjectOperation) GetEndPointUrl(namespace string, storeName string) (string, error)
Need to improve the below function for better error handling
type ObjectUserOperation ¶
type ObjectUserOperation struct {
// contains filtered or unexported fields
}
ObjectUserOperation is wrapper for k8s rook object user operations
func CreateObjectUserOperation ¶
func CreateObjectUserOperation(k8sh *utils.K8sHelper, manifests installer.CephManifests) *ObjectUserOperation
CreateObjectUserOperation creates new rook object user client
func (*ObjectUserOperation) Create ¶
func (o *ObjectUserOperation) Create(namespace string, userid string, displayName string, store string) error
ObjectUserCreate Function to create a object store user in rook
func (*ObjectUserOperation) Delete ¶
func (o *ObjectUserOperation) Delete(namespace string, userid string) error
func (*ObjectUserOperation) GetUser ¶
func (o *ObjectUserOperation) GetUser(namespace string, store string, userid string) (*rgw.ObjectUser, error)
ObjectUserGet Function to get the details of an object user from radosgw
func (*ObjectUserOperation) UserSecretExists ¶
func (o *ObjectUserOperation) UserSecretExists(namespace string, store string, userid string) bool
UserSecretExists Function to check that user secret was created
type PoolOperation ¶
type PoolOperation struct {
// contains filtered or unexported fields
}
PoolOperation is a wrapper for rook pool operations
func CreatePoolOperation ¶
func CreatePoolOperation(k8sh *utils.K8sHelper, manifests installer.CephManifests) *PoolOperation
CreatePoolOperation creates a new pool client
func (*PoolOperation) CephPoolExists ¶
func (p *PoolOperation) CephPoolExists(namespace, name string) (bool, error)
func (*PoolOperation) Create ¶
func (p *PoolOperation) Create(name, namespace string, replicas int) error
func (*PoolOperation) CreateStorageClass ¶
func (p *PoolOperation) CreateStorageClass(namespace, poolName, storageClassName, reclaimPolicy string) error
func (*PoolOperation) CreateStorageClassAndPvc ¶
func (p *PoolOperation) CreateStorageClassAndPvc(namespace, poolName, storageClassName, reclaimPolicy, blockName, mode string) error
func (*PoolOperation) DeletePool ¶
func (p *PoolOperation) DeletePool(blockClient *BlockOperation, namespace, poolName string) error
func (*PoolOperation) DeletePvc ¶
func (p *PoolOperation) DeletePvc(namespace, pvcName string) error
func (*PoolOperation) DeleteStorageClass ¶
func (p *PoolOperation) DeleteStorageClass(storageClassName string) error
func (*PoolOperation) GetCephPoolDetails ¶
func (p *PoolOperation) GetCephPoolDetails(namespace, name string) (client.CephStoragePoolDetails, error)
func (*PoolOperation) ListCephPools ¶
func (p *PoolOperation) ListCephPools(namespace string) ([]client.CephStoragePoolSummary, error)
func (*PoolOperation) ListPoolCRDs ¶
func (p *PoolOperation) ListPoolCRDs(namespace string) ([]cephv1.CephBlockPool, error)
func (*PoolOperation) PoolCRDExists ¶
func (p *PoolOperation) PoolCRDExists(namespace, name string) (bool, error)
type ReadWriteOperation ¶
type ReadWriteOperation struct {
// contains filtered or unexported fields
}
ReadWriteOperation is a wrapper for k8s rook file operations
func CreateReadWriteOperation ¶
func CreateReadWriteOperation(k8sh *utils.K8sHelper) *ReadWriteOperation
CreateReadWriteOperation Constructor to create ReadWriteOperation - client to perform rook file system operations on k8s
func (*ReadWriteOperation) CreateWriteClient ¶
func (f *ReadWriteOperation) CreateWriteClient(volName string) ([]string, error)
CreateWriteClient Function to create a nfs client in rook
func (*ReadWriteOperation) Delete ¶
func (f *ReadWriteOperation) Delete() error
Delete Function to delete a nfs consuming pod in rook
type TestClient ¶
type TestClient struct { BlockClient *BlockOperation FSClient *FilesystemOperation NFSClient *NFSOperation ObjectClient *ObjectOperation ObjectUserClient *ObjectUserOperation PoolClient *PoolOperation BucketClient *BucketOperation UserClient *ClientOperation // contains filtered or unexported fields }
TestClient is a wrapper for test client, containing interfaces for all rook operations
func CreateTestClient ¶
func CreateTestClient(k8sHelper *utils.K8sHelper, manifests installer.CephManifests) *TestClient
CreateTestClient creates new instance of test client for a platform
func (TestClient) Status ¶
func (c TestClient) Status(namespace string) (client.CephStatus, error)
Status returns rook status details