Skip to content

Commit

Permalink
Add Manila CSI
Browse files Browse the repository at this point in the history
  • Loading branch information
MaysaMacedo committed Oct 30, 2024
1 parent bfef53a commit de62b8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2422,7 +2422,6 @@ func (r *reconciler) reconcileStorage(ctx context.Context, hcp *hyperv1.HostedCo
log.Info("reconciled CSISnapshotController")
}


storageCR := manifests.Storage()
if _, err := r.CreateOrUpdate(ctx, r.client, storageCR, func() error {
storage.ReconcileStorage(storageCR)
Expand All @@ -2433,14 +2432,12 @@ func (r *reconciler) reconcileStorage(ctx context.Context, hcp *hyperv1.HostedCo
log.Info("reconciled Storage")
}


var driverNames []operatorv1.CSIDriverName
switch hcp.Spec.Platform.Type {
case hyperv1.AWSPlatform:
driverNames = []operatorv1.CSIDriverName{operatorv1.AWSEBSCSIDriver}
case hyperv1.OpenStackPlatform:
// TODO(stephenfin): Add Manila here once it supports Hypershift
driverNames = []operatorv1.CSIDriverName{operatorv1.CinderCSIDriver}
driverNames = []operatorv1.CSIDriverName{operatorv1.CinderCSIDriver, operatorv1.ManilaCSIDriver}
}
for _, driverName := range driverNames {
driver := manifests.ClusterCSIDriver(driverName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,16 @@ func (a OpenStack) ReconcileCredentials(ctx context.Context, c client.Client, cr
if err := a.reconcileOpenStackCredentialsSecret(ctx, c, createOrUpdate, hcluster, controlPlaneNamespace, "cloud-network-config-controller-creds"); err != nil {
return err
}
// Sync CSI driver secret
// Sync Cinder CSI driver secret
if err := a.reconcileOpenStackCredentialsSecret(ctx, c, createOrUpdate, hcluster, controlPlaneNamespace, "openstack-cloud-credentials"); err != nil {
return err
}

// Sync Manila CSI driver secret
if err := a.reconcileOpenStackCredentialsSecret(ctx, c, createOrUpdate, hcluster, controlPlaneNamespace, "manila-cloud-credentials"); err != nil {
return err
}

return nil
}

Expand Down

0 comments on commit de62b8e

Please sign in to comment.