Documentation ¶
Index ¶
- type FSSConfigMapInfo
- type K8sGuestInitParams
- type K8sOrchestrator
- func (c *K8sOrchestrator) AnnotateVolumeSnapshot(ctx context.Context, volumeSnapshotName string, volumeSnapshotNamespace string, ...) (bool, error)
- func (c *K8sOrchestrator) ClearFakeAttached(ctx context.Context, volumeID string) error
- func (c *K8sOrchestrator) CreateConfigMap(ctx context.Context, name string, namespace string, data map[string]string, ...) error
- func (c *K8sOrchestrator) GetAllK8sVolumes() []string
- func (c *K8sOrchestrator) GetAllVolumes() []string
- func (c *K8sOrchestrator) GetCSINodeTopologyInstanceByName(nodeName string) (item interface{}, exists bool, err error)
- func (c *K8sOrchestrator) GetCSINodeTopologyInstancesList() []interface{}
- func (c *K8sOrchestrator) GetConfigMap(ctx context.Context, name string, namespace string) (map[string]string, error)
- func (c *K8sOrchestrator) GetFakeAttachedVolumes(ctx context.Context, volumeIDs []string) map[string]bool
- func (c *K8sOrchestrator) GetNodeIDtoNameMap(ctx context.Context) map[string]string
- func (c *K8sOrchestrator) GetNodesForVolumes(ctx context.Context, volumeIDs []string) map[string][]string
- func (c *K8sOrchestrator) GetPVNameFromCSIVolumeID(volumeID string) (string, bool)
- func (c *K8sOrchestrator) GetVolumeAttachment(ctx context.Context, volumeId string, nodeName string) (*storagev1.VolumeAttachment, error)
- func (c *K8sOrchestrator) InitTopologyServiceInController(ctx context.Context) (commoncotypes.ControllerTopologyService, error)
- func (c *K8sOrchestrator) InitTopologyServiceInNode(ctx context.Context) (commoncotypes.NodeTopologyService, error)
- func (c *K8sOrchestrator) InitializeCSINodes(ctx context.Context) error
- func (c *K8sOrchestrator) IsFSSEnabled(ctx context.Context, featureName string) bool
- func (c *K8sOrchestrator) IsFakeAttachAllowed(ctx context.Context, volumeID string, volumeManager cnsvolume.Manager) (bool, error)
- func (c *K8sOrchestrator) MarkFakeAttached(ctx context.Context, volumeID string) error
- type K8sSupervisorInitParams
- type K8sVanillaInitParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FSSConfigMapInfo ¶
type FSSConfigMapInfo struct {
// contains filtered or unexported fields
}
FSSConfigMapInfo contains details about the FSS configmap(s) present in all flavors.
type K8sGuestInitParams ¶
type K8sGuestInitParams struct { InternalFeatureStatesConfigInfo cnsconfig.FeatureStatesConfigInfo SupervisorFeatureStatesConfigInfo cnsconfig.FeatureStatesConfigInfo ServiceMode string OperationMode string }
K8sGuestInitParams lists the set of parameters required to run the init for K8sOrchestrator in Guest cluster.
type K8sOrchestrator ¶
type K8sOrchestrator struct {
// contains filtered or unexported fields
}
K8sOrchestrator defines set of properties specific to K8s.
func Newk8sOrchestrator ¶
func Newk8sOrchestrator(ctx context.Context, controllerClusterFlavor cnstypes.CnsClusterFlavor, params interface{}) (*K8sOrchestrator, error)
Newk8sOrchestrator instantiates K8sOrchestrator object and returns this object. NOTE: As Newk8sOrchestrator is created in the init of the driver and syncer components, raise an error only if it is of utmost importance.
func (*K8sOrchestrator) AnnotateVolumeSnapshot ¶
func (c *K8sOrchestrator) AnnotateVolumeSnapshot(ctx context.Context, volumeSnapshotName string, volumeSnapshotNamespace string, annotations map[string]string) (bool, error)
AnnotateVolumeSnapshot annotates the volumesnapshot CR in k8s cluster
func (*K8sOrchestrator) ClearFakeAttached ¶
func (c *K8sOrchestrator) ClearFakeAttached(ctx context.Context, volumeID string) error
ClearFakeAttached checks if pvc corresponding to the volume has fake annotations, and unmark it as not fake attached.
func (*K8sOrchestrator) CreateConfigMap ¶
func (c *K8sOrchestrator) CreateConfigMap(ctx context.Context, name string, namespace string, data map[string]string, isImmutable bool) error
CreateConfigMap creates the ConfigMap with given name, namespace, data and immutable parameter values.
func (*K8sOrchestrator) GetAllK8sVolumes ¶
func (c *K8sOrchestrator) GetAllK8sVolumes() []string
GetAllK8sVolumes returns list of volumes in a bound state list Includes Migrated vSphere Volumes VMDK Paths for in-tree vSphere PVs and Volume IDs for CSI PVs
func (*K8sOrchestrator) GetAllVolumes ¶
func (c *K8sOrchestrator) GetAllVolumes() []string
GetAllVolumes returns list of volumes in a bound state for wcp clusters. This will not return VCP-CSI migrated volumes.
func (*K8sOrchestrator) GetCSINodeTopologyInstanceByName ¶
func (c *K8sOrchestrator) GetCSINodeTopologyInstanceByName(nodeName string) ( item interface{}, exists bool, err error)
GetCSINodeTopologyInstanceByName fetches the CSINodeTopology instance for a given nodeName using the K8s informer cache store.
func (*K8sOrchestrator) GetCSINodeTopologyInstancesList ¶
func (c *K8sOrchestrator) GetCSINodeTopologyInstancesList() []interface{}
GetCSINodeTopologyInstancesList lists out all the CSINodeTopology instances using the K8s informer cache store.
func (*K8sOrchestrator) GetConfigMap ¶
func (c *K8sOrchestrator) GetConfigMap(ctx context.Context, name string, namespace string) (map[string]string, error)
GetConfigMap checks if ConfigMap with given name exists in the given namespace. If it exists, this function returns ConfigMap data, otherwise returns error.
func (*K8sOrchestrator) GetFakeAttachedVolumes ¶
func (c *K8sOrchestrator) GetFakeAttachedVolumes(ctx context.Context, volumeIDs []string) map[string]bool
GetFakeAttachedVolumes returns a map of volumeIDs to a bool, which is set to true if volumeID key is fake attached else false
func (*K8sOrchestrator) GetNodeIDtoNameMap ¶
func (c *K8sOrchestrator) GetNodeIDtoNameMap(ctx context.Context) map[string]string
GetNodeIDtoNameMap returns a map containing the nodeID to node name
func (*K8sOrchestrator) GetNodesForVolumes ¶
func (c *K8sOrchestrator) GetNodesForVolumes(ctx context.Context, volumeIDs []string) map[string][]string
GetNodesForVolumes returns a map containing the volumeID to node names map for the given list of volumeIDs
func (*K8sOrchestrator) GetPVNameFromCSIVolumeID ¶ added in v3.0.3
func (c *K8sOrchestrator) GetPVNameFromCSIVolumeID(volumeID string) (string, bool)
GetPVNameFromCSIVolumeID retrieves the pv name from volumeID using volumeIDToNameMap.
func (*K8sOrchestrator) GetVolumeAttachment ¶
func (c *K8sOrchestrator) GetVolumeAttachment(ctx context.Context, volumeId string, nodeName string) ( *storagev1.VolumeAttachment, error)
GetVolumeAttachment returns the VA object by using the given volumeId & nodeName
func (*K8sOrchestrator) InitTopologyServiceInController ¶
func (c *K8sOrchestrator) InitTopologyServiceInController(ctx context.Context) ( commoncotypes.ControllerTopologyService, error)
InitTopologyServiceInController returns a singleton implementation of the commoncotypes.ControllerTopologyService interface.
func (*K8sOrchestrator) InitTopologyServiceInNode ¶
func (c *K8sOrchestrator) InitTopologyServiceInNode(ctx context.Context) ( commoncotypes.NodeTopologyService, error)
InitTopologyServiceInNode returns a singleton implementation of the commoncotypes.NodeTopologyService interface.
func (*K8sOrchestrator) InitializeCSINodes ¶ added in v3.2.0
func (c *K8sOrchestrator) InitializeCSINodes(ctx context.Context) error
InitializeCSINodes listens on node Add events to create CSINode instance for each K8s node object.
func (*K8sOrchestrator) IsFSSEnabled ¶
func (c *K8sOrchestrator) IsFSSEnabled(ctx context.Context, featureName string) bool
IsFSSEnabled utilises the cluster flavor to check their corresponding FSS maps and returns if the feature state switch is enabled for the given feature indicated by featureName.
func (*K8sOrchestrator) IsFakeAttachAllowed ¶
func (c *K8sOrchestrator) IsFakeAttachAllowed(ctx context.Context, volumeID string, volumeManager cnsvolume.Manager) (bool, error)
IsFakeAttachAllowed checks if the volume is eligible to be fake attached and returns a bool value.
func (*K8sOrchestrator) MarkFakeAttached ¶
func (c *K8sOrchestrator) MarkFakeAttached(ctx context.Context, volumeID string) error
MarkFakeAttached updates the pvc corresponding to volume to have a fake attach annotation.
type K8sSupervisorInitParams ¶
type K8sSupervisorInitParams struct { SupervisorFeatureStatesConfigInfo cnsconfig.FeatureStatesConfigInfo ServiceMode string OperationMode string }
K8sSupervisorInitParams lists the set of parameters required to run the init for K8sOrchestrator in Supervisor cluster.
type K8sVanillaInitParams ¶
type K8sVanillaInitParams struct { InternalFeatureStatesConfigInfo cnsconfig.FeatureStatesConfigInfo ServiceMode string OperationMode string }
K8sVanillaInitParams lists the set of parameters required to run the init for K8sOrchestrator in Vanilla cluster.