Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AkshaySainiDell committed May 13, 2024
1 parent e1b10ce commit ad6fb3a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions controllers/csm_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1275,15 +1275,14 @@ func (r *ContainerStorageModuleReconciler) PreChecks(ctx context.Context, cr *cs
return fmt.Errorf("failed powermax validation: %v", err)
}
default:
for _, m := range cr.Spec.Modules {
if m.Name == csmv1.ApplicationMobility || m.Name == csmv1.AuthorizationServer {
goto checkUpgrade
}
// Go to checkUpgrade if it is standalone module i.e. app mobility or authorizatio proxy server
if cr.HasModule(csmv1.ApplicationMobility) || cr.HasModule(csmv1.AuthorizationServer) {
break
}

return fmt.Errorf("unsupported driver type %s", cr.Spec.Driver.CSIDriverType)
}

checkUpgrade:
upgradeValid, err := checkUpgrade(ctx, cr, operatorConfig)
if err != nil {
return fmt.Errorf("failed upgrade check: %v", err)
Expand Down

0 comments on commit ad6fb3a

Please sign in to comment.