In the pre-hook, when we check for the ObjectStore objects, if one object is not present, we always log
the name of the ObjectStore referred to in the main plugin section. This makes it extremely difficult to debug issues from externalCluster with the wrong object store name..
|
for _, barmanObjectKey := range pluginConfiguration.GetReferredBarmanObjectsKey() { |
|
var barmanObject barmancloudv1.ObjectStore |
|
if err := r.Client.Get(ctx, barmanObjectKey, &barmanObject); err != nil { |
|
if apierrs.IsNotFound(err) { |
|
contextLogger.Info( |
|
"barman object configuration not found, requeuing", |
|
"name", pluginConfiguration.BarmanObjectName, |
|
"namespace", cluster.Namespace) |
|
return &reconciler.ReconcilerHooksResult{ |
|
Behavior: reconciler.ReconcilerHooksResult_BEHAVIOR_REQUEUE, |
|
}, nil |
|
} |
|
|
|
return nil, err |
|
} |
|
|
|
barmanObjects = append(barmanObjects, barmanObject) |
|
} |
In the pre-hook, when we check for the ObjectStore objects, if one object is not present, we always log
the name of the ObjectStore referred to in the main plugin section. This makes it extremely difficult to debug issues from externalCluster with the wrong object store name..
plugin-barman-cloud/internal/cnpgi/operator/reconciler.go
Lines 78 to 95 in f484b9e