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 29, 2024
1 parent bfef53a commit 99e0346
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ rules:
resources:
- deployments
- replicasets
- daemonsets
- statefulsets
verbs:
- '*'
- apiGroups:
Expand All @@ -33,6 +35,7 @@ rules:
- endpoints
- events
- secrets
- persistentvolumeclaims
verbs:
- '*'
- apiGroups:
Expand Down Expand Up @@ -64,3 +67,9 @@ rules:
- watch
- list
- get
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
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 99e0346

Please sign in to comment.