Documentation ¶
Overview ¶
Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func GetVersionJSON() (string, error)
- func InitConfigDir(legacyDir, preferredDir, etcAmazonEfs string) error
- func SetNodeCapOptInFeatures(volMetricsOptIn bool) []csi.NodeServiceCapability_RPC_Type
- type Driver
- func (d *Driver) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (d *Driver) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (d *Driver) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
- func (d *Driver) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (d *Driver) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (d *Driver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (d *Driver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (d *Driver) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (d *Driver) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (d *Driver) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (d *Driver) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (d *Driver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (d *Driver) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (d *Driver) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (d *Driver) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (d *Driver) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (d *Driver) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (d *Driver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- func (d *Driver) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
- func (d *Driver) Run() error
- func (d *Driver) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type FilesystemID
- type GidAllocator
- type JSONPatch
- type Mounter
- type NodeMounter
- type VersionInfo
- type VolStatter
- type VolStatterImpl
- type Watchdog
Constants ¶
const ( AccessPointMode = "efs-ap" AzName = "az" BasePath = "basePath" DefaultGidMin = int64(50000) DefaultGidMax = DefaultGidMin + cloud.AccessPointPerFsLimit DefaultTagKey = "efs.csi.aws.com/cluster" DefaultTagValue = "true" DirectoryPerms = "directoryPerms" EnsureUniqueDirectory = "ensureUniqueDirectory" FsId = "fileSystemId" Gid = "gid" GidMin = "gidRangeStart" GidMax = "gidRangeEnd" MountTargetIp = "mounttargetip" ProvisioningMode = "provisioningMode" PvName = "csi.storage.k8s.io/pv/name" PvcName = "csi.storage.k8s.io/pvc/name" PvcNamespace = "csi.storage.k8s.io/pvc/namespace" RoleArn = "awsRoleArn" SubPathPattern = "subPathPattern" TempMountPathPrefix = "/var/lib/csi/pv" Uid = "uid" ReuseAccessPointKey = "reuseAccessPoint" PvcNameKey = "csi.storage.k8s.io/pvc/name" )
const (
// AgentNotReadyTaintKey contains the key of taints to be removed on driver startup
AgentNotReadyNodeTaintKey = "efs.csi.aws.com/agent-not-ready"
)
Variables ¶
This section is empty.
Functions ¶
func GetVersionJSON ¶ added in v0.2.0
func InitConfigDir ¶ added in v1.1.0
InitConfigDir decides which of two mounted directories will be used to store driver config files. It creates a symlink at etcAmazonEfs to the chosen location (legacyDir or preferredDir). If neither of these locations is present (i.e. when the user does not need to durably store configs and thus does not mount host directories), an empty directory will be created at etcAmazonEfs.
- legacyDir is the path to a config directory where previous versions of this driver may have written config files. In previous versions of this driver, a host path that was not writeable on Bottlerocket hosts was being used, so we introduce preferredDir.
- preferredDir is the path to config directory that we will use so long as we do not find files in legacyDir.
- etcAmazonEfs is the path where the symlink will be written. In practice, this will always be /etc/amazon/efs, but we take it as an input so the function can be tested.
Examples: On a host that has EFS mounts created by an earlier version of this driver, InitConfigDir will detect a conf file in legacyDir and write a symlink at etcAmazonEfs pointing to legacyDir.
On a host that does not have pre-existing legacy EFS mount configs, InitConfigDir will detect no files in legacyDir and will create a symlink at etcAmazonEfs pointing to preferredDir.
For a use case in which durable storage of the configs is not required, and no host volumes are mounted, the function creates an empty directory at etcAmazonEfs.
If a symlink already existing at etcAmazonEfs, InitConfigDir does nothing. If something other than a symlink exists at etcAmazonEfs, InitConfigDir returns an error.
func SetNodeCapOptInFeatures ¶ added in v1.1.0
func SetNodeCapOptInFeatures(volMetricsOptIn bool) []csi.NodeServiceCapability_RPC_Type
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func (*Driver) ControllerExpandVolume ¶ added in v1.2.0
func (d *Driver) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
func (*Driver) ControllerGetCapabilities ¶ added in v1.2.0
func (d *Driver) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
func (*Driver) ControllerGetVolume ¶ added in v1.3.8
func (d *Driver) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
func (*Driver) ControllerPublishVolume ¶ added in v1.2.0
func (d *Driver) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
func (*Driver) ControllerUnpublishVolume ¶ added in v1.2.0
func (d *Driver) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
func (*Driver) CreateSnapshot ¶ added in v1.2.0
func (d *Driver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
func (*Driver) CreateVolume ¶ added in v1.2.0
func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
func (*Driver) DeleteSnapshot ¶ added in v1.2.0
func (d *Driver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
func (*Driver) DeleteVolume ¶ added in v1.2.0
func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
func (*Driver) GetCapacity ¶ added in v1.2.0
func (d *Driver) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
func (*Driver) GetPluginCapabilities ¶
func (d *Driver) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
func (*Driver) GetPluginInfo ¶
func (d *Driver) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
func (*Driver) ListSnapshots ¶ added in v1.2.0
func (d *Driver) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
func (*Driver) ListVolumes ¶ added in v1.2.0
func (d *Driver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
func (*Driver) NodeExpandVolume ¶ added in v0.2.0
func (d *Driver) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
func (*Driver) NodeGetCapabilities ¶
func (d *Driver) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
func (*Driver) NodeGetInfo ¶
func (d *Driver) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
func (*Driver) NodeGetVolumeStats ¶ added in v0.2.0
func (d *Driver) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
func (*Driver) NodePublishVolume ¶
func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
func (*Driver) NodeStageVolume ¶
func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
func (*Driver) NodeUnpublishVolume ¶
func (d *Driver) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
func (*Driver) NodeUnstageVolume ¶
func (d *Driver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
func (*Driver) Probe ¶
func (d *Driver) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
func (*Driver) ValidateVolumeCapabilities ¶ added in v1.2.0
func (d *Driver) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
type FilesystemID ¶ added in v1.7.0
type FilesystemID struct {
// contains filtered or unexported fields
}
type GidAllocator ¶ added in v1.2.0
type GidAllocator struct {
// contains filtered or unexported fields
}
func NewGidAllocator ¶ added in v1.2.0
func NewGidAllocator() GidAllocator
type JSONPatch ¶ added in v1.7.2
type JSONPatch struct { OP string `json:"op,omitempty"` Path string `json:"path,omitempty"` Value interface{} `json:"value"` }
Struct for JSON patch operations
type Mounter ¶ added in v0.3.0
type Mounter interface { mount_utils.Interface MakeDir(pathname string) error GetDeviceName(mountPath string) (string, int, error) }
Mounter is an interface for mount operations
type NodeMounter ¶ added in v0.3.0
type NodeMounter struct {
mount_utils.Interface
}
func (*NodeMounter) GetDeviceName ¶ added in v0.3.0
func (m *NodeMounter) GetDeviceName(mountPath string) (string, int, error)
func (*NodeMounter) MakeDir ¶ added in v0.3.0
func (m *NodeMounter) MakeDir(pathname string) error
type VersionInfo ¶ added in v0.2.0
type VersionInfo struct { DriverVersion string `json:"driverVersion"` GitCommit string `json:"gitCommit"` BuildDate string `json:"buildDate"` EfsClientSource string `json:"efsClientSource"` GoVersion string `json:"goVersion"` Compiler string `json:"compiler"` Platform string `json:"platform"` }
func GetVersion ¶ added in v0.2.0
func GetVersion() VersionInfo
type VolStatter ¶ added in v1.1.0
type VolStatter interface {
// contains filtered or unexported methods
}
func NewVolStatter ¶ added in v1.1.0
func NewVolStatter() VolStatter
type VolStatterImpl ¶ added in v1.1.0
type VolStatterImpl struct { }