Documentation ¶
Index ¶
- Constants
- Variables
- type AccessPoint
- type AccessPointOptions
- type Cloud
- type EC2Metadata
- type Efs
- type FakeCloudProvider
- func (c *FakeCloudProvider) CreateAccessPoint(ctx context.Context, volumeName string, accessPointOpts *AccessPointOptions) (accessPoint *AccessPoint, err error)
- func (c *FakeCloudProvider) DeleteAccessPoint(ctx context.Context, accessPointId string) (err error)
- func (c *FakeCloudProvider) DescribeAccessPoint(ctx context.Context, accessPointId string) (accessPoint *AccessPoint, err error)
- func (c *FakeCloudProvider) DescribeFileSystem(ctx context.Context, fileSystemId string) (fileSystem *FileSystem, err error)
- func (c *FakeCloudProvider) DescribeMountTargets(ctx context.Context, fileSystemId, az string) (mountTarget *MountTarget, err error)
- func (c *FakeCloudProvider) GetMetadata() MetadataService
- type FileSystem
- type MetadataProvider
- type MetadataService
- type MountTarget
- type TMDSV4Response
- type TaskMetadataService
Constants ¶
View Source
const (
AccessDeniedException = "AccessDeniedException"
)
Variables ¶
View Source
var ( ErrNotFound = errors.New("Resource was not found") ErrAlreadyExists = errors.New("Resource already exists") ErrAccessDenied = errors.New("Access denied") )
View Source
var DefaultKubernetesAPIClient = func() (kubernetes.Interface, error) { config, err := rest.InClusterConfig() if err != nil { return nil, err } clientset, err := kubernetes.NewForConfig(config) if err != nil { return nil, err } return clientset, nil }
Functions ¶
This section is empty.
Types ¶
type AccessPoint ¶ added in v1.2.0
type AccessPointOptions ¶ added in v1.2.0
type AccessPointOptions struct { // Capacity is used for testing purpose only. // EFS does not consider capacity while provisioning new file systems or access points // Capacity is used to satisfy this test: https://github.com/kubernetes-csi/csi-test/blob/v3.1.1/pkg/sanity/controller.go#L559 CapacityGiB int64 FileSystemId string Uid int64 Gid int64 DirectoryPerms string DirectoryPath string Tags map[string]string }
type Cloud ¶
type Cloud interface { GetMetadata() MetadataService CreateAccessPoint(ctx context.Context, volumeName string, accessPointOpts *AccessPointOptions) (accessPoint *AccessPoint, err error) DeleteAccessPoint(ctx context.Context, accessPointId string) (err error) DescribeAccessPoint(ctx context.Context, accessPointId string) (accessPoint *AccessPoint, err error) DescribeFileSystem(ctx context.Context, fileSystemId string) (fs *FileSystem, err error) DescribeMountTargets(ctx context.Context, fileSystemId, az string) (fs *MountTarget, err error) }
func NewCloudWithRole ¶ added in v1.3.0
NewCloudWithRole returns a new instance of AWS cloud after assuming an aws role It panics if driver does not have permissions to assume role.
type EC2Metadata ¶
type EC2Metadata interface { Available() bool GetInstanceIdentityDocument() (ec2metadata.EC2InstanceIdentityDocument, error) }
type Efs ¶ added in v1.2.0
type Efs interface { CreateAccessPointWithContext(aws.Context, *efs.CreateAccessPointInput, ...request.Option) (*efs.CreateAccessPointOutput, error) DeleteAccessPointWithContext(aws.Context, *efs.DeleteAccessPointInput, ...request.Option) (*efs.DeleteAccessPointOutput, error) DescribeAccessPointsWithContext(aws.Context, *efs.DescribeAccessPointsInput, ...request.Option) (*efs.DescribeAccessPointsOutput, error) DescribeFileSystemsWithContext(aws.Context, *efs.DescribeFileSystemsInput, ...request.Option) (*efs.DescribeFileSystemsOutput, error) DescribeMountTargetsWithContext(aws.Context, *efs.DescribeMountTargetsInput, ...request.Option) (*efs.DescribeMountTargetsOutput, error) }
Efs abstracts efs client(https://docs.aws.amazon.com/sdk-for-go/api/service/efs/)
type FakeCloudProvider ¶ added in v1.2.0
type FakeCloudProvider struct {
// contains filtered or unexported fields
}
func NewFakeCloudProvider ¶ added in v1.2.0
func NewFakeCloudProvider() *FakeCloudProvider
func (*FakeCloudProvider) CreateAccessPoint ¶ added in v1.2.0
func (c *FakeCloudProvider) CreateAccessPoint(ctx context.Context, volumeName string, accessPointOpts *AccessPointOptions) (accessPoint *AccessPoint, err error)
func (*FakeCloudProvider) DeleteAccessPoint ¶ added in v1.2.0
func (c *FakeCloudProvider) DeleteAccessPoint(ctx context.Context, accessPointId string) (err error)
func (*FakeCloudProvider) DescribeAccessPoint ¶ added in v1.2.0
func (c *FakeCloudProvider) DescribeAccessPoint(ctx context.Context, accessPointId string) (accessPoint *AccessPoint, err error)
func (*FakeCloudProvider) DescribeFileSystem ¶ added in v1.2.0
func (c *FakeCloudProvider) DescribeFileSystem(ctx context.Context, fileSystemId string) (fileSystem *FileSystem, err error)
CreateVolume calls DescribeFileSystem and then CreateAccessPoint. Add file system into the map here to allow CreateVolume sanity tests to succeed.
func (*FakeCloudProvider) DescribeMountTargets ¶ added in v1.3.0
func (c *FakeCloudProvider) DescribeMountTargets(ctx context.Context, fileSystemId, az string) (mountTarget *MountTarget, err error)
func (*FakeCloudProvider) GetMetadata ¶ added in v1.2.0
func (c *FakeCloudProvider) GetMetadata() MetadataService
type FileSystem ¶ added in v1.2.0
type FileSystem struct {
FileSystemId string
}
type MetadataProvider ¶ added in v1.4.0
type MetadataProvider interface {
// contains filtered or unexported methods
}
func GetNewMetadataProvider ¶ added in v1.4.0
func GetNewMetadataProvider(svc EC2Metadata, clientset kubernetes.Interface) (MetadataProvider, error)
GetNewMetadataProvider returns a MetadataProvider on which can be invoked getMetadata() to extract the metadata.
type MetadataService ¶
type MetadataService interface { GetInstanceID() string GetRegion() string GetAvailabilityZone() string }
MetadataService represents AWS metadata service.
type MountTarget ¶ added in v1.3.0
type TMDSV4Response ¶ added in v1.3.0
type TaskMetadataService ¶ added in v1.3.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.