Skip to content

Commit

Permalink
Merge pull request #275 from shiftstack/add-cinder-csi
Browse files Browse the repository at this point in the history
OSASINFRA-3618: Add Cinder CSI support (part 2)
  • Loading branch information
openshift-merge-bot[bot] authored Oct 14, 2024
2 parents 8b4ddd0 + fcac8f2 commit e9b462f
Show file tree
Hide file tree
Showing 329 changed files with 190,725 additions and 44 deletions.
6 changes: 3 additions & 3 deletions Dockerfile.openstack-cinder
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.18 AS builder
WORKDIR /go/src/github.com/openshift/openstack-cinder-csi-driver-operator
COPY legacy/openstack-cinder-csi-driver-operator .
WORKDIR /go/src/github.com/openshift/csi-operator
COPY . .
RUN make

FROM registry.ci.openshift.org/ocp/4.18:base-rhel9
COPY --from=builder /go/src/github.com/openshift/openstack-cinder-csi-driver-operator/openstack-cinder-csi-driver-operator /usr/bin/
COPY --from=builder /go/src/github.com/openshift/csi-operator/bin/openstack-cinder-csi-driver-operator /usr/bin/
ENTRYPOINT ["/usr/bin/openstack-cinder-csi-driver-operator"]
LABEL io.k8s.display-name="OpenShift OpenStack Cinder CSI Driver Operator" \
io.k8s.description="The OpenStack Cinder CSI Driver Operator installs and maintains the OpenStack Cinder CSI Driver on a cluster."
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Lifecycle Manager (OLM).
* aws-efs-csi-driver-operator
* azure-disk-csi-driver-operator
* azure-file-csi-driver-operator
* openstack-cinder-csi-driver-operator
* smb-csi-driver-operator

## Automatic generation of CSI driver assets
Expand Down Expand Up @@ -37,7 +38,7 @@ Good starting points are `pkg/generator` and `pkg/generated-assets`.
### AWS EBS CSI driver operator

Before running the operator manually, you must remove the operator installed by
CSO/CVO
CSO/CVO:

```shell
# Scale down CVO and CSO
Expand Down
4 changes: 2 additions & 2 deletions assets/base/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ spec:
annotations:
# This annotation allows the workload pinning feature to work when clusters are configured for it.
# An admission webhook will look for this annotation when Pod admission occurs to modify the
# memory and cpu resources to a custom resource name that the schedular will use to correctly
# assign Pods in a workload pinned cluster. This annotation will be stripped from Pods when
# memory and cpu resources to a custom resource name that the schedular will use to correctly
# assign Pods in a workload pinned cluster. This annotation will be stripped from Pods when
# the cluster is not configured for workload pinning.
# See (openshift/enhancements#1213) for more info.
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
Expand Down
16 changes: 16 additions & 0 deletions assets/overlays/openstack-cinder/base/csidriver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: cinder.csi.openstack.org
annotations:
# This CSIDriver is managed by an OCP CSI operator
csi.openshift.io/managed: "true"
spec:
attachRequired: true
podInfoOnMount: true
fsGroupPolicy: File
requiresRepublish: false
storageCapacity: false
seLinuxMount: true
volumeLifecycleModes:
- Persistent
10 changes: 10 additions & 0 deletions assets/overlays/openstack-cinder/base/storageclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: standard-csi
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: cinder.csi.openstack.org
reclaimPolicy: "Delete"
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
10 changes: 10 additions & 0 deletions assets/overlays/openstack-cinder/base/volumesnapshotclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: standard-csi
annotations:
snapshot.storage.kubernetes.io/is-default-class: "true"
driver: cinder.csi.openstack.org
deletionPolicy: Delete
parameters:
force-create: "false"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated file. Do not edit. Update using "make update".
#
# Loaded from base/cabundle_cm.yaml
#
#

apiVersion: v1
kind: ConfigMap
metadata:
labels:
config.openshift.io/inject-trusted-cabundle: "true"
name: openstack-cinder-csi-driver-trusted-ca-bundle
namespace: ${NAMESPACE}
Loading

0 comments on commit e9b462f

Please sign in to comment.