minio

package
v0.13.3-rc.5 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ServiceName      = "minio-service"
	ServiceAPIPort   = 9000 // API port
	ServiceWebUIPort = 9001 // WebUI port
	DeploymentName   = "minio"
	Image            = "minio/minio:RELEASE.2024-03-30T09-41-56Z"
	StorageClassName = "standard" // standard | gp2 | default
	VolumeClaimName  = "minio-data"
	VolumeMountPath  = "/data"
	PVCStorageSize   = "1Gi"
)

Variables

View Source
var (
	ErrMinioFailedToStart                       = &Error{Code: "MinioFailedToStart", Message: "failed to create or update Minio deployment"}
	ErrMinioFailedToBeReady                     = &Error{Code: "MinioFailedToBeReady", Message: "failed waiting for Minio to be ready"}
	ErrMinioFailedToCreateOrUpdateService       = &Error{Code: "MinioFailedToCreateOrUpdateService", Message: "failed to create or update Minio service"}
	ErrMinioFailedToBeReadyService              = &Error{Code: "MinioFailedToBeReadyService", Message: "failed waiting for Minio service to be ready"}
	ErrMinioFailedToCreatePVC                   = &Error{Code: "MinioFailedToCreatePVC", Message: "failed to create PVC"}
	ErrMinioFailedToCreateDeployment            = &Error{Code: "MinioFailedToCreateDeployment", Message: "failed to create Minio deployment"}
	ErrMinioFailedToGetDeployment               = &Error{Code: "MinioFailedToGetDeployment", Message: "failed to get Minio deployment"}
	ErrMinioFailedToUpdateDeployment            = &Error{Code: "MinioFailedToUpdateDeployment", Message: "failed to update Minio deployment"}
	ErrMinioFailedToGetService                  = &Error{Code: "MinioFailedToGetService", Message: "failed to get Minio deployment"}
	ErrMinioFailedToGetEndpoint                 = &Error{Code: "MinioFailedToGetEndpoint", Message: "failed to get Minio endpoint"}
	ErrMinioFailedToInitializeClient            = &Error{Code: "MinioFailedToInitializeClient", Message: "failed to initialize Minio client"}
	ErrMinioFailedToCreateBucket                = &Error{Code: "MinioFailedToCreateBucket", Message: "failed to create bucket"}
	ErrMinioFailedToUploadData                  = &Error{Code: "MinioFailedToUploadData", Message: "failed to upload data to Minio"}
	ErrMinioFailedToGetPresignedURL             = &Error{Code: "MinioFailedToGetPresignedURL", Message: "failed to generate presigned URL for Minio object"}
	ErrMinioFailedToUpdateService               = &Error{Code: "MinioFailedToUpdateService", Message: "failed to update Minio service"}
	ErrMinioFailedToFindFileBeforeDeletion      = &Error{Code: "MinioFailedToFindFileBeforeDeletion", Message: "failed to find file in Minio before deletion"}
	ErrMinioFailedToDeleteFile                  = &Error{Code: "MinioFailedToDeleteFile", Message: "failed to delete file from Minio"}
	ErrMinioFailedToGetMinioEndpoint            = &Error{Code: "MinioFailedToGetMinioEndpoint", Message: "failed to get Minio endpoint"}
	ErrMinioFailedToGeneratePresignedURL        = &Error{Code: "MinioFailedToGeneratePresignedURL", Message: "failed to generate presigned URL for Minio object"}
	ErrMinioFailedToCreateService               = &Error{Code: "MinioFailedToCreateService", Message: "failed to create Minio service"}
	ErrMinioFailedToCheckBucket                 = &Error{Code: "MinioFailedToCheckBucket", Message: "failed to check if bucket exists"}
	ErrMinioLoadBalancerIPNotAvailable          = &Error{Code: "MinioLoadBalancerIPNotAvailable", Message: "LoadBalancer IP not available yet"}
	ErrMinioFailedToGetNodes                    = &Error{Code: "MinioFailedToGetNodes", Message: "failed to get nodes"}
	ErrMinioNoNodesFound                        = &Error{Code: "MinioNoNodesFound", Message: "no nodes found"}
	ErrMinioTimeoutWaitingForReady              = &Error{Code: "MinioTimeoutWaitingForReady", Message: "timeout waiting for Minio to be ready"}
	ErrMinioNodePortNotSet                      = &Error{Code: "MinioNodePortNotSet", Message: "NodePort for minio service is not set"}
	ErrMinioExternalIPsNotSet                   = &Error{Code: "MinioExternalIPsNotSet", Message: "external IPs for minio service are not set"}
	ErrMinioTimeoutWaitingForServiceReady       = &Error{Code: "MinioTimeoutWaitingForServiceReady", Message: "timeout waiting for Minio service to be ready"}
	ErrMinioFailedToConnect                     = &Error{Code: "MinioFailedToConnect", Message: "failed to connect to %s"}
	ErrMinioFailedToParseStorageSize            = &Error{Code: "MinioFailedToParseStorageSize", Message: "failed to parse storage size"}
	ErrMinioFailedToListPersistentVolumes       = &Error{Code: "MinioFailedToListPersistentVolumes", Message: "failed to list PersistentVolumes"}
	ErrMinioFailedToCreatePersistentVolume      = &Error{Code: "MinioFailedToCreatePersistentVolume", Message: "failed to create PersistentVolume"}
	ErrMinioFailedToCreatePersistentVolumeClaim = &Error{Code: "MinioFailedToCreatePersistentVolumeClaim", Message: "failed to create PersistentVolumeClaim"}
)

Functions

This section is empty.

Types

type Error added in v0.13.3

type Error struct {
	Code    string
	Message string
	Err     error
	Params  []interface{}
}

func (*Error) Error added in v0.13.3

func (e *Error) Error() string

func (*Error) WithParams added in v0.13.3

func (e *Error) WithParams(params ...interface{}) *Error

func (*Error) Wrap added in v0.13.3

func (e *Error) Wrap(err error) error

type Minio

type Minio struct {
	Clientset kubernetes.Interface
	Namespace string
}

func (*Minio) DeleteFromMinio added in v0.13.0

func (m *Minio) DeleteFromMinio(ctx context.Context, minioFilePath, bucketName string) error

DeleteFromMinio deletes a file from Minio and fails if the content does not exist

func (*Minio) DeployMinio

func (m *Minio) DeployMinio(ctx context.Context) error

func (*Minio) GetMinioURL

func (m *Minio) GetMinioURL(ctx context.Context, minioFilePath, bucketName string) (string, error)

GetMinioURL returns an S3-compatible URL for a Minio file

func (*Minio) IsMinioDeployed

func (m *Minio) IsMinioDeployed(ctx context.Context) (bool, error)

func (*Minio) PushToMinio

func (m *Minio) PushToMinio(ctx context.Context, localReader io.Reader, minioFilePath, bucketName string) error

PushToMinio pushes data (i.e. a reader) to Minio

Jump to

Keyboard shortcuts

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