Skip to content

Commit

Permalink
fixup! fix: Add old datamover fields back to DPA
Browse files Browse the repository at this point in the history
Signed-off-by: Mateus Oliveira <[email protected]>
  • Loading branch information
mateusoliveira43 committed May 20, 2024
1 parent 85e90e7 commit 55d7bd8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions controllers/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ func (r *DPAReconciler) ValidateDataProtectionCR(log logr.Logger) (bool, error)
}

// check for VSM/Volsync DataMover (OADP 1.2 or below) syntax
for _, plugin := range dpa.Spec.Configuration.Velero.DefaultPlugins {
if plugin == oadpv1alpha1.DefaultPluginVSM {
return false, errors.New("Delete vsm from spec.configuration.velero.defaultPlugins and dataMover object from spec.features. Use Velero Built-in Data Mover instead")
}
}
if dpa.Spec.Features != nil && dpa.Spec.Features.DataMover != nil {
return false, errors.New("Delete vsm from spec.configuration.velero.defaultPlugins and dataMover object from spec.features. Use Velero Built-in Data Mover instead")
}
Expand Down Expand Up @@ -113,6 +108,10 @@ func (r *DPAReconciler) ValidateVeleroPlugins(log logr.Logger) (bool, error) {
pluginSpecificMap, ok := credentials.PluginSpecificFields[plugin]
pluginNeedsCheck, foundInBSLorVSL := providerNeedsDefaultCreds[string(plugin)]

// check for VSM/Volsync DataMover (OADP 1.2 or below) syntax
if plugin == oadpv1alpha1.DefaultPluginVSM {
return false, errors.New("Delete vsm from spec.configuration.velero.defaultPlugins and dataMover object from spec.features. Use Velero Built-in Data Mover instead")
}
if foundInVSL := snapshotLocationsProviders[string(plugin)]; foundInVSL {
pluginNeedsCheck = true
}
Expand Down

0 comments on commit 55d7bd8

Please sign in to comment.