Skip to content

Commit

Permalink
Merge pull request #45 from Fedosin/manifests_cleanup
Browse files Browse the repository at this point in the history
Bug 1960732: delete manifests and update readme
  • Loading branch information
openshift-merge-robot committed Jun 2, 2021
2 parents 07c1d0e + cb8e99e commit 1184ace
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 418 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Expand Up @@ -5,7 +5,6 @@ RUN make

FROM registry.ci.openshift.org/ocp/4.8:base
COPY --from=builder /go/src/github.com/openshift/openstack-cinder-csi-driver-operator/openstack-cinder-csi-driver-operator /usr/bin/
COPY manifests /manifests
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."
1 change: 0 additions & 1 deletion Dockerfile.rhel7
Expand Up @@ -5,7 +5,6 @@ RUN make

FROM registry.svc.ci.openshift.org/ocp/4.6:base
COPY --from=builder /go/src/github.com/openshift/openstack-cinder-csi-driver-operator/openstack-cinder-csi-driver-operator /usr/bin/
COPY manifests /manifests
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."
36 changes: 32 additions & 4 deletions README.md
Expand Up @@ -2,10 +2,38 @@

An operator to deploy the [OpenStack Cinder CSI driver](https://github.com/openshift/cloud-provider-openstack/tree/master/pkg/csi/cinder) in OpenShift.

## Design
# Quick start

The operator is based on [openshift/library-go](https://github.com/openshift/library-go) and manages `ClusterCSIDriver` instance named `cinder.csi.openstack.org`.
Before running the operator manually, you must remove the operator installed by CSO/CVO

# Usage
```shell
# Scale down CVO and CSO
oc scale --replicas=0 deploy/cluster-version-operator -n openshift-cluster-version
oc scale --replicas=0 deploy/cluster-storage-operator -n openshift-cluster-storage-operator

The operator is installed by default by cluster-storage-operator when OpenShift is installed on OpenStack. Deployment YAML files in `manifests/` directory are only for quick & dirty startup, the authoritative manifests are in [cluster-storage-operator project](https://github.com/openshift/cluster-storage-operator/tree/master/assets/csidriveroperators/openstack-cinder).
# Delete operator resources (daemonset, deployments)
oc -n openshift-cluster-csi-drivers delete deployment.apps/openstack-cinder-csi-driver-operator deployment.apps/openstack-cinder-csi-driver-controller daemonset.apps/openstack-cinder-csi-driver-node
```

To build and run the operator locally:

```shell
# Create only the resources the operator needs to run via CLI
oc apply -f https://raw.githubusercontent.com/openshift/cluster-storage-operator/master/assets/csidriveroperators/openstack-cinder/08_cr.yaml

# Build the operator
make

# Set the environment variables
export DRIVER_IMAGE=quay.io/openshift/origin-openstack-cinder-csi-driver:latest
export PROVISIONER_IMAGE=quay.io/openshift/origin-csi-external-provisioner:latest
export ATTACHER_IMAGE=quay.io/openshift/origin-csi-external-attacher:latest
export RESIZER_IMAGE=quay.io/openshift/origin-csi-external-resizer:latest
export SNAPSHOTTER_IMAGE=quay.io/openshift/origin-csi-external-snapshotter:latest
export NODE_DRIVER_REGISTRAR_IMAGE=quay.io/openshift/origin-csi-node-driver-registrar:latest
export LIVENESS_PROBE_IMAGE=quay.io/openshift/origin-csi-livenessprobe:latest
export KUBE_RBAC_PROXY_IMAGE=quay.io/openshift/origin-kube-rbac-proxy:latest

# Run the operator via CLI
./openstack-cinder-csi-driver-operator start --kubeconfig $MY_KUBECONFIG --namespace openshift-cluster-csi-drivers
```
5 changes: 0 additions & 5 deletions manifests/02_sa.yaml

This file was deleted.

40 changes: 0 additions & 40 deletions manifests/03_role.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions manifests/04_rolebinding.yaml

This file was deleted.

265 changes: 0 additions & 265 deletions manifests/05_clusterrole.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions manifests/06_clusterrolebinding.yaml

This file was deleted.

0 comments on commit 1184ace

Please sign in to comment.