Documentation
¶
Index ¶
- func Cmd() *cobra.Command
- func CmdCreate() *cobra.Command
- func CmdDelete() *cobra.Command
- func CmdList() *cobra.Command
- func CmdReconcile() *cobra.Command
- func ParseBackingStoreType(cmd *cobra.Command) nbv1.StoreType
- func RunCreate(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)
- type Reconciler
- func (r *Reconciler) FinalizeDeletion() error
- func (r *Reconciler) MakeExternalConnectionParams() (*nb.AddExternalConnectionParams, error)
- func (r *Reconciler) ReadSystemInfo() error
- func (r *Reconciler) Reconcile() (reconcile.Result, error)
- func (r *Reconciler) ReconcileDeletion() error
- func (r *Reconciler) ReconcileExternalConnection() error
- func (r *Reconciler) ReconcilePhaseVerifying() error
- func (r *Reconciler) ReconcilePhases() error
- func (r *Reconciler) ReconcilePool() error
- func (r *Reconciler) SetPhase(phase nbv1.BackingStorePhase, reason string, message string)
- func (r *Reconciler) UpdateStatus()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseBackingStoreType ¶
ParseBackingStoreType parses the --type flag to a StoreType enum
func RunReconcile ¶
RunReconcile runs a CLI command
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
BackingStore *nbv1.BackingStore
NooBaa *nbv1.NooBaa
Secret *corev1.Secret
SystemInfo *nb.SystemInfo
ExternalConnectionInfo *nb.ExternalConnectionInfo
PoolInfo *nb.PoolInfo
AddExternalConnectionParams *nb.AddExternalConnectionParams
CreateCloudPoolParams *nb.CreateCloudPoolParams
CreateHostsPoolParams *nb.CreateHostsPoolParams
}
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 backing store
func (*Reconciler) FinalizeDeletion ¶
func (r *Reconciler) FinalizeDeletion() error
FinalizeDeletion removed the finalizer and updates in order to let the backing-store get reclaimed by kubernetes
func (*Reconciler) MakeExternalConnectionParams ¶
func (r *Reconciler) MakeExternalConnectionParams() (*nb.AddExternalConnectionParams, error)
MakeExternalConnectionParams translates the backing store spec and secret, to noobaa api structures to be used for creating/updating external connetion and pool
func (*Reconciler) ReadSystemInfo ¶
func (r *Reconciler) ReadSystemInfo() error
ReadSystemInfo loads the information from the noobaa system api, and prepares the structures to reconcile
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 backing-store using the noobaa api
func (*Reconciler) ReconcileExternalConnection ¶
func (r *Reconciler) ReconcileExternalConnection() error
ReconcileExternalConnection handles the external connection using noobaa api
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) ReconcilePool ¶
func (r *Reconciler) ReconcilePool() error
ReconcilePool handles the pool using noobaa api
func (*Reconciler) SetPhase ¶
func (r *Reconciler) SetPhase(phase nbv1.BackingStorePhase, reason string, message string)
SetPhase updates the status phase and conditions
func (*Reconciler) UpdateStatus ¶
func (r *Reconciler) UpdateStatus()
UpdateStatus updates the backing store status in kubernetes from the memory