mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-20 06:06:06 +00:00
Move pvc annotation removal from CSI RIA to regular PVC RIA
Combine existing PVC non-CSI RIAs and move annotation removal out of the CSI plugin to fix issues with CSI volumes when using fs-backup Signed-off-by: Scott Seago <sseago@redhat.com>
This commit is contained in:
@@ -90,10 +90,6 @@ func NewCommand(f client.Factory) *cobra.Command {
|
||||
"velero.io/add-pvc-from-pod",
|
||||
newAddPVCFromPodRestoreItemAction,
|
||||
).
|
||||
RegisterRestoreItemAction(
|
||||
"velero.io/add-pv-from-pvc",
|
||||
newAddPVFromPVCRestoreItemAction,
|
||||
).
|
||||
RegisterRestoreItemAction(
|
||||
"velero.io/change-storage-class",
|
||||
newChangeStorageClassRestoreItemAction(f),
|
||||
@@ -115,8 +111,8 @@ func NewCommand(f client.Factory) *cobra.Command {
|
||||
newCRDV1PreserveUnknownFieldsItemAction,
|
||||
).
|
||||
RegisterRestoreItemAction(
|
||||
"velero.io/change-pvc-node-selector",
|
||||
newChangePVCNodeSelectorItemAction(f),
|
||||
"velero.io/pvc",
|
||||
newPVCRestoreItemAction(f),
|
||||
).
|
||||
RegisterRestoreItemAction(
|
||||
"velero.io/apiservice",
|
||||
@@ -308,10 +304,6 @@ func newAddPVCFromPodRestoreItemAction(logger logrus.FieldLogger) (any, error) {
|
||||
return ria.NewAddPVCFromPodAction(logger), nil
|
||||
}
|
||||
|
||||
func newAddPVFromPVCRestoreItemAction(logger logrus.FieldLogger) (any, error) {
|
||||
return ria.NewAddPVFromPVCAction(logger), nil
|
||||
}
|
||||
|
||||
func newCRDV1PreserveUnknownFieldsItemAction(logger logrus.FieldLogger) (any, error) {
|
||||
return ria.NewCRDV1PreserveUnknownFieldsAction(logger), nil
|
||||
}
|
||||
@@ -352,14 +344,14 @@ func newClusterRoleBindingItemAction(logger logrus.FieldLogger) (any, error) {
|
||||
return ria.NewClusterRoleBindingAction(logger), nil
|
||||
}
|
||||
|
||||
func newChangePVCNodeSelectorItemAction(f client.Factory) plugincommon.HandlerInitializer {
|
||||
func newPVCRestoreItemAction(f client.Factory) plugincommon.HandlerInitializer {
|
||||
return func(logger logrus.FieldLogger) (any, error) {
|
||||
client, err := f.KubeClient()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return ria.NewChangePVCNodeSelectorAction(
|
||||
return ria.NewPVCAction(
|
||||
logger,
|
||||
client.CoreV1().ConfigMaps(f.Namespace()),
|
||||
client.CoreV1().Nodes(),
|
||||
|
||||
Reference in New Issue
Block a user