Documentation ¶
Index ¶
- func CheckPhase(noobaaAccount *nbv1.NooBaaAccount)
- func Cmd() *cobra.Command
- func CmdCreate() *cobra.Command
- func CmdCredentials() *cobra.Command
- func CmdDelete() *cobra.Command
- func CmdList() *cobra.Command
- func CmdPasswd() *cobra.Command
- func CmdReconcile() *cobra.Command
- func CmdRegenerate() *cobra.Command
- func CmdStatus() *cobra.Command
- func CmdUpdate() *cobra.Command
- func GenerateAccountKeys(name string) error
- func GenerateNonCrdAccountKeys(name string) error
- func IsBucketInBucketsArray(buckets []nb.BucketInfo, bucketName string) bool
- func PasswordResstrictions(oldPassword string, newPassword string, retypeNewPassword string)
- func ResetPassword(name string, oldPassword string, newPassword string, retypeNewPassword string) error
- func RunCreate(cmd *cobra.Command, args []string)
- func RunCredentials(cmd *cobra.Command, args []string)
- func RunDelete(cmd *cobra.Command, args []string)
- func RunList(cmd *cobra.Command, args []string)
- func RunPasswd(cmd *cobra.Command, args []string)
- func RunReconcile(cmd *cobra.Command, args []string)
- func RunRegenerate(cmd *cobra.Command, args []string)
- func RunStatus(cmd *cobra.Command, args []string)
- func RunUpdate(cmd *cobra.Command, args []string)
- func UpdateAccountKeys(name string, accessKeys nb.S3AccessKeys) error
- func UpdateNonCrdAccountKeys(name string, accessKeys nb.S3AccessKeys) error
- func ValidateAccessKeys(accessKeys nb.S3AccessKeys)
- func WaitReady(noobaaAccount *nbv1.NooBaaAccount) bool
- type Reconciler
- func (r *Reconciler) CreateNooBaaAccount() error
- func (r *Reconciler) FinalizeDeletion() error
- func (r *Reconciler) Own(obj metav1.Object)
- func (r *Reconciler) ReadSystemInfo() error
- func (r *Reconciler) Reconcile() (reconcile.Result, error)
- func (r *Reconciler) ReconcileDeletion() error
- func (r *Reconciler) ReconcilePhaseConfiguring() error
- func (r *Reconciler) ReconcilePhaseConnecting() error
- func (r *Reconciler) ReconcilePhaseVerifying() error
- func (r *Reconciler) ReconcilePhases() error
- func (r *Reconciler) SetPhase(phase nbv1.NooBaaAccountPhase, reason string, message string)
- func (r *Reconciler) UpdateNooBaaAccount() error
- func (r *Reconciler) UpdateStatus() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPhase ¶
func CheckPhase(noobaaAccount *nbv1.NooBaaAccount)
CheckPhase prints the phase and reason for it
func CmdCredentials ¶ added in v5.16.0
CmdCredentials returns a CLI command
func GenerateAccountKeys ¶
GenerateAccountKeys regenerate noobaa account (CRD based) S3 keys
func GenerateNonCrdAccountKeys ¶
GenerateNonCrdAccountKeys regenerate noobaa account (none CRD based) S3 keys
func IsBucketInBucketsArray ¶
func IsBucketInBucketsArray(buckets []nb.BucketInfo, bucketName string) bool
IsBucketInBucketsArray returns true if a bucket array contains a bucket with a spesific name.
func PasswordResstrictions ¶
PasswordResstrictions checks for all kind of password restrictions
func ResetPassword ¶
func ResetPassword(name string, oldPassword string, newPassword string, retypeNewPassword string) error
ResetPassword reset noobaa account password
func RunCredentials ¶ added in v5.16.0
RunCredentials runs a CLI command
func RunReconcile ¶
RunReconcile runs a CLI command
func RunRegenerate ¶
RunRegenerate runs a CLI command
func UpdateAccountKeys ¶ added in v5.16.0
func UpdateAccountKeys(name string, accessKeys nb.S3AccessKeys) error
UpdateAccountKeys update noobaa account (CRD based) S3 keys
func UpdateNonCrdAccountKeys ¶ added in v5.16.0
func UpdateNonCrdAccountKeys(name string, accessKeys nb.S3AccessKeys) error
UpdateNonCrdAccountKeys update noobaa account (none CRD based) S3 keys
func ValidateAccessKeys ¶ added in v5.16.0
func ValidateAccessKeys(accessKeys nb.S3AccessKeys)
ValidateAccessKeys checks validity of credentials (access_key and secret_key)
func WaitReady ¶
func WaitReady(noobaaAccount *nbv1.NooBaaAccount) 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 NooBaaAccountInfo *nb.AccountInfo NooBaaAccount *nbv1.NooBaaAccount NooBaa *nbv1.NooBaa Secret *corev1.Secret }
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 noobaa account
func (*Reconciler) CreateNooBaaAccount ¶
func (r *Reconciler) CreateNooBaaAccount() error
CreateNooBaaAccount creates a new noobaa account
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) Own ¶
func (r *Reconciler) Own(obj metav1.Object)
Own sets the object owner references to the noobaaAccount
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 noobaa account using the noobaa api
func (*Reconciler) ReconcilePhaseConfiguring ¶
func (r *Reconciler) ReconcilePhaseConfiguring() error
ReconcilePhaseConfiguring create orupdates existing accounts to match the changes in noobaaaccount
func (*Reconciler) ReconcilePhaseConnecting ¶
func (r *Reconciler) ReconcilePhaseConnecting() error
ReconcilePhaseConnecting 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) SetPhase ¶
func (r *Reconciler) SetPhase(phase nbv1.NooBaaAccountPhase, reason string, message string)
SetPhase updates the status phase and conditions
func (*Reconciler) UpdateNooBaaAccount ¶
func (r *Reconciler) UpdateNooBaaAccount() error
UpdateNooBaaAccount update an existing noobaa account
func (*Reconciler) UpdateStatus ¶
func (r *Reconciler) UpdateStatus() error
UpdateStatus updates the noobaa account status in kubernetes from the memory