Documentation ¶
Index ¶
- Constants
- Variables
- func CheckMountPropagationWithNode(managerURL string) error
- func GetCSIEndpoint() string
- func GetInContainerCSIRegistrationDir() string
- func GetInContainerCSISocketDir() string
- func GetInContainerCSISocketFilePath() string
- func GetInContainerKubernetesCSIDir() string
- func GetInContainerPluginsDir() string
- func GetOldCSIEndpoint() string
- func GetOldInContainerCSISocketDir() string
- func GetOldInContainerCSISocketFilePath() string
- func GetOldOnHostCSISocketDir(kubeletRootDir string) string
- func GetOldOnHostCSISocketFilePath(kubeletRootDir string) string
- func GetOnHostCSIRegistrationDir(kubeletRootDir string) string
- func GetOnHostCSISocketDir(kubeletRootDir string) string
- func GetOnHostCSISocketFilePath(kubeletRootDir string) string
- func GetOnHostKubernetesCSIDir(kubeletRootDir string) string
- func GetOnHostObseletedPluginsDir(kubeletRootDir string) string
- func GetOnHostPluginsDir(kubeletRootDir string) string
- type AttacherDeployment
- type CompatibleAttacherDeployment
- type ControllerServer
- func (cs *ControllerServer) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (cs *ControllerServer) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (cs *ControllerServer) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (cs *ControllerServer) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (cs *ControllerServer) CreateSnapshot(context.Context, *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (cs *ControllerServer) DeleteSnapshot(context.Context, *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (cs *ControllerServer) GetCapacity(context.Context, *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (cs *ControllerServer) ListSnapshots(context.Context, *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (cs *ControllerServer) ListVolumes(context.Context, *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (cs *ControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type DriverObjectDeployment
- type IdentityServer
- func (ids *IdentityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (ids *IdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (ids *IdentityServer) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
- type Manager
- type NodeServer
- func (ns *NodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (ns *NodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (ns *NodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (ns *NodeServer) NodeGetVolumeStats(ctx context.Context, in *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (ns *NodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (ns *NodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (ns *NodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- type NonBlockingGRPCServer
- type PluginDeployment
- type ProvisionerDeployment
- type ResizerDeployment
Constants ¶
const ( DefaultCSIAttacherImage = "quay.io/k8scsi/csi-attacher:v2.0.0" DefaultCSIProvisionerImage = "quay.io/k8scsi/csi-provisioner:v1.4.0" DefaultCSIResizerImage = "quay.io/k8scsi/csi-resizer:v0.3.0" DefaultCSINodeDriverRegistrarImage = "quay.io/k8scsi/csi-node-driver-registrar:v1.2.0" DefaultCSIAttacherReplicaCount = 3 DefaultCSIProvisionerReplicaCount = 3 DefaultCSIResizerReplicaCount = 3 DefaultInContainerKubeletRootDir = "/var/lib/kubelet/" DefaultCSISocketFileName = "csi.sock" DefaultOnHostCSIRegistrationDirSuffix = "/plugins_registry" DefaultOnHostObseletedPluginsDirSuffix = "/obsoleted-longhorn-plugins/" DefaultOnHostPluginsDirSuffix = "/plugins/" DefaultInContainerCSISocketDir = "/csi/" DefaultInContainerCSIRegistrationDir = "/registration" DefaultInContainerPluginsDirSuffix = "/plugins/" DefaultKubernetesCSIDirSuffix = "/kubernetes.io/csi/" AnnotationCSIVersion = types.LonghornDriverName + "/version" AnnotationKubernetesVersion = types.LonghornDriverName + "/kubernetes-version" )
Variables ¶
var ( HostPathDirectory = v1.HostPathDirectory HostPathDirectoryOrCreate = v1.HostPathDirectoryOrCreate MountPropagationBidirectional = v1.MountPropagationBidirectional )
var VERSION = "v1.1.0"
Functions ¶
func CheckMountPropagationWithNode ¶
CheckMountPropagationWithNode https://github.com/kubernetes/kubernetes/issues/66086#issuecomment-404346854
func GetCSIEndpoint ¶ added in v0.7.0
func GetCSIEndpoint() string
func GetInContainerCSIRegistrationDir ¶ added in v0.7.0
func GetInContainerCSIRegistrationDir() string
func GetInContainerCSISocketDir ¶ added in v0.7.0
func GetInContainerCSISocketDir() string
func GetInContainerCSISocketFilePath ¶ added in v0.7.0
func GetInContainerCSISocketFilePath() string
func GetInContainerKubernetesCSIDir ¶ added in v0.8.0
func GetInContainerKubernetesCSIDir() string
func GetInContainerPluginsDir ¶ added in v0.7.0
func GetInContainerPluginsDir() string
func GetOldCSIEndpoint ¶ added in v0.7.0
func GetOldCSIEndpoint() string
func GetOldInContainerCSISocketDir ¶ added in v0.7.0
func GetOldInContainerCSISocketDir() string
func GetOldInContainerCSISocketFilePath ¶ added in v0.7.0
func GetOldInContainerCSISocketFilePath() string
func GetOldOnHostCSISocketDir ¶ added in v0.7.0
func GetOldOnHostCSISocketFilePath ¶ added in v0.7.0
func GetOnHostCSIRegistrationDir ¶ added in v0.7.0
func GetOnHostCSISocketDir ¶ added in v0.7.0
func GetOnHostCSISocketFilePath ¶ added in v0.7.0
func GetOnHostKubernetesCSIDir ¶ added in v0.8.0
func GetOnHostObseletedPluginsDir ¶ added in v0.8.0
func GetOnHostPluginsDir ¶ added in v0.7.0
Types ¶
type AttacherDeployment ¶
type AttacherDeployment struct {
// contains filtered or unexported fields
}
func NewAttacherDeployment ¶
func NewAttacherDeployment(namespace, serviceAccount, attacherImage, rootDir string, replicaCount int, tolerations []v1.Toleration) *AttacherDeployment
func (*AttacherDeployment) Cleanup ¶
func (a *AttacherDeployment) Cleanup(kubeClient *clientset.Clientset)
type CompatibleAttacherDeployment ¶ added in v0.7.0
type CompatibleAttacherDeployment struct {
// contains filtered or unexported fields
}
func NewCompatibleAttacherDeployment ¶ added in v0.7.0
func NewCompatibleAttacherDeployment(namespace, serviceAccount, attacherImage, rootDir string, tolerations []v1.Toleration) *CompatibleAttacherDeployment
func (*CompatibleAttacherDeployment) Cleanup ¶ added in v0.7.0
func (a *CompatibleAttacherDeployment) Cleanup(kubeClient *clientset.Clientset)
type ControllerServer ¶
type ControllerServer struct {
// contains filtered or unexported fields
}
func NewControllerServer ¶
func NewControllerServer(apiClient *longhornclient.RancherClient, nodeID string) *ControllerServer
func (*ControllerServer) ControllerExpandVolume ¶ added in v0.7.0
func (cs *ControllerServer) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
func (*ControllerServer) ControllerGetCapabilities ¶ added in v0.7.0
func (cs *ControllerServer) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
func (*ControllerServer) ControllerPublishVolume ¶
func (cs *ControllerServer) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
ControllerPublishVolume will attach the volume to the specified node
func (*ControllerServer) ControllerUnpublishVolume ¶
func (cs *ControllerServer) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
ControllerUnpublishVolume will detach the volume
func (*ControllerServer) CreateSnapshot ¶ added in v0.7.0
func (cs *ControllerServer) CreateSnapshot(context.Context, *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
func (*ControllerServer) CreateVolume ¶
func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
func (*ControllerServer) DeleteSnapshot ¶ added in v0.7.0
func (cs *ControllerServer) DeleteSnapshot(context.Context, *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
func (*ControllerServer) DeleteVolume ¶
func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
func (*ControllerServer) GetCapacity ¶ added in v0.7.0
func (cs *ControllerServer) GetCapacity(context.Context, *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
func (*ControllerServer) ListSnapshots ¶ added in v0.7.0
func (cs *ControllerServer) ListSnapshots(context.Context, *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
func (*ControllerServer) ListVolumes ¶
func (cs *ControllerServer) ListVolumes(context.Context, *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
func (*ControllerServer) ValidateVolumeCapabilities ¶
func (cs *ControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
type DriverObjectDeployment ¶ added in v0.7.0
type DriverObjectDeployment struct {
// contains filtered or unexported fields
}
func NewCSIDriverObject ¶ added in v0.7.0
func NewCSIDriverObject() *DriverObjectDeployment
func (*DriverObjectDeployment) Cleanup ¶ added in v0.7.0
func (d *DriverObjectDeployment) Cleanup(kubeClient *clientset.Clientset)
type IdentityServer ¶
type IdentityServer struct {
// contains filtered or unexported fields
}
func NewIdentityServer ¶
func NewIdentityServer(driverName, version string) *IdentityServer
func (*IdentityServer) GetPluginCapabilities ¶
func (ids *IdentityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
func (*IdentityServer) GetPluginInfo ¶
func (ids *IdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
func (*IdentityServer) Probe ¶
func (ids *IdentityServer) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func GetCSIManager ¶
func GetCSIManager() *Manager
type NodeServer ¶
type NodeServer struct {
// contains filtered or unexported fields
}
func NewNodeServer ¶
func NewNodeServer(apiClient *longhornclient.RancherClient, nodeID string) *NodeServer
func (*NodeServer) NodeExpandVolume ¶ added in v0.7.0
func (ns *NodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
NodeExpandVolume is designed to expand the file system for ONLINE expansion. However, once the block device expansion complete, Longhorn will try to expand the file system even if there is no NodeExpandVolume invocation. Longhorn cannot guarantee if the file system expansion succeeds since some volumes may not contain file system or they are not block devices. This means the function NodeExpandVolume in Longhorn is actually used to verify if the ONLINE expansion complete.
func (*NodeServer) NodeGetCapabilities ¶ added in v0.7.0
func (ns *NodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
func (*NodeServer) NodeGetInfo ¶ added in v0.7.0
func (ns *NodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
func (*NodeServer) NodeGetVolumeStats ¶ added in v0.7.0
func (ns *NodeServer) NodeGetVolumeStats(ctx context.Context, in *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
func (*NodeServer) NodePublishVolume ¶
func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
NodePublishVolume will mount the volume /dev/longhorn/<volume_name> to target_path
func (*NodeServer) NodeStageVolume ¶
func (ns *NodeServer) NodeStageVolume( ctx context.Context, req *csi.NodeStageVolumeRequest) ( *csi.NodeStageVolumeResponse, error)
func (*NodeServer) NodeUnpublishVolume ¶
func (ns *NodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
func (*NodeServer) NodeUnstageVolume ¶
func (ns *NodeServer) NodeUnstageVolume( ctx context.Context, req *csi.NodeUnstageVolumeRequest) ( *csi.NodeUnstageVolumeResponse, error)
type NonBlockingGRPCServer ¶ added in v0.7.0
type NonBlockingGRPCServer struct {
// contains filtered or unexported fields
}
func NewNonBlockingGRPCServer ¶ added in v0.7.0
func NewNonBlockingGRPCServer() *NonBlockingGRPCServer
func (*NonBlockingGRPCServer) ForceStop ¶ added in v0.7.0
func (s *NonBlockingGRPCServer) ForceStop()
func (*NonBlockingGRPCServer) Start ¶ added in v0.7.0
func (s *NonBlockingGRPCServer) Start(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer)
func (*NonBlockingGRPCServer) Stop ¶ added in v0.7.0
func (s *NonBlockingGRPCServer) Stop()
func (*NonBlockingGRPCServer) Wait ¶ added in v0.7.0
func (s *NonBlockingGRPCServer) Wait()
type PluginDeployment ¶
type PluginDeployment struct {
// contains filtered or unexported fields
}
func NewPluginDeployment ¶
func NewPluginDeployment(namespace, serviceAccount, nodeDriverRegistrarImage, managerImage, managerURL, rootDir string, tolerations []v1.Toleration) *PluginDeployment
func (*PluginDeployment) Cleanup ¶
func (p *PluginDeployment) Cleanup(kubeClient *clientset.Clientset)
type ProvisionerDeployment ¶
type ProvisionerDeployment struct {
// contains filtered or unexported fields
}
func NewProvisionerDeployment ¶
func NewProvisionerDeployment(namespace, serviceAccount, provisionerImage, rootDir string, replicaCount int, tolerations []v1.Toleration) *ProvisionerDeployment
func (*ProvisionerDeployment) Cleanup ¶
func (p *ProvisionerDeployment) Cleanup(kubeClient *clientset.Clientset)
type ResizerDeployment ¶ added in v0.8.0
type ResizerDeployment struct {
// contains filtered or unexported fields
}
func NewResizerDeployment ¶ added in v0.8.0
func NewResizerDeployment(namespace, serviceAccount, resizerImage, rootDir string, replicaCount int, tolerations []v1.Toleration) *ResizerDeployment
func (*ResizerDeployment) Cleanup ¶ added in v0.8.0
func (p *ResizerDeployment) Cleanup(kubeClient *clientset.Clientset)