Should be able to delete bs even if the bc has already been deleted
This commit is contained in:
parent
b5a217bc3a
commit
e025a07c9b
@ -62,15 +62,6 @@ func (r *BackupSessionReconciler) Reconcile(ctx context.Context, req ctrl.Reques
|
||||
}
|
||||
return ctrl.Result{}, err
|
||||
}
|
||||
backupConf := formolv1alpha1.BackupConfiguration{}
|
||||
if err := r.Get(ctx, client.ObjectKey{
|
||||
Namespace: backupSession.Spec.Ref.Namespace,
|
||||
Name: backupSession.Spec.Ref.Name,
|
||||
}, &backupConf); err != nil {
|
||||
r.Log.Error(err, "unable to get BackupConfiguration")
|
||||
return ctrl.Result{}, err
|
||||
}
|
||||
|
||||
if !backupSession.ObjectMeta.DeletionTimestamp.IsZero() {
|
||||
r.Log.V(0).Info("BackupSession is being deleted")
|
||||
if controllerutil.ContainsFinalizer(&backupSession, finalizerName) {
|
||||
@ -90,6 +81,14 @@ func (r *BackupSessionReconciler) Reconcile(ctx context.Context, req ctrl.Reques
|
||||
}
|
||||
return ctrl.Result{}, err
|
||||
}
|
||||
backupConf := formolv1alpha1.BackupConfiguration{}
|
||||
if err := r.Get(ctx, client.ObjectKey{
|
||||
Namespace: backupSession.Spec.Ref.Namespace,
|
||||
Name: backupSession.Spec.Ref.Name,
|
||||
}, &backupConf); err != nil {
|
||||
r.Log.Error(err, "unable to get BackupConfiguration")
|
||||
return ctrl.Result{}, err
|
||||
}
|
||||
|
||||
var newSessionState formolv1alpha1.SessionState
|
||||
switch backupSession.Status.SessionState {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user