Skip to content

Commit

Permalink
openstack-cinder: Add support for Hypershift
Browse files Browse the repository at this point in the history
The final step in our journey: we start using the assets generated in
earlier commits and formally add support for Cinder on Hypershift.

Signed-off-by: Stephen Finucane <[email protected]>
  • Loading branch information
stephenfin committed Oct 24, 2024
1 parent 653d978 commit 2e832b0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pkg/operator/csidriveroperator/csioperatorclient/cinder.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,20 @@ func GetOpenStackCinderCSIOperatorConfig(isHypershift bool) CSIOperatorConfig {
csiDriverConfig.CRAsset = "csidriveroperators/openstack-cinder/standalone/generated/operator.openshift.io_v1_clustercsidriver_cinder.csi.openstack.org.yaml"
csiDriverConfig.DeploymentAsset = "csidriveroperators/openstack-cinder/standalone/generated/apps_v1_deployment_openstack-cinder-csi-driver-operator.yaml"
} else {
panic("Hypershift unsupported")
csiDriverConfig.StaticAssets = []string{
"csidriveroperators/openstack-cinder/hypershift/guest/generated/rbac.authorization.k8s.io_v1_clusterrole_openstack-cinder-csi-driver-operator-clusterrole.yaml",
"csidriveroperators/openstack-cinder/hypershift/guest/generated/rbac.authorization.k8s.io_v1_clusterrolebinding_openstack-cinder-csi-driver-operator-clusterrolebinding.yaml",
"csidriveroperators/openstack-cinder/hypershift/guest/generated/rbac.authorization.k8s.io_v1_role_openstack-cinder-csi-driver-operator-role.yaml",
"csidriveroperators/openstack-cinder/hypershift/guest/generated/rbac.authorization.k8s.io_v1_rolebinding_openstack-cinder-csi-driver-operator-rolebinding.yaml",
"csidriveroperators/openstack-cinder/hypershift/guest/generated/v1_serviceaccount_openstack-cinder-csi-driver-operator.yaml",
}
csiDriverConfig.MgmtStaticAssets = []string{
"csidriveroperators/openstack-cinder/hypershift/mgmt/generated/rbac.authorization.k8s.io_v1_role_openstack-cinder-csi-driver-operator-role.yaml",
"csidriveroperators/openstack-cinder/hypershift/mgmt/generated/rbac.authorization.k8s.io_v1_rolebinding_openstack-cinder-csi-driver-operator-rolebinding.yaml",
"csidriveroperators/openstack-cinder/hypershift/mgmt/generated/v1_serviceaccount_openstack-cinder-csi-driver-operator.yaml",
}
csiDriverConfig.DeploymentAsset = "csidriveroperators/openstack-cinder/hypershift/mgmt/generated/apps_v1_deployment_openstack-cinder-csi-driver-operator.yaml"
csiDriverConfig.CRAsset = "csidriveroperators/openstack-cinder/hypershift/guest/generated/operator.openshift.io_v1_clustercsidriver_cinder.csi.openstack.org.yaml"
}

return csiDriverConfig
Expand Down
1 change: 1 addition & 0 deletions pkg/operator/operator_starter.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ func (hsr *HyperShiftStarter) populateConfigs(clients *csoclients.Clients) []csi
csioperatorclient.GetAzureDiskCSIOperatorConfig(true),
csioperatorclient.GetAzureFileCSIOperatorConfig(true),
csioperatorclient.GetAWSEBSCSIOperatorConfig(true),
csioperatorclient.GetOpenStackCinderCSIOperatorConfig(true),
csioperatorclient.GetPowerVSBlockCSIOperatorConfig(true),
}
}

0 comments on commit 2e832b0

Please sign in to comment.