Documentation
¶
Index ¶
- func Connect(address string, log logr.Logger) (*grpc.ClientConn, error)
- func GetControllerClient(restConfig *rest.Config, scheme *runtime.Scheme) (ctrlClient.Client, error)
- type ConnHandler
- type MultiClusterClient
- type PendingState
- type RemoteClusterClient
- type RemoteK8sConnHandler
- func (k8sConnHandler *RemoteK8sConnHandler) AddOrUpdateConfig(clusterId string, config *rest.Config, log logr.Logger)
- func (k8sConnHandler *RemoteK8sConnHandler) GetConnection(clusterId string) (RemoteClusterClient, error)
- func (k8sConnHandler *RemoteK8sConnHandler) Verify(ctx context.Context) error
- type RemoteK8sControllerClient
- func (c *RemoteK8sControllerClient) CreatePersistentVolume(ctx context.Context, volume *corev1.PersistentVolume) error
- func (c *RemoteK8sControllerClient) CreateReplicationGroup(ctx context.Context, group *repV1Alpha1.DellCSIReplicationGroup) error
- func (c *RemoteK8sControllerClient) CreateStorageClass(ctx context.Context, storageClass *storageV1.StorageClass) error
- func (c *RemoteK8sControllerClient) GetCustomResourceDefinitions(ctx context.Context, crdName string) (*apiExtensionsv1.CustomResourceDefinition, error)
- func (c *RemoteK8sControllerClient) GetPersistentVolume(ctx context.Context, persistentVolumeName string) (*corev1.PersistentVolume, error)
- func (c *RemoteK8sControllerClient) GetPersistentVolumeClaim(ctx context.Context, namespace, claimName string) (*corev1.PersistentVolumeClaim, error)
- func (c *RemoteK8sControllerClient) GetReplicationGroup(ctx context.Context, replicationGroupName string) (*repV1Alpha1.DellCSIReplicationGroup, error)
- func (c *RemoteK8sControllerClient) GetStorageClass(ctx context.Context, storageClassName string) (*storageV1.StorageClass, error)
- func (c *RemoteK8sControllerClient) ListCustomResourceDefinitions(ctx context.Context) (*apiExtensionsv1.CustomResourceDefinitionList, error)
- func (c *RemoteK8sControllerClient) ListReplicationGroup(ctx context.Context) (*repV1Alpha1.DellCSIReplicationGroupList, error)
- func (c *RemoteK8sControllerClient) ListStorageClass(ctx context.Context) (*storageV1.StorageClassList, error)
- func (c *RemoteK8sControllerClient) UpdatePersistentVolume(ctx context.Context, volume *corev1.PersistentVolume) error
- func (c *RemoteK8sControllerClient) UpdatePersistentVolumeClaim(ctx context.Context, claim *corev1.PersistentVolumeClaim) error
- func (c *RemoteK8sControllerClient) UpdateReplicationGroup(ctx context.Context, replicationGroup *repV1Alpha1.DellCSIReplicationGroup) error
- type RgIDType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetControllerClient ¶
func GetControllerClient(restConfig *rest.Config, scheme *runtime.Scheme) (ctrlClient.Client, error)
GetControllerClient - Returns a controller client which reads and writes directly to API server
Types ¶
type ConnHandler ¶
type ConnHandler interface {
Verify(ctx context.Context) error
GetConnection(clusterId string) (RemoteClusterClient, error)
}
ConnHandler - Interface
type MultiClusterClient ¶
type MultiClusterClient interface {
GetConnection(clusterId string) (RemoteClusterClient, error)
GetClusterId() string
}
type PendingState ¶
type PendingState struct {
MaxPending int
Log logr.Logger
// contains filtered or unexported fields
}
pendingState type limits the number of pending requests by making sure there are no other requests for the same RG, otherwise a "pending" error is returned. Additionally, no more than maxPending requests are processed at a time without returning an "overload" error.
type RemoteClusterClient ¶
type RemoteClusterClient interface {
GetStorageClass(ctx context.Context, storageClassName string) (*storageV1.StorageClass, error)
ListStorageClass(ctx context.Context) (*storageV1.StorageClassList, error)
CreateStorageClass(ctx context.Context, storageClass *storageV1.StorageClass) error
ListCustomResourceDefinitions(ctx context.Context) (*apiExtensionsv1.CustomResourceDefinitionList, error)
GetCustomResourceDefinitions(ctx context.Context, crdName string) (*apiExtensionsv1.CustomResourceDefinition, error)
GetPersistentVolume(ctx context.Context, persistentVolumeName string) (*corev1.PersistentVolume, error)
CreatePersistentVolume(ctx context.Context, volume *corev1.PersistentVolume) error
UpdatePersistentVolume(ctx context.Context, volume *corev1.PersistentVolume) error
GetPersistentVolumeClaim(ctx context.Context, namespace, claimName string) (*corev1.PersistentVolumeClaim, error)
UpdatePersistentVolumeClaim(ctx context.Context, claim *corev1.PersistentVolumeClaim) error
GetReplicationGroup(ctx context.Context, replicationGroupName string) (*repV1Alpha1.DellCSIReplicationGroup, error)
UpdateReplicationGroup(ctx context.Context, group *repV1Alpha1.DellCSIReplicationGroup) error
ListReplicationGroup(ctx context.Context) (*repV1Alpha1.DellCSIReplicationGroupList, error)
CreateReplicationGroup(ctx context.Context, group *repV1Alpha1.DellCSIReplicationGroup) error
}
RemoteClusterClient interface provides methods for creating, modifying, deleting objects on a remote k8s cluster
type RemoteK8sConnHandler ¶
type RemoteK8sConnHandler struct {
// contains filtered or unexported fields
}
func (*RemoteK8sConnHandler) AddOrUpdateConfig ¶
func (*RemoteK8sConnHandler) GetConnection ¶
func (k8sConnHandler *RemoteK8sConnHandler) GetConnection(clusterId string) (RemoteClusterClient, error)
type RemoteK8sControllerClient ¶
type RemoteK8sControllerClient struct {
ClusterID string
Client ctrlClient.Client
}
RemoteK8sControllerClient - Represents a single controller split client
func (*RemoteK8sControllerClient) CreatePersistentVolume ¶
func (c *RemoteK8sControllerClient) CreatePersistentVolume(ctx context.Context, volume *corev1.PersistentVolume) error
CreatePersistentVolume
func (*RemoteK8sControllerClient) CreateReplicationGroup ¶
func (c *RemoteK8sControllerClient) CreateReplicationGroup(ctx context.Context, group *repV1Alpha1.DellCSIReplicationGroup) error
CreateReplicationGroup
func (*RemoteK8sControllerClient) CreateStorageClass ¶
func (c *RemoteK8sControllerClient) CreateStorageClass(ctx context.Context, storageClass *storageV1.StorageClass) error
CreateStorageClass
func (*RemoteK8sControllerClient) GetCustomResourceDefinitions ¶
func (c *RemoteK8sControllerClient) GetCustomResourceDefinitions(ctx context.Context, crdName string) (*apiExtensionsv1.CustomResourceDefinition, error)
GetCustomResourceDefinitions
func (*RemoteK8sControllerClient) GetPersistentVolume ¶
func (c *RemoteK8sControllerClient) GetPersistentVolume(ctx context.Context, persistentVolumeName string) (*corev1.PersistentVolume, error)
GetPersistentVolume
func (*RemoteK8sControllerClient) GetPersistentVolumeClaim ¶
func (c *RemoteK8sControllerClient) GetPersistentVolumeClaim(ctx context.Context, namespace, claimName string) (*corev1.PersistentVolumeClaim, error)
GetPersistentVolumeClaim
func (*RemoteK8sControllerClient) GetReplicationGroup ¶
func (c *RemoteK8sControllerClient) GetReplicationGroup(ctx context.Context, replicationGroupName string) (*repV1Alpha1.DellCSIReplicationGroup, error)
GetReplicationGroup
func (*RemoteK8sControllerClient) GetStorageClass ¶
func (c *RemoteK8sControllerClient) GetStorageClass(ctx context.Context, storageClassName string) (*storageV1.StorageClass, error)
GetStorageClass
func (*RemoteK8sControllerClient) ListCustomResourceDefinitions ¶
func (c *RemoteK8sControllerClient) ListCustomResourceDefinitions(ctx context.Context) (*apiExtensionsv1.CustomResourceDefinitionList, error)
func (*RemoteK8sControllerClient) ListReplicationGroup ¶
func (c *RemoteK8sControllerClient) ListReplicationGroup(ctx context.Context) (*repV1Alpha1.DellCSIReplicationGroupList, error)
ListReplicationGroup
func (*RemoteK8sControllerClient) ListStorageClass ¶
func (c *RemoteK8sControllerClient) ListStorageClass(ctx context.Context) (*storageV1.StorageClassList, error)
ListStorageClass
func (*RemoteK8sControllerClient) UpdatePersistentVolume ¶
func (c *RemoteK8sControllerClient) UpdatePersistentVolume(ctx context.Context, volume *corev1.PersistentVolume) error
UpdatePersistentVolume
func (*RemoteK8sControllerClient) UpdatePersistentVolumeClaim ¶
func (c *RemoteK8sControllerClient) UpdatePersistentVolumeClaim(ctx context.Context, claim *corev1.PersistentVolumeClaim) error
UpdatePersistentVolume
func (*RemoteK8sControllerClient) UpdateReplicationGroup ¶
func (c *RemoteK8sControllerClient) UpdateReplicationGroup(ctx context.Context, replicationGroup *repV1Alpha1.DellCSIReplicationGroup) error
UpdateReplicationGroup
type RgIDType ¶
type RgIDType string
func (RgIDType) CheckAndUpdatePendingState ¶
func (rgID RgIDType) CheckAndUpdatePendingState(ps *PendingState) error
func (RgIDType) ClearPending ¶
func (rgID RgIDType) ClearPending(ps *PendingState)