k8sorchestrator

package
v2.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 52 Imported by: 0

Documentation

Index

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
}

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 added in v2.7.0

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) GetAllK8sVolumes added in v2.6.0

func (c *K8sOrchestrator) GetAllK8sVolumes() []string

GetAllK8sVolumes returns list of volumes in a bound state

func (*K8sOrchestrator) GetAllVolumes added in v2.6.0

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) GetFakeAttachedVolumes added in v2.6.0

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 added in v2.6.0

func (c *K8sOrchestrator) GetNodeIDtoNameMap(ctx context.Context) map[string]string

GetNodeIDtoNameMap returns a map containing the nodeID to node name

func (*K8sOrchestrator) GetNodesForVolumes added in v2.6.0

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) GetVolumeAttachment added in v2.6.0

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) 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
}

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
}

K8sVanillaInitParams lists the set of parameters required to run the init for K8sOrchestrator in Vanilla cluster.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL