s3minio

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DriverName string = "s3minio"

	NamePrefix                                = "object.csi.aliyun.com/"
	ProvisionTypeBucketOrCreate ProvisionType = "BucketOrCreate"
	ParamProvisionTypeTag                     = NamePrefix + "provision-type"
	ParamBucketNameTag                        = NamePrefix + "bucket-name"
	ParamQuotaType                            = NamePrefix + "quota-type"
	ParamPVName                               = "csi.storage.k8s.io/pv/name"
	ParamPVCName                              = "csi.storage.k8s.io/pvc/name"
	ParamPVCNameSpace                         = "csi.storage.k8s.io/pvc/namespace"
	QuotaTypeHard                             = "hard"
	QuotaTypeFIFO                             = "fifo"
	MetaDataCapacity                          = NamePrefix + "capacity-bytes"
	MetaDataPrivisionType                     = NamePrefix + "provision-type"
	AnnoBucketName                            = NamePrefix + "bucket-name"

	SecretMinIOHost string = "host"
	SecretRegion    string = "region"
	SecretAK        string = "rootUser"
	SecretSK        string = "rootPassword"

	S3FSCmd              = "s3fs"
	S3FSPassWordFileName = ".passwd-s3fs"
	S3FSType             = "fuse.s3fs"
)

Variables

Functions

func S3FSMount

func S3FSMount(url, bucket, mountpoint, AK, SK string) error

func S3FSUmount

func S3FSUmount(mountpoint string) error

Types

type MinIOClient

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

func NewMinIOClient

func NewMinIOClient(cfg *S3Config) (*MinIOClient, error)

func (*MinIOClient) CreateBucket

func (driver *MinIOClient) CreateBucket(bucketName string, capacityBytes int64) error

func (*MinIOClient) DeleteBucket

func (driver *MinIOClient) DeleteBucket(bucketName string) error

func (*MinIOClient) EmptyBucket

func (driver *MinIOClient) EmptyBucket(bucketName string) error

func (*MinIOClient) FsInfo

func (driver *MinIOClient) FsInfo(bucketName string) (int64, int64, int64, int64, int64, int64, error)

func (*MinIOClient) GetBucketCapacity

func (driver *MinIOClient) GetBucketCapacity(bucketName string) (int64, error)

func (*MinIOClient) GetBucketMetadata

func (driver *MinIOClient) GetBucketMetadata(bucketName string) (map[string]string, error)

func (*MinIOClient) GetBucketUsage

func (driver *MinIOClient) GetBucketUsage(bucketName string) (int64, error)

func (*MinIOClient) ListBucketObjects

func (driver *MinIOClient) ListBucketObjects(bucketName string) ([]minio.ObjectInfo, error)

func (*MinIOClient) RemoveBucketMetadata

func (driver *MinIOClient) RemoveBucketMetadata(bucketName string) error

func (*MinIOClient) SetBucketMetadata

func (driver *MinIOClient) SetBucketMetadata(bucketName string, bucketMap map[string]string) error

TODO: need minio version >= RELEASE.2020-05-06T23-23-25Z https://github.com/minio/minio/pull/9389 store metadata in bucket tags

func (*MinIOClient) SetBucketQuota

func (driver *MinIOClient) SetBucketQuota(bucketName string, capacityBytes int64, qType madmin.QuotaType) error

type MinIODriver

type MinIODriver struct {
	S3Config
	// contains filtered or unexported fields
}

func NewMinIODriver

func NewMinIODriver(cfg *S3Config) (*MinIODriver, error)

func (*MinIODriver) ControllerExpandVolume

func (*MinIODriver) CreateVolume

func (driver *MinIODriver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)

func (*MinIODriver) DeleteVolume

func (driver *MinIODriver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)

func (*MinIODriver) NodeExpandVolume

func (driver *MinIODriver) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (
	*csi.NodeExpandVolumeResponse, error)

func (*MinIODriver) NodeGetVolumeStats

func (driver *MinIODriver) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)

func (*MinIODriver) NodePublishVolume

func (driver *MinIODriver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)

func (*MinIODriver) NodeStageVolume

func (driver *MinIODriver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)

func (*MinIODriver) NodeUnpublishVolume

func (*MinIODriver) NodeUnstageVolume

func (driver *MinIODriver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)

type ProvisionType

type ProvisionType string

type S3Config

type S3Config struct {
	AK       string
	SK       string
	Region   string
	Endpoint string
}

S3Config holds values to configure the driver

Jump to

Keyboard shortcuts

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