Skip to content

Commit

Permalink
refact(cspc-operator): added cspc crd yaml to cspc-operator (openebs#…
Browse files Browse the repository at this point in the history
…2732)

Signed-off-by: shubham <shubham.bajpai@mayadata.io>
  • Loading branch information
shubham14bajpai authored and vishnuitta committed Sep 4, 2019
1 parent a67b9fd commit 70cf316
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
23 changes: 23 additions & 0 deletions k8s/cspc-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
# name must match the spec fields below, and be in the form: <plural>.<group>
name: cstorpoolclusters.openebs.io
spec:
# group name to use for REST API: /apis/<group>/<version>
group: openebs.io
# version name to use for REST API: /apis/<group>/<version>
version: v1alpha1
# either Namespaced or Cluster
scope: Namespaced
names:
# plural name to be used in the URL: /apis/<group>/<version>/<plural>
plural: cstorpoolclusters
# singular name to be used as an alias on the CLI and for display
singular: cstorpoolcluster
# kind is normally the CamelCased singular type. Your resource manifests use this.
kind: CStorPoolCluster
# shortNames allow shorter string to match your resource on the CLI
shortNames:
- cspc
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
Expand Down
13 changes: 13 additions & 0 deletions k8s/cspc_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

echo "Running pre-installation steps"

x=$(kubectl get crd cstorpoolclusters.openebs.io -o jsonpath="{.spec.scope}" 2>&1 )

if [[ $x == 'Cluster' ]]; then
kubectl delete crd cstorpoolclusters.openebs.io
fi

echo "Installing cspc operator"

kubectl apply -f https://raw.githubusercontent.com/openebs/openebs/master/k8s/cspc-operator.yaml

0 comments on commit 70cf316

Please sign in to comment.