core: reconcile operator configuration with env var
Previously, we were ignoring configuration changes coming from the
operator's pod env variables. We were assuming most users were using the
operator configmap "rook-ceph-operator-config" but most Helm users
don't. Now we will reconcile if a cephcluster is found during a CREATE
event (can be an operator restart or a cephcluster creation) AND no
"rook-ceph-operator-config" is found which means the operator's pod env
var are used.
Also, unit tests have been added (long due) for the predicate!
Closes: #9602, #9487, #9579
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 1208bc1410)
This commit is contained in:
1 parent
c8c0639704
commit
08dd2b9732
4 files changed
+151
-5
No files matched your search
@@ -745,6 +745,8 @@ func DuplicateCephClusters(ctx context.Context, c client.Client, object client.O
|
||||
return true
|
||||
}
|
||||
|
||||
logger.Debugf("found %d ceph clusters in namespace %q", len(cephClusterList.Items), object.GetNamespace())
|
||||
|
||||
// This check is needed when the operator is down and a cluster was created
|
||||
if len(cephClusterList.Items) > 1 {
|
||||
// Since multiple predicate are using this function we don't want all of them to log the
|
||||
|
||||
Reference in new issue
Block a user