Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(crd): upgrade script for refactoring the CRD #73

Merged
merged 2 commits into from Apr 1, 2020

Conversation

pawanpraka1
Copy link
Contributor

@pawanpraka1 pawanpraka1 commented Mar 27, 2020

steps to upgrade :-

  1. apply the new CRD
$ kubectl apply -f upgrade/crd.yaml
customresourcedefinition.apiextensions.k8s.io/zfsvolumes.zfs.openebs.io created
customresourcedefinition.apiextensions.k8s.io/zfssnapshots.zfs.openebs.io created
  1. run upgrade.sh
$ sh upgrade/upgrade.sh
zfsvolume.zfs.openebs.io/pvc-086a8608-9057-42df-b684-ee4ae8d35f71 created
zfsvolume.zfs.openebs.io/pvc-5286d646-c93d-4413-9707-fd95ebaae8c0 created
zfsvolume.zfs.openebs.io/pvc-74abefb8-8423-4b13-a607-7184ef088fb5 created
zfsvolume.zfs.openebs.io/pvc-82368c44-eee8-47ee-85a6-633a8023faa8 created
zfssnapshot.zfs.openebs.io/snapshot-dc61a056-f495-482b-8e6e-e7ddc4c13f47 created
zfssnapshot.zfs.openebs.io/snapshot-f9db91ea-529e-4dac-b2b8-ead045c612da created
  1. upgrade the driver to v0.6 (tag to be created)
$ kubectl apply -f https://github.com/openebs/zfs-localpv/blob/v0.6.x/deploy/zfs-operator.yaml

Check everything is good. Then run

  1. run cleanup.sh
$ sh upgrade/cleanup.sh
Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
zfsvolume.openebs.io/pvc-086a8608-9057-42df-b684-ee4ae8d35f71 configured
Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
zfsvolume.openebs.io/pvc-5286d646-c93d-4413-9707-fd95ebaae8c0 configured
Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
zfsvolume.openebs.io/pvc-74abefb8-8423-4b13-a607-7184ef088fb5 configured
Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
  svolume.openebs.io/pvc-82368c44-eee8-47ee-85a6-633a8023faa8 configured
zfsvolume.openebs.io "pvc-086a8608-9057-42df-b684-ee4ae8d35f71" deleted
zfsvolume.openebs.io "pvc-5286d646-c93d-4413-9707-fd95ebaae8c0" deleted
zfsvolume.openebs.io "pvc-74abefb8-8423-4b13-a607-7184ef088fb5" deleted
zfsvolume.openebs.io "pvc-82368c44-eee8-47ee-85a6-633a8023faa8" deleted
customresourcedefinition.apiextensions.k8s.io "zfsvolumes.openebs.io" deleted
Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
zfssnapshot.openebs.io/snapshot-dc61a056-f495-482b-8e6e-e7ddc4c13f47 configured
Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
zfssnapshot.openebs.io/snapshot-f9db91ea-529e-4dac-b2b8-ead045c612da configured
zfssnapshot.openebs.io "snapshot-dc61a056-f495-482b-8e6e-e7ddc4c13f47" deleted
zfssnapshot.openebs.io "snapshot-f9db91ea-529e-4dac-b2b8-ead045c612da" deleted
customresourcedefinition.apiextensions.k8s.io "zfssnapshots.openebs.io" deleted

Signed-off-by: Pawan pawan@mayadata.io

@pawanpraka1 pawanpraka1 added enhancement New feature or request pr/hold-merge hold the merge. labels Mar 27, 2020
@pawanpraka1 pawanpraka1 added this to the v0.6.0 milestone Mar 27, 2020
@pawanpraka1 pawanpraka1 requested a review from kmova March 27, 2020 14:20
@codecov-io
Copy link

codecov-io commented Mar 27, 2020

Codecov Report

Merging #73 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #73   +/-   ##
=======================================
  Coverage   23.57%   23.57%           
=======================================
  Files          14       14           
  Lines         475      475           
=======================================
  Hits          112      112           
  Misses        362      362           
  Partials        1        1           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27517c6...63da94f. Read the comment docs.

@kmova
Copy link
Member

kmova commented Mar 28, 2020

Will take this up after the #70 has been merged.

steps to upgrade :-

1. apply the crd yaml

$ kubectl apply -f upgrade/crd.yaml

2. run upgrade.sh

$ upgrade/upgrade.sh

3. upgrade the driver to v0.6

$ kubectl apply -f https://github.com/openebs/zfs-localpv/blob/v0.6.x/deploy/zfs-operator.yaml

4. if everything looks good run the cleanup.sh, it will clean old CRs and delete the CRD

$ upgrade/cleanup.sh

Signed-off-by: Pawan <pawan@mayadata.io>
Signed-off-by: Pawan <pawan@mayadata.io>
@kmova kmova requested a review from w3aman March 30, 2020 17:22
@pawanpraka1 pawanpraka1 added this to In progress in ZFS Local PV Mar 31, 2020
@pawanpraka1 pawanpraka1 added this to Pre-commits and Designs - Due: Mar 31st 2020 in 1.9 Release Tracker - Due Apr 15th. Mar 31, 2020
@pawanpraka1 pawanpraka1 removed the pr/hold-review hold the review. label Apr 1, 2020
Copy link
Member

@shubham14bajpai shubham14bajpai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kmova kmova merged commit 8a9ac43 into openebs:master Apr 1, 2020
ZFS Local PV automation moved this from In progress to Done Apr 1, 2020
1.9 Release Tracker - Due Apr 15th. automation moved this from Pre-commits and Designs - Due: Mar 31st 2020 to Done Apr 1, 2020
@pawanpraka1 pawanpraka1 deleted the upgrade branch April 1, 2020 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
ZFS Local PV
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants