From e10219374237047e0bf0890b02f5fd01220b8c85 Mon Sep 17 00:00:00 2001 From: Leela Venkaiah G Date: Wed, 2 Oct 2024 08:16:34 +0530 Subject: [PATCH] use a default backing store for noobaa acount noobaa account creation requires a default backing store to be specified which will be used to create new buckets for connected clients. Signed-off-by: Leela Venkaiah G --- controllers/storageconsumer/storageconsumer_controller.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controllers/storageconsumer/storageconsumer_controller.go b/controllers/storageconsumer/storageconsumer_controller.go index 2638dad99d..2a4535a2c2 100644 --- a/controllers/storageconsumer/storageconsumer_controller.go +++ b/controllers/storageconsumer/storageconsumer_controller.go @@ -229,6 +229,8 @@ func (r *StorageConsumerReconciler) reconcileNoobaaAccount() error { if err := r.own(r.noobaaAccount); err != nil { return err } + // TODO: query the name of backing store during runtime + r.noobaaAccount.Spec.DefaultResource = "noobaa-default-backing-store" // the following annotation will enable noobaa-operator to create a auth_token secret based on this account util.AddAnnotation(r.noobaaAccount, "remote-operator", "true") return nil @@ -288,6 +290,7 @@ func (r *StorageConsumerReconciler) SetupWithManager(mgr ctrl.Manager) error { predicate.GenerationChangedPredicate{}, )). Owns(&rookCephv1.CephClient{}). + Owns(&nbv1.NooBaaAccount{}). // Watch non-owned resources cephBlockPool // Whenever their is new cephBockPool created to keep storageConsumer up to date. Watches(&rookCephv1.CephBlockPool{},