Documentation ¶
Index ¶
- func CheckPhase(backStore *nbv1.BackingStore)
- func Cmd() *cobra.Command
- func CmdCreate() *cobra.Command
- func CmdCreateAWSS3() *cobra.Command
- func CmdCreateAWSSTSS3() *cobra.Command
- func CmdCreateAzureBlob() *cobra.Command
- func CmdCreateGoogleCloudStorage() *cobra.Command
- func CmdCreateIBMCos() *cobra.Command
- func CmdCreatePVPool() *cobra.Command
- func CmdCreateS3Compatible() *cobra.Command
- func CmdDelete() *cobra.Command
- func CmdList() *cobra.Command
- func CmdReconcile() *cobra.Command
- func CmdRunRemovePendingPods() *cobra.Command
- func CmdStatus() *cobra.Command
- func GetBackingStoreFromArgs(cmd *cobra.Command, args []string) *nbv1.BackingStore
- func MapNoobaaToBackingStores(noobaa types.NamespacedName) []reconcile.Request
- func MapSecretToBackingStores(secret types.NamespacedName) []reconcile.Request
- func RunCreate(cmd *cobra.Command, args []string)
- func RunCreateAWSS3(cmd *cobra.Command, args []string)
- func RunCreateAWSSTSS3(cmd *cobra.Command, args []string)
- func RunCreateAzureBlob(cmd *cobra.Command, args []string)
- func RunCreateGoogleCloudStorage(cmd *cobra.Command, args []string)
- func RunCreateIBMCos(cmd *cobra.Command, args []string)
- func RunCreatePVPool(cmd *cobra.Command, args []string)
- func RunCreateS3Compatible(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 RunRemovePendingPods(cmd *cobra.Command, args []string)
- func RunStatus(cmd *cobra.Command, args []string)
- func WaitReady(backStore *nbv1.BackingStore) bool
- type ModeInfo
- type Reconciler
- func (r *Reconciler) CheckExternalConnection(connInfo *nb.CheckExternalConnectionParams) error
- func (r *Reconciler) FinalizeDeletion() error
- func (r *Reconciler) LoadBackingStoreSecret() error
- func (r *Reconciler) MakeExternalConnectionParams() (*nb.AddExternalConnectionParams, error)
- func (r *Reconciler) Own(obj metav1.Object)
- func (r *Reconciler) ReadSystemInfo() error
- func (r *Reconciler) Reconcile() (reconcile.Result, error)
- func (r *Reconciler) ReconcileDeletion(systemFound bool) error
- func (r *Reconciler) ReconcileExternalConnection() error
- func (r *Reconciler) ReconcilePhaseConnecting() error
- func (r *Reconciler) ReconcilePhaseCreating() 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() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPhase ¶
func CheckPhase(backStore *nbv1.BackingStore)
CheckPhase prints the phase and reason for it
func CmdCreateAWSSTSS3 ¶ added in v5.10.1
CmdCreateAWSSTSS3 returns a cli command
func CmdCreateAzureBlob ¶
CmdCreateAzureBlob returns a CLI command
func CmdCreateGoogleCloudStorage ¶
CmdCreateGoogleCloudStorage returns a CLI command
func CmdCreateS3Compatible ¶
CmdCreateS3Compatible returns a CLI command
func CmdRunRemovePendingPods ¶
CmdRunRemovePendingPods returns a CLI command
func GetBackingStoreFromArgs ¶ added in v5.13.0
func GetBackingStoreFromArgs(cmd *cobra.Command, args []string) *nbv1.BackingStore
GetBackingStoreFromArgs returns the backingstore from CLI arg
func MapNoobaaToBackingStores ¶ added in v5.13.0
func MapNoobaaToBackingStores(noobaa types.NamespacedName) []reconcile.Request
MapNoobaaToBackingStores returns a list of backingstores that are inside Noobaa system used by backingstore_controller to watch Noobaa CR changes
func MapSecretToBackingStores ¶ added in v5.11.0
func MapSecretToBackingStores(secret types.NamespacedName) []reconcile.Request
MapSecretToBackingStores returns a list of backingstores that uses the secret in their secretReference used by backingstore_controller to watch secrets changes
func RunCreateAWSS3 ¶
RunCreateAWSS3 runs a CLI command
func RunCreateAWSSTSS3 ¶ added in v5.10.1
RunCreateAWSSTSS3 runs a cli command
func RunCreateAzureBlob ¶
RunCreateAzureBlob runs a CLI command
func RunCreateGoogleCloudStorage ¶
RunCreateGoogleCloudStorage runs a CLI command
func RunCreateIBMCos ¶
RunCreateIBMCos runs a CLI command
func RunCreatePVPool ¶
RunCreatePVPool runs a CLI command
func RunCreateS3Compatible ¶
RunCreateS3Compatible runs a CLI command
func RunReconcile ¶
RunReconcile runs a CLI command
func RunRemovePendingPods ¶
RunRemovePendingPods runs a CLI command
func WaitReady ¶
func WaitReady(backStore *nbv1.BackingStore) bool
WaitReady waits until the system phase changes to ready by the operator
Types ¶
type ModeInfo ¶
type ModeInfo struct { Phase nbv1.BackingStorePhase Severity string }
ModeInfo holds local information for a backing store mode.
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 PodAgentTemplate *corev1.Pod PvcAgentTemplate *corev1.PersistentVolumeClaim ServiceAccount *corev1.ServiceAccount SystemInfo *nb.SystemInfo ExternalConnectionInfo *nb.ExternalConnectionInfo PoolInfo *nb.PoolInfo HostsInfo *[]nb.HostInfo AddExternalConnectionParams *nb.AddExternalConnectionParams CreateCloudPoolParams *nb.CreateCloudPoolParams CreateHostsPoolParams *nb.CreateHostsPoolParams UpdateHostsPoolParams *nb.UpdateHostsPoolParams UpdateExternalConnectionParams *nb.UpdateExternalConnectionParams }
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) CheckExternalConnection ¶ added in v5.11.0
func (r *Reconciler) CheckExternalConnection(connInfo *nb.CheckExternalConnectionParams) error
CheckExternalConnection checks an external connection using the noobaa api
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) LoadBackingStoreSecret ¶
func (r *Reconciler) LoadBackingStoreSecret() error
LoadBackingStoreSecret loads the secret to the reconciler struct
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 connection and pool
func (*Reconciler) Own ¶
func (r *Reconciler) Own(obj metav1.Object)
Own sets the object owner references to the backingstore
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(systemFound bool) 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) ReconcilePhaseConnecting ¶
func (r *Reconciler) ReconcilePhaseConnecting() error
ReconcilePhaseConnecting checks that we have the system and secret needed to reconcile
func (*Reconciler) ReconcilePhaseCreating ¶
func (r *Reconciler) ReconcilePhaseCreating() error
ReconcilePhaseCreating checks that we have the system and secret needed to reconcile
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() error
UpdateStatus updates the backing store status in kubernetes from the memory