Documentation ¶
Index ¶
- Constants
- Variables
- func InitOtelTracing() (*otlptrace.Exporter, error)
- func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability
- func NewNodeServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability
- func NewVolumeCapabilityAccessMode(mode csi.VolumeCapability_AccessMode_Mode) *csi.VolumeCapability_AccessMode
- type GCEControllerServer
- func (gceCS *GCEControllerServer) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (gceCS *GCEControllerServer) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (gceCS *GCEControllerServer) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
- func (gceCS *GCEControllerServer) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (gceCS *GCEControllerServer) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (gceCS *GCEControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (gceCS *GCEControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (gceCS *GCEControllerServer) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (gceCS *GCEControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (gceCS *GCEControllerServer) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (gceCS *GCEControllerServer) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (gceCS *GCEControllerServer) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (gceCS *GCEControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type GCEDriver
- func (gceDriver *GCEDriver) AddControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type) error
- func (gceDriver *GCEDriver) AddNodeServiceCapabilities(nl []csi.NodeServiceCapability_RPC_Type) error
- func (gceDriver *GCEDriver) AddVolumeCapabilityAccessModes(vc []csi.VolumeCapability_AccessMode_Mode) error
- func (gceDriver *GCEDriver) Run(endpoint string, grpcLogCharCap int, enableOtelTracing bool)
- func (gceDriver *GCEDriver) SetupGCEDriver(name, vendorVersion string, extraVolumeLabels map[string]string, ...) error
- func (gceDriver *GCEDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapability_RPC_Type) error
- type GCEIdentityServer
- func (gceIdentity *GCEIdentityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (gceIdentity *GCEIdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (gceIdentity *GCEIdentityServer) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
- type GCENodeServer
- func (ns *GCENodeServer) GetVolumeLimits() (int64, error)
- func (ns *GCENodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (ns *GCENodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (ns *GCENodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (ns *GCENodeServer) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (ns *GCENodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (ns *GCENodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (ns *GCENodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (ns *GCENodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- func (ns *GCENodeServer) WithSerializedFormatAndMount(timeout time.Duration, maxConcurrent int) *GCENodeServer
- type MultiZoneVolumeHandleConfig
- type NonBlockingGRPCServer
- type PDCSIContext
Constants ¶
View Source
const ( // MaxVolumeSizeInBytes is the maximum standard and ssd size of 64TB MaxVolumeSizeInBytes int64 = 64 * 1024 * 1024 * 1024 * 1024 MinimumVolumeSizeInBytes int64 = 1 * 1024 * 1024 * 1024 MinimumDiskSizeInGb = 1 )
Variables ¶
View Source
var ProbeCSIFullMethod = "/csi.v1.Identity/Probe"
Functions ¶
func InitOtelTracing ¶ added in v1.13.0
func NewControllerServiceCapability ¶
func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability
func NewNodeServiceCapability ¶
func NewNodeServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability
func NewVolumeCapabilityAccessMode ¶
func NewVolumeCapabilityAccessMode(mode csi.VolumeCapability_AccessMode_Mode) *csi.VolumeCapability_AccessMode
Types ¶
type GCEControllerServer ¶
type GCEControllerServer struct { Driver *GCEDriver CloudProvider gce.GCECompute Metrics metrics.MetricsManager // contains filtered or unexported fields }
func NewControllerServer ¶
func NewControllerServer(gceDriver *GCEDriver, cloudProvider gce.GCECompute, errorBackoffInitialDuration, errorBackoffMaxDuration time.Duration, fallbackRequisiteZones []string, enableStoragePools bool, multiZoneVolumeHandleConfig MultiZoneVolumeHandleConfig) *GCEControllerServer
func (*GCEControllerServer) ControllerExpandVolume ¶ added in v0.4.0
func (gceCS *GCEControllerServer) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
func (*GCEControllerServer) ControllerGetCapabilities ¶
func (gceCS *GCEControllerServer) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities implements the default GRPC callout.
func (*GCEControllerServer) ControllerGetVolume ¶ added in v1.4.0
func (gceCS *GCEControllerServer) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
TODO(#809): Implement logic and advertise related capabilities.
func (*GCEControllerServer) ControllerPublishVolume ¶
func (gceCS *GCEControllerServer) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
func (*GCEControllerServer) ControllerUnpublishVolume ¶
func (gceCS *GCEControllerServer) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
func (*GCEControllerServer) CreateSnapshot ¶
func (gceCS *GCEControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
func (*GCEControllerServer) CreateVolume ¶
func (gceCS *GCEControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
func (*GCEControllerServer) DeleteSnapshot ¶
func (gceCS *GCEControllerServer) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
func (*GCEControllerServer) DeleteVolume ¶
func (gceCS *GCEControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
func (*GCEControllerServer) GetCapacity ¶
func (gceCS *GCEControllerServer) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
func (*GCEControllerServer) ListSnapshots ¶
func (gceCS *GCEControllerServer) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
func (*GCEControllerServer) ListVolumes ¶
func (gceCS *GCEControllerServer) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
func (*GCEControllerServer) ValidateVolumeCapabilities ¶
func (gceCS *GCEControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
type GCEDriver ¶
type GCEDriver struct {
// contains filtered or unexported fields
}
func GetGCEDriver ¶
func GetGCEDriver() *GCEDriver
func (*GCEDriver) AddControllerServiceCapabilities ¶
func (gceDriver *GCEDriver) AddControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type) error
func (*GCEDriver) AddNodeServiceCapabilities ¶
func (gceDriver *GCEDriver) AddNodeServiceCapabilities(nl []csi.NodeServiceCapability_RPC_Type) error
func (*GCEDriver) AddVolumeCapabilityAccessModes ¶
func (gceDriver *GCEDriver) AddVolumeCapabilityAccessModes(vc []csi.VolumeCapability_AccessMode_Mode) error
func (*GCEDriver) SetupGCEDriver ¶
func (gceDriver *GCEDriver) SetupGCEDriver(name, vendorVersion string, extraVolumeLabels map[string]string, identityServer *GCEIdentityServer, controllerServer *GCEControllerServer, nodeServer *GCENodeServer) error
func (*GCEDriver) ValidateControllerServiceRequest ¶
func (gceDriver *GCEDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapability_RPC_Type) error
type GCEIdentityServer ¶
type GCEIdentityServer struct {
Driver *GCEDriver
}
func NewIdentityServer ¶
func NewIdentityServer(gceDriver *GCEDriver) *GCEIdentityServer
func (*GCEIdentityServer) GetPluginCapabilities ¶
func (gceIdentity *GCEIdentityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
func (*GCEIdentityServer) GetPluginInfo ¶
func (gceIdentity *GCEIdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
GetPluginInfo(context.Context, *GetPluginInfoRequest) (*GetPluginInfoResponse, error)
func (*GCEIdentityServer) Probe ¶
func (gceIdentity *GCEIdentityServer) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
type GCENodeServer ¶
type GCENodeServer struct { Driver *GCEDriver Mounter *mount.SafeFormatAndMount DeviceUtils deviceutils.DeviceUtils VolumeStatter mountmanager.Statter MetadataService metadataservice.MetadataService // contains filtered or unexported fields }
func NewNodeServer ¶
func NewNodeServer(gceDriver *GCEDriver, mounter *mount.SafeFormatAndMount, deviceUtils deviceutils.DeviceUtils, meta metadataservice.MetadataService, statter mountmanager.Statter) *GCENodeServer
func (*GCENodeServer) GetVolumeLimits ¶ added in v0.5.0
func (ns *GCENodeServer) GetVolumeLimits() (int64, error)
func (*GCENodeServer) NodeExpandVolume ¶ added in v0.4.0
func (ns *GCENodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
func (*GCENodeServer) NodeGetCapabilities ¶
func (ns *GCENodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
func (*GCENodeServer) NodeGetInfo ¶
func (ns *GCENodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
func (*GCENodeServer) NodeGetVolumeStats ¶ added in v0.3.0
func (ns *GCENodeServer) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
func (*GCENodeServer) NodePublishVolume ¶
func (ns *GCENodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
func (*GCENodeServer) NodeStageVolume ¶
func (ns *GCENodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
func (*GCENodeServer) NodeUnpublishVolume ¶
func (ns *GCENodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
func (*GCENodeServer) NodeUnstageVolume ¶
func (ns *GCENodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
func (*GCENodeServer) WithSerializedFormatAndMount ¶ added in v1.9.9
func (ns *GCENodeServer) WithSerializedFormatAndMount(timeout time.Duration, maxConcurrent int) *GCENodeServer
type MultiZoneVolumeHandleConfig ¶ added in v1.13.1
type MultiZoneVolumeHandleConfig struct { // A set of supported disk types that are compatible with multi-zone volumeHandles. // The disk type is only validated on ControllerPublish. // Other operations that interacti with volumeHandle (ListVolumes/ControllerUnpublish) // don't validate the disk type. This ensures existing published multi-zone volumes // are listed and unpublished correctly. This allows this flag // to be ratcheted to be more restricted without affecting volumes that are already // published. DiskTypes []string // If set to true, the CSI driver will enable the multi-zone volumeHandle feature. // If set to false, volumeHandles that contain 'multi-zone' will not be translated // to their respective attachment zone (based on the node), which will result in // an "Unknown zone" error on ControllerPublish/ControllerUnpublish. Enable bool }
type NonBlockingGRPCServer ¶
type NonBlockingGRPCServer interface { // Start services at the endpoint Start(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer) // Waits for the service to stop Wait() // Stops the service gracefully Stop() // Stops the service forcefully ForceStop() }
Defines Non blocking GRPC server interfaces
func NewNonBlockingGRPCServer ¶
func NewNonBlockingGRPCServer(enableOtelTracing bool) NonBlockingGRPCServer
type PDCSIContext ¶ added in v1.10.3
type PDCSIContext struct {
ForceAttach bool
}
PDCSIContext is the extracted VolumeContext from controller requests.
Click to show internal directories.
Click to hide internal directories.