Documentation ¶
Index ¶
- func CheckPhase(bucketClass *nbv1.BucketClass)
- func Cmd() *cobra.Command
- func CmdCreate() *cobra.Command
- func CmdCreateCacheNamespaceBucketclass() *cobra.Command
- func CmdCreateMultiNamespaceBucketclass() *cobra.Command
- func CmdCreateNamespaceBucketclass() *cobra.Command
- func CmdCreatePlacementBucketClass() *cobra.Command
- func CmdCreateSingleNamespaceBucketclass() *cobra.Command
- func CmdDelete() *cobra.Command
- func CmdList() *cobra.Command
- func CmdReconcile() *cobra.Command
- func CmdStatus() *cobra.Command
- func MapBackingstoreToBucketclasses(backingstore types.NamespacedName) []reconcile.Request
- func MapNamespacestoreToBucketclasses(namespacestore types.NamespacedName) []reconcile.Request
- func ParseBucketClassType(cmd *cobra.Command) nbv1.StoreType
- 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 RunDelete(cmd *cobra.Command, args []string)
- func RunList(cmd *cobra.Command, args []string)
- func RunReconcile(cmd *cobra.Command, args []string)
- func RunStatus(cmd *cobra.Command, args []string)
- func WaitReady(bucketClass *nbv1.BucketClass) bool
- type Reconciler
- func (r *Reconciler) FinalizeDeletion() error
- func (r *Reconciler) Reconcile() (reconcile.Result, error)
- func (r *Reconciler) ReconcileDeletion() error
- func (r *Reconciler) ReconcilePhaseConfiguring() error
- func (r *Reconciler) ReconcilePhaseVerifying() error
- func (r *Reconciler) ReconcilePhases() error
- func (r *Reconciler) SetPhase(phase nbv1.BucketClassPhase, reason string, message string)
- func (r *Reconciler) UpdateBucketClass(bucketNames []string) error
- func (r *Reconciler) UpdateStatus() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPhase ¶
func CheckPhase(bucketClass *nbv1.BucketClass)
CheckPhase prints the phase and reason for it
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 MapBackingstoreToBucketclasses ¶
func MapBackingstoreToBucketclasses(backingstore types.NamespacedName) []reconcile.Request
MapBackingstoreToBucketclasses returns a list of bucketclasses that uses the backingstore in their tiering policy used by bucketclass_contorller to watch backingstore changes
func MapNamespacestoreToBucketclasses ¶
func MapNamespacestoreToBucketclasses(namespacestore types.NamespacedName) []reconcile.Request
MapNamespacestoreToBucketclasses returns a list of bucketclasses that uses the namespacestore in their namespace policy used by bucketclass_contorller to watch namespacestores changes
func ParseBucketClassType ¶
ParseBucketClassType parses the --type flag to a StoreType enum
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 RunReconcile ¶
RunReconcile runs a CLI command
func WaitReady ¶
func WaitReady(bucketClass *nbv1.BucketClass) bool
WaitReady waits until the system phase changes to ready by the operator
Types ¶
type Reconciler ¶
type Reconciler struct { Request types.NamespacedName Client client.Client Scheme *runtime.Scheme Ctx context.Context Logger *logrus.Entry Recorder record.EventRecorder NBClient nb.Client SystemInfo *nb.SystemInfo BucketClass *nbv1.BucketClass NooBaa *nbv1.NooBaa }
Reconciler is the context for loading or reconciling a noobaa system
func NewReconciler ¶
func NewReconciler( req types.NamespacedName, client client.Client, scheme *runtime.Scheme, recorder record.EventRecorder, ) *Reconciler
NewReconciler initializes a reconciler to be used for loading or reconciling a bucket class
func (*Reconciler) FinalizeDeletion ¶
func (r *Reconciler) FinalizeDeletion() error
FinalizeDeletion removed the finalizer and updates in order to let the bucket class get reclaimed by kubernetes
func (*Reconciler) Reconcile ¶
func (r *Reconciler) Reconcile() (reconcile.Result, error)
Reconcile reads that state of the cluster for a System object, and makes changes based on the state read and what is in the System.Spec. The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
func (*Reconciler) ReconcileDeletion ¶
func (r *Reconciler) ReconcileDeletion() error
ReconcileDeletion handles the deletion of a bucket class using the noobaa api
func (*Reconciler) ReconcilePhaseConfiguring ¶
func (r *Reconciler) ReconcilePhaseConfiguring() error
ReconcilePhaseConfiguring updates existing buckets to match the changes in bucket class
func (*Reconciler) ReconcilePhaseVerifying ¶
func (r *Reconciler) ReconcilePhaseVerifying() error
ReconcilePhaseVerifying checks that we have the system and secret needed to reconcile
func (*Reconciler) ReconcilePhases ¶
func (r *Reconciler) ReconcilePhases() error
ReconcilePhases runs the reconcile flow and populates System.Status.
func (*Reconciler) SetPhase ¶
func (r *Reconciler) SetPhase(phase nbv1.BucketClassPhase, reason string, message string)
SetPhase updates the status phase and conditions
func (*Reconciler) UpdateBucketClass ¶
func (r *Reconciler) UpdateBucketClass(bucketNames []string) error
UpdateBucketClass updates all buckets that are assigned to a BucketClass
func (*Reconciler) UpdateStatus ¶
func (r *Reconciler) UpdateStatus() error
UpdateStatus updates the bucket class status in kubernetes from the memory