Skip to content

Commit

Permalink
feat(cstor-upgrade): add upgrade runtask for cStor pool and volume fr…
Browse files Browse the repository at this point in the history
…om 0.8.2 to 0.9.0 (openebs#2569)

Signed-off-by: Ashutosh Kumar <ashutosh.kumar@openebs.io>
  • Loading branch information
Ashutosh Kumar authored and Amit Kumar Das committed May 17, 2019
1 parent a66add7 commit a12d0ef
Show file tree
Hide file tree
Showing 10 changed files with 1,845 additions and 0 deletions.
12 changes: 12 additions & 0 deletions k8s/sample-pv-yamls/cspc/cspc-sparse-single.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: openebs.io/v1alpha1
kind: CStorPoolCluster
metadata:
name: sparse-cluster-auto
spec:
name: sparse-cluster-auto
type: sparse
maxPools: 1
poolSpec:
poolType: striped
cacheFile: /var/openebs/sparse/sparse-claim-auto.cache
overProvisioning: false
34 changes: 34 additions & 0 deletions k8s/sample-pv-yamls/cspc/pvc-sparse-claim-cstor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: openebs-cstor-sparse-auto
annotations:
openebs.io/cas-type: cstor
cas.openebs.io/config: |
- name: CStorPoolCluster
value: "sparse-cluster-auto"
- name: ReplicaCount
value: "1"
#- name: TargetResourceLimits
# value: |-
# memory: 1Gi
# cpu: 200m
#- name: AuxResourceLimits
# value: |-
# memory: 0.5Gi
# cpu: 50m
provisioner: openebs.io/provisioner-iscsi
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: cstor-vol1-1r-claim
spec:
storageClassName: openebs-cstor-sparse-auto
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 4G

4 changes: 4 additions & 0 deletions k8s/upgrades/0.8.1-0.8.2/patch-strategy-recreate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
{ "op": "remove", "path": "/spec/strategy/rollingUpdate" },
{ "op": "replace", "path": "/spec/strategy/type", "value": "Recreate" }
]
14 changes: 14 additions & 0 deletions k8s/upgrades/0.8.2-0.9.0/cstor/cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: upgraderesults.openebs.io
spec:
group: openebs.io
names:
kind: UpgradeResult
plural: upgraderesults
shortNames:
- uresult
singular: upgraderesult
scope: Namespaced
version: v1alpha1
Loading

0 comments on commit a12d0ef

Please sign in to comment.