Skip to content

Commit

Permalink
Set reclaim policy of PV of OVA provider to Delete
Browse files Browse the repository at this point in the history
The PV is currently not set with a reclaim policy and therefore it
defaults to 'Retain' which is conceptually incorrect since it is
supposed to be removed when the OVA provider is removed.

Here we set the reclaim policy of the PV to 'Delete' instead. While the
PV would still remain after the OVA provider is removed (since the PV is
not set with a storage class and therefore there is no driver that can
remove it), the state of the PV would change to 'Failed' rather than
'Released' in this case, which better reflects its true state. Removing
the PV for an OVA provider when the latter is removed will be addressed
separately.

Signed-off-by: Arik Hadas <[email protected]>
  • Loading branch information
ahadas committed Dec 19, 2023
1 parent 12740eb commit 822cb8b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/controller/provider/ova-setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func (r *Reconciler) createPvForNfs(provider *api.Provider, ctx context.Context,
Server: nfsServer,
},
},
PersistentVolumeReclaimPolicy: core.PersistentVolumeReclaimDelete,
},
}
err = r.Create(ctx, pv)
Expand Down

0 comments on commit 822cb8b

Please sign in to comment.