Documentation ¶
Index ¶
- Constants
- Variables
- func NewMinIOController(options ...k8s.Option) lcm.Controller
- type MinIOController
- func (m *MinIOController) Apply(ctx context.Context, harborcluster *goharborv1.HarborCluster, _ ...lcm.Option) (*lcm.CRStatus, error)
- func (m *MinIOController) Delete(ctx context.Context, harborcluster *goharborv1.HarborCluster) (*lcm.CRStatus, error)
- func (m *MinIOController) Upgrade(_ context.Context, _ *goharborv1.HarborCluster) (*lcm.CRStatus, error)
- type Minio
- type MinioClient
- type MinioEndpoint
Constants ¶
View Source
const ( GetMinIOError = "get minIO error" GenerateMinIOCrError = "generate minIO cr error" UpdateMinIOError = "update minIO error" CreateMinIOSecretError = "create minIO secret error" //nolint:gosec CreateMinIOIngressError = "create ingress of minIO error" CreateMinIOError = "create minIO CR error" CreateDefaultBucketError = "create default bucket in minIO Error" GetMinIOProperties = "get MinIO Properties error" UpdateIngressError = "update minIO ingress error" GetMinIOIngressError = "get minIO ingress error" CreateInitJobError = "create minIO init job error" DeleteInitJobError = "delete minIO init job error" GetInitJobError = "get minIO init job error" UpdateInitJobError = "update minIO init job error" )
Define error message.
View Source
const ( ComponentName = "cluster-minio" MinIOClientComponentName = "cluster-minio-init" )
View Source
const ( NCPIngressValueTrue = "true" ContourIngressValueTrue = "true" )
View Source
const ( Storage = "storage" DefaultCredsSecret = "creds" DefaultPrefix = "minio-" DefaultZone = "zone-harbor" DefaultRegion = "us-east-1" DefaultBucket = "harbor" DefaultServicePort = 80 )
Variables ¶
View Source
var HarborClusterMinIOGVK = schema.GroupVersionKind{ Group: miniov2.SchemeGroupVersion.Group, Version: miniov2.SchemeGroupVersion.Version, Kind: miniov2.MinIOCRDResourceKind, }
Functions ¶
func NewMinIOController ¶
func NewMinIOController(options ...k8s.Option) lcm.Controller
Types ¶
type MinIOController ¶
type MinIOController struct { KubeClient client.Client Ctx context.Context Log logr.Logger Scheme *runtime.Scheme Recorder record.EventRecorder MinioClient Minio ConfigStore *configstore.Store }
func (*MinIOController) Apply ¶
func (m *MinIOController) Apply(ctx context.Context, harborcluster *goharborv1.HarborCluster, _ ...lcm.Option) (*lcm.CRStatus, error)
Reconciler implements the reconcile logic of minIO service.
func (*MinIOController) Delete ¶
func (m *MinIOController) Delete(ctx context.Context, harborcluster *goharborv1.HarborCluster) (*lcm.CRStatus, error)
func (*MinIOController) Upgrade ¶
func (m *MinIOController) Upgrade(_ context.Context, _ *goharborv1.HarborCluster) (*lcm.CRStatus, error)
type Minio ¶
type Minio interface { IsBucketExists(ctx context.Context, bucket string) (bool, error) CreateBucket(ctx context.Context, bucket string) error }
Minio defines related operations of minio.
func NewMinioClient ¶
func NewMinioClient(endpoint *MinioEndpoint) (Minio, error)
NewMinioClient constructs a new minio client.
type MinioClient ¶
type MinioClient struct {
// contains filtered or unexported fields
}
MinioClient is an implementation of Minio.
func (MinioClient) CreateBucket ¶
func (m MinioClient) CreateBucket(ctx context.Context, bucket string) error
CreateBucket creates a bucket.
func (MinioClient) IsBucketExists ¶
IsBucketExists checks if the bucket existing.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.