driver

package
v1.21.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Keys for PV and PVC parameters as reported by external-provisioner.
	ParameterKeyPVCName      = "csi.storage.k8s.io/pvc/name"
	ParameterKeyPVCNamespace = "csi.storage.k8s.io/pvc/namespace"
	ParameterKeyPVName       = "csi.storage.k8s.io/pv/name"

	// User provided labels.
	ParameterKeyLabels = "labels"
)

CreateVolume parameters.

View Source
const (
	UmountTimeout = time.Second * 5

	FuseMountType = "fuse"
)
View Source
const (
	CreateVolumeCSIFullMethod      = "/csi.v1.Controller/CreateVolume"
	DeleteVolumeCSIFullMethod      = "/csi.v1.Controller/DeleteVolume"
	NodePublishVolumeCSIFullMethod = "/csi.v1.Node/NodePublishVolume"

	VolumeContextKeyMountOptions               = "mountOptions"
	VolumeContextKeyFileCacheCapacity          = "fileCacheCapacity"
	VolumeContextKeyFileCacheForRangeRead      = "fileCacheForRangeRead"
	VolumeContextKeyMetadataStatCacheCapacity  = "metadataStatCacheCapacity"
	VolumeContextKeyMetadataTypeCacheCapacity  = "metadataTypeCacheCapacity"
	VolumeContextKeyMetadataCacheTTLSeconds    = "metadataCacheTTLSeconds"
	VolumeContextKeyGcsfuseLoggingSeverity     = "gcsfuseLoggingSeverity"
	VolumeContextKeySkipCSIBucketAccessCheck   = "skipCSIBucketAccessCheck"
	VolumeContextKeyHostNetworkPodKSA          = "hostNetworkPodKSA"
	VolumeContextKeyIdentityProvider           = "identityProvider"
	VolumeContextKeyDisableMetrics             = "disableMetrics"
	VolumeContextKeyIdentityPool               = "identityPool"
	VolumeContextEnableCloudProfilerForSidecar = "enableCloudProfilerForSidecar"

	//nolint:revive,stylecheck
	VolumeContextKeyMetadataCacheTtlSeconds = "metadataCacheTtlSeconds"

	VolumeContextKeyServiceAccountName = "csi.storage.k8s.io/serviceAccount.name"
	//nolint:gosec
	VolumeContextKeyServiceAccountToken    = "csi.storage.k8s.io/serviceAccount.tokens"
	VolumeContextKeyPodName                = "csi.storage.k8s.io/pod.name"
	VolumeContextKeyPodNamespace           = "csi.storage.k8s.io/pod.namespace"
	VolumeContextKeyEphemeral              = "csi.storage.k8s.io/ephemeral"
	VolumeContextKeyBucketName             = "bucketName"
	TokenServerSidecarMinVersion           = "v1.17.2-gke.0" // #nosec G101
	SidecarBucketAccessCheckMinVersion     = "v1.20.0-gke.0"
	SidecarCloudProfilerMinVersion         = "v1.19.0-gke.0"
	MachineTypeAutoConfigSidecarMinVersion = "v1.15.1-gke.0" // #nosec G101
	GCSFuseProfilesMinVersion              = "v1.19.3-gke.0"
	GCSFuseFileCacheMediumMinVersion       = "v1.99.0-gke.0"
	FlagFileForDefaultingPath              = "flags-for-defaulting"
	GCSFuseProfileFlag                     = "profile"
)
View Source
const DefaultName = "gcsfuse.csi.storage.gke.io"
View Source
const (
	MinimumVolumeSizeInBytes int64 = 1 * util.Mb
)

Variables

This section is empty.

Functions

func ParseFlagMapFromFlagFile added in v1.15.0

func ParseFlagMapFromFlagFile(flagFileContent string) map[string]string

func PutFlagsFromDriverToTargetPath added in v1.15.0

func PutFlagsFromDriverToTargetPath(flagMap map[string]string, targetPath string, fileName string) error

Types

type FeatureGCSFuseProfiles added in v1.20.0

type FeatureGCSFuseProfiles struct {
	Enabled                       bool
	ScannerConfig                 *profiles.ScannerConfig
	EnableGcsfuseProfilesInternal bool
}

type GCSDriver

type GCSDriver struct {
	// contains filtered or unexported fields
}

func NewGCSDriver

func NewGCSDriver(config *GCSDriverConfig) (*GCSDriver, error)

func (*GCSDriver) Run

func (driver *GCSDriver) Run(ctx context.Context, cancel context.CancelFunc, endpoint string)

func (*GCSDriver) ValidateControllerServiceRequest

func (driver *GCSDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapability_RPC_Type) error

type GCSDriverConfig

type GCSDriverConfig struct {
	Name                           string // Driver name
	Version                        string // Driver version
	NodeID                         string // Node name
	RunController                  bool   // Run CSI controller service
	RunNode                        bool   // Run CSI node service
	StorageServiceManager          storage.ServiceManager
	TokenManager                   auth.TokenManager
	Mounter                        mount.Interface
	K8sClients                     clientset.Interface
	MetricsManager                 metrics.Manager
	DisableAutoconfig              bool
	EnableSidecarBucketAccessCheck bool
	WINodeLabelCheck               bool
	EnableCloudProfilerForSidecar  bool
	FeatureOptions                 *GCSDriverFeatureOptions
}

type GCSDriverFeatureOptions added in v1.18.0

type GCSDriverFeatureOptions struct {
	FeatureGCSFuseProfiles *FeatureGCSFuseProfiles
}

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() NonBlockingGRPCServer

Jump to

Keyboard shortcuts

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