common

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CsiAlibabaCloudPrefix    = "csi.alibabacloud.com"
	ECSInstanceIDTopologyKey = "alibabacloud.com/ecs-instance-id"
	TopologyKeyZone          = "topology.kubernetes.io/zone"
	TopologyKeyRegion        = "topology.kubernetes.io/region"
)
View Source
const (
	// PVCNameKey contains name of the PVC for which is a volume provisioned.
	PVCNameKey = "csi.storage.k8s.io/pvc/name"

	// PVCNamespaceKey contains namespace of the PVC for which is a volume provisioned.
	PVCNamespaceKey = "csi.storage.k8s.io/pvc/namespace"

	// PVNameKey contains name of the final PV that will be used for the dynamically
	// provisioned volume
	PVNameKey = "csi.storage.k8s.io/pv/name"
)

constants of keys in volume parameters

View Source
const (
	SnapshotTTLKey = "storage.alibabacloud.com/snapshot-ttl"

	VolumeSnapshotNamespaceKey = "csi.storage.k8s.io/volumesnapshot/namespace"
	VolumeSnapshotNameKey      = "csi.storage.k8s.io/volumesnapshot/name"

	VolumeGroupSnapshotNamespaceKey = "csi.storage.k8s.io/volumegroupsnapshot/namespace"
	VolumeGroupSnapshotNameKey      = "csi.storage.k8s.io/volumegroupsnapshot/name"
)

constants of keys in volume snapshot parameters

View Source
const (
	// PVCNameTag is tag applied to provisioned alibaba cloud disk for compatibility
	// with in-tree volume plugin. Value of the tag is PVC name. It is applied only when
	// the external provisioner sidecar is started with --extra-create-metadata=true and
	// thus provides such metadata to the CSI driver.
	PVCNameTag = "kubernetes.io/created-for/pvc/name"

	// PVCNamespaceTag is tag applied to provisioned alibaba cloud disk for compatibility
	// with in-tree volume plugin. Value of the tag is PVC namespace. It is applied only when
	// the external provisioner sidecar is started with --extra-create-metadata=true and
	// thus provides such metadata to the CSI driver.
	PVCNamespaceTag = "kubernetes.io/created-for/pvc/namespace"

	// PVNameTag is tag applied to provisioned alibaba cloud disk for compatibility
	// with in-tree volume plugin. Value of the tag is PV name. It is applied only when
	// the external provisioner sidecar is started with --extra-create-metadata=true and
	// thus provides such metadata to the CSI driver.
	PVNameTag = "kubernetes.io/created-for/pv/name"

	// VolumeNameTag is tag applied to provisioned alibaba cloud disk
	// Disk name have many restrictions, so we use this tag to store the original name
	VolumeNameTag = "csi.alibabacloud.com/volume-name"
)
View Source
const (
	VolumeSnapshotNameTag      = "csi.alibabacloud.com/snapshot/name"
	VolumeSnapshotNamespaceTag = "csi.alibabacloud.com/snapshot/namespace"

	VolumeGroupSnapshotNameTag      = "csi.alibabacloud.com/group-snapshot/name"
	VolumeGroupSnapshotNamespaceTag = "csi.alibabacloud.com/group-snapshot/namespace"
)

Tags that will be added to ECS snapshots

Variables

This section is empty.

Functions

func ControllerRPCCapabilities added in v1.6.0

func ControllerRPCCapabilities(capsRPC ...csi.ControllerServiceCapability_RPC_Type) []*csi.ControllerServiceCapability

func GroupControllerRPCCapabilities added in v1.6.0

func GroupControllerRPCCapabilities(capsRPC ...csi.GroupControllerServiceCapability_RPC_Type) []*csi.GroupControllerServiceCapability

func ParseEndpoint added in v1.6.0

func ParseEndpoint(ep string) (string, string, error)

func RunCSIServer

func RunCSIServer(driverType, endpoint string, servers Servers)

func WrapControllerServerWithValidator

func WrapControllerServerWithValidator(server csi.ControllerServer) csi.ControllerServer

func WrapGroupControllerServerWithValidator added in v1.6.0

func WrapGroupControllerServerWithValidator(server csi.GroupControllerServer) csi.GroupControllerServer

func WrapNodeServerWithMetricRecorder added in v1.6.0

func WrapNodeServerWithMetricRecorder(server csi.NodeServer, driverType string, client kubernetes.Interface) csi.NodeServer

func WrapNodeServerWithValidator

func WrapNodeServerWithValidator(server csi.NodeServer) csi.NodeServer

Types

type ControllerServerWithValidator

type ControllerServerWithValidator struct {
	csi.ControllerServer
}

func (*ControllerServerWithValidator) ControllerExpandVolume

func (*ControllerServerWithValidator) ControllerGetVolume added in v1.6.0

func (*ControllerServerWithValidator) ControllerModifyVolume added in v1.6.0

func (*ControllerServerWithValidator) ControllerPublishVolume

func (*ControllerServerWithValidator) ControllerUnpublishVolume

func (*ControllerServerWithValidator) CreateSnapshot

func (*ControllerServerWithValidator) CreateVolume

func (*ControllerServerWithValidator) DeleteSnapshot

func (*ControllerServerWithValidator) DeleteVolume

func (*ControllerServerWithValidator) ValidateVolumeCapabilities

type GenericControllerServer added in v1.6.0

type GenericControllerServer struct {
	csi.UnimplementedControllerServer
}

type GenericGroupControllerServer added in v1.6.0

type GenericGroupControllerServer struct {
	csi.UnimplementedGroupControllerServer
}

type GenericIdentityServer added in v1.6.0

type GenericIdentityServer struct {
	csi.UnimplementedIdentityServer
	Name string
}

func (*GenericIdentityServer) GetPluginCapabilities added in v1.6.0

func (*GenericIdentityServer) GetPluginInfo added in v1.6.0

func (*GenericIdentityServer) Probe added in v1.6.0

type GenericNodeServer added in v1.6.0

type GenericNodeServer struct {
	csi.UnimplementedNodeServer
	NodeID string
}

func (*GenericNodeServer) NodeGetCapabilities added in v1.6.0

func (*GenericNodeServer) NodeGetInfo added in v1.6.0

func (*GenericNodeServer) NodeGetVolumeStats added in v1.6.0

type GroupControllerServerWithValidator added in v1.6.0

type GroupControllerServerWithValidator struct {
	csi.GroupControllerServer
}

func (*GroupControllerServerWithValidator) CreateVolumeGroupSnapshot added in v1.6.0

func (*GroupControllerServerWithValidator) DeleteVolumeGroupSnapshot added in v1.6.0

func (*GroupControllerServerWithValidator) GetVolumeGroupSnapshot added in v1.6.0

type NodeServerWithMetricRecorder added in v1.6.0

type NodeServerWithMetricRecorder struct {
	csi.NodeServer
	// contains filtered or unexported fields
}

func (*NodeServerWithMetricRecorder) NodePublishVolume added in v1.6.0

type NodeServerWithValidator

type NodeServerWithValidator struct {
	csi.NodeServer
}

func (*NodeServerWithValidator) NodeExpandVolume

func (*NodeServerWithValidator) NodeGetVolumeStats

func (*NodeServerWithValidator) NodePublishVolume

func (*NodeServerWithValidator) NodeStageVolume

func (*NodeServerWithValidator) NodeUnpublishVolume

func (*NodeServerWithValidator) NodeUnstageVolume

type Servers added in v1.6.0

type Servers struct {
	IdentityServer        csi.IdentityServer
	ControllerServer      csi.ControllerServer
	NodeServer            csi.NodeServer
	GroupControllerServer csi.GroupControllerServer
}

Servers holds the list of servers.

Jump to

Keyboard shortcuts

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