Skip to content

Commit

Permalink
improved the ppvc handling
Browse files Browse the repository at this point in the history
  • Loading branch information
facchettos committed May 14, 2024
1 parent 9bf500d commit d9af0e5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/controllers/resources/persistentvolumes/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,9 @@ func (s *persistentVolumeSyncer) shouldSync(ctx context.Context, pObj *corev1.Pe
switch {
case kerrors.IsNotFound(err):
return true, vPvc, nil, nil
case kerrors.IsForbidden(err):
case err != nil, !translate.Default.IsManaged(pPvc):
// we don't own the physical pvc here so we don't sync
return false, vPvc, nil, nil
case err != nil:
return false, vPvc, nil, err
}

return true, vPvc, pPvc, nil
Expand Down

0 comments on commit d9af0e5

Please sign in to comment.