Documentation ¶
Index ¶
- func CheckBucketAccessClaimPhase(cosiBucketAccessClaim *nbv1.COSIBucketAccessClaim)
- func CheckPhase(cosiBucketClaim *nbv1.COSIBucketClaim)
- func Cmd() *cobra.Command
- func CmdCOSIBucketAccessClaim() *cobra.Command
- func CmdCOSIBucketAccessClass() *cobra.Command
- func CmdCOSIBucketClaim() *cobra.Command
- func CmdCOSIBucketClass() *cobra.Command
- func CmdCreateAccessClass() *cobra.Command
- func CmdCreateBucketAccessClaim() *cobra.Command
- func CmdCreateBucketClaim() *cobra.Command
- func CmdCreateBucketClass() *cobra.Command
- func CmdCreateCacheNamespaceBucketclass() *cobra.Command
- func CmdCreateMultiNamespaceBucketclass() *cobra.Command
- func CmdCreateNamespaceBucketclass() *cobra.Command
- func CmdCreatePlacementBucketClass() *cobra.Command
- func CmdCreateSingleNamespaceBucketclass() *cobra.Command
- func CmdDeleteAccessClass() *cobra.Command
- func CmdDeleteBucketAccessClaim() *cobra.Command
- func CmdDeleteBucketClaim() *cobra.Command
- func CmdDeleteBucketClass() *cobra.Command
- func CmdListAccessClass() *cobra.Command
- func CmdListBucketAccessClaim() *cobra.Command
- func CmdListBucketClaim() *cobra.Command
- func CmdListBucketClass() *cobra.Command
- func CmdStatusAccessClass() *cobra.Command
- func CmdStatusBucketAccessClaim() *cobra.Command
- func CmdStatusBucketClaim() *cobra.Command
- func CmdStatusBucketClass() *cobra.Command
- func CreateBucketClassSpecFromParameters(parameters map[string]string) (*nbv1.BucketClassSpec, string)
- func RunCreateAccessClass(cmd *cobra.Command, args []string)
- func RunCreateBucketAccessClaim(cmd *cobra.Command, args []string)
- func RunCreateBucketClaim(cmd *cobra.Command, args []string)
- func RunCreateCacheNamespaceBucketClass(cmd *cobra.Command, args []string)
- func RunCreateMultiNamespaceBucketClass(cmd *cobra.Command, args []string)
- func RunCreatePlacementBucketClass(cmd *cobra.Command, args []string)
- func RunCreateSingleNamespaceBucketClass(cmd *cobra.Command, args []string)
- func RunDeleteAccessClass(cmd *cobra.Command, args []string)
- func RunDeleteBucketAccessClaim(cmd *cobra.Command, args []string)
- func RunDeleteBucketClaim(cmd *cobra.Command, args []string)
- func RunDeleteBucketClass(cmd *cobra.Command, args []string)
- func RunListAccessClass(cmd *cobra.Command, args []string)
- func RunListBucketAccessClaim(cmd *cobra.Command, args []string)
- func RunListBucketClaim(cmd *cobra.Command, args []string)
- func RunListBucketClass(cmd *cobra.Command, args []string)
- func RunProvisioner(client client.Client, scheme *runtime.Scheme, recorder record.EventRecorder) error
- func RunStatusAccessClass(cmd *cobra.Command, args []string)
- func RunStatusBucketAccessClaim(cmd *cobra.Command, args []string)
- func RunStatusBucketClaim(cmd *cobra.Command, args []string)
- func RunStatusBucketClass(cmd *cobra.Command, args []string)
- func ValidateCOSIBucketClaim(objectName string, namespace string, spec nbv1.BucketClassSpec, isCLI bool) error
- func WaitBucketAccessClaimReady(cosiBucketAccessClaim *nbv1.COSIBucketAccessClaim) bool
- func WaitReady(cosiBucketClaim *nbv1.COSIBucketClaim) bool
- type APIRequest
- type IdentityServer
- type Provisioner
- func (p *Provisioner) DriverCreateBucket(ctx context.Context, req *cosi.DriverCreateBucketRequest) (*cosi.DriverCreateBucketResponse, error)
- func (p *Provisioner) DriverDeleteBucket(ctx context.Context, req *cosi.DriverDeleteBucketRequest) (*cosi.DriverDeleteBucketResponse, error)
- func (p *Provisioner) DriverGrantBucketAccess(ctx context.Context, req *cosi.DriverGrantBucketAccessRequest) (*cosi.DriverGrantBucketAccessResponse, error)
- func (p *Provisioner) DriverRevokeBucketAccess(ctx context.Context, req *cosi.DriverRevokeBucketAccessRequest) (*cosi.DriverRevokeBucketAccessResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBucketAccessClaimPhase ¶ added in v5.14.0
func CheckBucketAccessClaimPhase(cosiBucketAccessClaim *nbv1.COSIBucketAccessClaim)
CheckBucketAccessClaimPhase prints the phase and reason for it
func CheckPhase ¶
func CheckPhase(cosiBucketClaim *nbv1.COSIBucketClaim)
CheckPhase prints the phase and reason for it
func CmdCOSIBucketAccessClaim ¶ added in v5.14.0
CmdCOSIBucketAccessClaim returns a CLI command
func CmdCOSIBucketAccessClass ¶ added in v5.14.0
CmdCOSIBucketAccessClass returns a CLI command
func CmdCOSIBucketClaim ¶
CmdCOSIBucketClaim returns a CLI command
func CmdCOSIBucketClass ¶
CmdCOSIBucketClass returns a CLI command
func CmdCreateAccessClass ¶ added in v5.14.0
CmdCreateAccessClass returns a CLI command
func CmdCreateBucketAccessClaim ¶ added in v5.14.0
CmdCreateBucketAccessClaim returns a CLI command
func CmdCreateBucketClaim ¶
CmdCreateBucketClaim returns a CLI command
func CmdCreateBucketClass ¶
CmdCreateBucketClass returns a CLI command
func CmdCreateCacheNamespaceBucketclass ¶
CmdCreateCacheNamespaceBucketclass returns a CLI command
func CmdCreateMultiNamespaceBucketclass ¶
CmdCreateMultiNamespaceBucketclass returns a CLI command
func CmdCreateNamespaceBucketclass ¶
CmdCreateNamespaceBucketclass returns a CLI command
func CmdCreatePlacementBucketClass ¶
CmdCreatePlacementBucketClass returns a CLI command
func CmdCreateSingleNamespaceBucketclass ¶
CmdCreateSingleNamespaceBucketclass returns a CLI command
func CmdDeleteAccessClass ¶ added in v5.14.0
CmdDeleteAccessClass returns a CLI command
func CmdDeleteBucketAccessClaim ¶ added in v5.14.0
CmdDeleteBucketAccessClaim returns a CLI command
func CmdDeleteBucketClaim ¶
CmdDeleteBucketClaim returns a CLI command
func CmdDeleteBucketClass ¶
CmdDeleteBucketClass returns a CLI command
func CmdListAccessClass ¶ added in v5.14.0
CmdListAccessClass returns a CLI command
func CmdListBucketAccessClaim ¶ added in v5.14.0
CmdListBucketAccessClaim returns a CLI command
func CmdListBucketClaim ¶
CmdListBucketClaim returns a CLI command
func CmdListBucketClass ¶
CmdListBucketClass returns a CLI command
func CmdStatusAccessClass ¶ added in v5.14.0
CmdStatusAccessClass returns a CLI command
func CmdStatusBucketAccessClaim ¶ added in v5.14.0
CmdStatusBucketAccessClaim returns a CLI command
func CmdStatusBucketClaim ¶
CmdStatusBucketClaim returns a CLI command
func CmdStatusBucketClass ¶
CmdStatusBucketClass returns a CLI command
func CreateBucketClassSpecFromParameters ¶
func CreateBucketClassSpecFromParameters(parameters map[string]string) (*nbv1.BucketClassSpec, string)
CreateBucketClassSpecFromParameters converts Cosi bucket class additional Parameters to BucketClassSpec
func RunCreateAccessClass ¶ added in v5.14.0
RunCreateAccessClass runs a CLI command
func RunCreateBucketAccessClaim ¶ added in v5.14.0
RunCreateBucketAccessClaim runs a CLI command
func RunCreateBucketClaim ¶
RunCreateBucketClaim runs a CLI command
func RunCreateCacheNamespaceBucketClass ¶
RunCreateCacheNamespaceBucketClass runs a CLI command
func RunCreateMultiNamespaceBucketClass ¶
RunCreateMultiNamespaceBucketClass runs a CLI command
func RunCreatePlacementBucketClass ¶
RunCreatePlacementBucketClass runs a CLI command
func RunCreateSingleNamespaceBucketClass ¶
RunCreateSingleNamespaceBucketClass runs a CLI command
func RunDeleteAccessClass ¶ added in v5.14.0
RunDeleteAccessClass runs a CLI command
func RunDeleteBucketAccessClaim ¶ added in v5.14.0
RunDeleteBucketAccessClaim runs a CLI command
func RunDeleteBucketClaim ¶
RunDeleteBucketClaim runs a CLI command
func RunDeleteBucketClass ¶
RunDeleteBucketClass runs a CLI command
func RunListAccessClass ¶ added in v5.14.0
RunListAccessClass runs a CLI command
func RunListBucketAccessClaim ¶ added in v5.14.0
RunListBucketAccessClaim runs a CLI command
func RunListBucketClaim ¶
RunListBucketClaim runs a CLI command
func RunListBucketClass ¶
RunListBucketClass runs a CLI command
func RunProvisioner ¶
func RunProvisioner(client client.Client, scheme *runtime.Scheme, recorder record.EventRecorder) error
RunProvisioner will run the COSI provisioner
func RunStatusAccessClass ¶ added in v5.14.0
RunStatusAccessClass runs a CLI command
func RunStatusBucketAccessClaim ¶ added in v5.14.0
RunStatusBucketAccessClaim runs a CLI command
func RunStatusBucketClaim ¶
RunStatusBucketClaim runs a CLI command
func RunStatusBucketClass ¶
RunStatusBucketClass runs a CLI command
func ValidateCOSIBucketClaim ¶
func ValidateCOSIBucketClaim(objectName string, namespace string, spec nbv1.BucketClassSpec, isCLI bool) error
ValidateCOSIBucketClaim validate COSI bucket claim
func WaitBucketAccessClaimReady ¶ added in v5.14.0
func WaitBucketAccessClaimReady(cosiBucketAccessClaim *nbv1.COSIBucketAccessClaim) bool
WaitBucketAccessClaimReady waits until the cosi bucket claim status bucket ready changes to true
func WaitReady ¶
func WaitReady(cosiBucketClaim *nbv1.COSIBucketClaim) bool
WaitReady waits until the cosi bucket claim status bucket ready changes to true
Types ¶
type APIRequest ¶
type APIRequest struct { Provisioner *Provisioner BucketName string AccountName string SysClient *system.Client BucketClass *nbv1.BucketClassSpec }
APIRequest is the context of handling a single api request (bucket or account)
func NewAccountRequest ¶
func NewAccountRequest( p *Provisioner, accountCreateReq *cosi.DriverGrantBucketAccessRequest, accountDelReq *cosi.DriverRevokeBucketAccessRequest, ) (*APIRequest, error)
NewAccountRequest initializes a cosi bucket access request
func NewBucketRequest ¶
func NewBucketRequest( p *Provisioner, bucketCreateReq *cosi.DriverCreateBucketRequest, bucketDelReq *cosi.DriverDeleteBucketRequest, ) (*APIRequest, error)
NewBucketRequest initializes a cosi bucket request
func (*APIRequest) CreateAccount ¶
func (r *APIRequest) CreateAccount() (*nb.S3AccessKeys, error)
CreateAccount creates a new bar account
func (*APIRequest) CreateBucket ¶
func (r *APIRequest) CreateBucket( p *Provisioner, bucketReq *cosi.DriverCreateBucketRequest, ) error
CreateBucket creates a new cosi bucket
func (*APIRequest) DeleteAccount ¶
func (r *APIRequest) DeleteAccount() error
DeleteAccount deletes the bar account
func (*APIRequest) DeleteBucket ¶
func (r *APIRequest) DeleteBucket() error
DeleteBucket deletes the cosi bucket **including data**
type IdentityServer ¶
type IdentityServer struct {
// contains filtered or unexported fields
}
IdentityServer holds the name of NooBaa's COSI driver
func (*IdentityServer) DriverGetInfo ¶
func (id *IdentityServer) DriverGetInfo(ctx context.Context, req *cosi.DriverGetInfoRequest) (*cosi.DriverGetInfoResponse, error)
DriverGetInfo returns the info of the Noobaa's COSI driver
type Provisioner ¶
type Provisioner struct { Logger *logrus.Entry Namespace string // contains filtered or unexported fields }
Provisioner implements COSI driver callbacks
func (*Provisioner) DriverCreateBucket ¶
func (p *Provisioner) DriverCreateBucket(ctx context.Context, req *cosi.DriverCreateBucketRequest) (*cosi.DriverCreateBucketResponse, error)
DriverCreateBucket is an idempotent method for creating buckets It is expected to create the same bucket given a bucketName and protocol If the bucket already exists, then it MUST return codes.AlreadyExists Return values:
nil - Bucket successfully created codes.AlreadyExists - Bucket already exists. No more retries non-nil err - Internal error [requeue'd with exponential backoff]
func (*Provisioner) DriverDeleteBucket ¶
func (p *Provisioner) DriverDeleteBucket(ctx context.Context, req *cosi.DriverDeleteBucketRequest) (*cosi.DriverDeleteBucketResponse, error)
DriverDeleteBucket is an idempotent method for deleting buckets It is expected to delete the same bucket given a bucketName Return values:
nil - Bucket successfully deleted non-nil err - Internal error [requeue'd with exponential backoff]
func (*Provisioner) DriverGrantBucketAccess ¶
func (p *Provisioner) DriverGrantBucketAccess(ctx context.Context, req *cosi.DriverGrantBucketAccessRequest) (*cosi.DriverGrantBucketAccessResponse, error)
DriverGrantBucketAccess is an idempotent method for granting bucket access It is expected to grant access to the given bucketName Return values:
nil - Access was successfully granted non-nil err - Internal error [requeue'd with exponential backoff]
func (*Provisioner) DriverRevokeBucketAccess ¶
func (p *Provisioner) DriverRevokeBucketAccess(ctx context.Context, req *cosi.DriverRevokeBucketAccessRequest) (*cosi.DriverRevokeBucketAccessResponse, error)
DriverRevokeBucketAccess is an idempotent method for revoking bucket access It is expected to revoke access of a given accountId to the given bucketId Return values:
nil - Access successfully revoked non-nil err - Internal error [requeue'd with exponential backoff]