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

fix(upgrade,cstorvolume): use cas-type labels instead of annotation #2582

Merged
merged 1 commit into from
May 20, 2019

Conversation

prateekpandey14
Copy link
Contributor

@prateekpandey14 prateekpandey14 commented May 20, 2019

Signed-off-by: prateekpandey14 prateek.pandey@openebs.io

Use labels cast-type label instead cast-type annotation , as Clone PV object doesn't have the cas-type as annotation . And its better idea to use labels instead of annotations.

  1. Clone PV:
 kubectl get pv pvc-f00c2ad8-9760-4ec6-8420-c9a55aae48d3 -oyaml
apiVersion: v1
kind: PersistentVolume
metadata:
  annotations:
    pv.kubernetes.io/provisioned-by: volumesnapshot.external-storage.k8s.io/snapshot-promoter
    snapshotProvisionerIdentity: volumesnapshot.external-storage.k8s.io/snapshot-promoter
  creationTimestamp: "2019-05-20T13:09:24Z"
  finalizers:
  - kubernetes.io/pv-protection
  labels:
    openebs.io/cas-type: cstor
    openebs.io/storageclass: openebs-cstor-sparse-auto
  name: pvc-f00c2ad8-9760-4ec6-8420-c9a55aae48d3
  resourceVersion: "1643"
  selfLink: /api/v1/persistentvolumes/pvc-f00c2ad8-9760-4ec6-8420-c9a55aae48d3
  uid: ba8fdcc5-4f53-488c-a2fe-177d099b9414
  1. Simple PV:
kubectl get pv pvc-b146d13b-b2e7-4540-bcba-b47e0e4edda2 -oyaml
apiVersion: v1
kind: PersistentVolume
metadata:
  annotations:
    openEBSProvisionerIdentity: 127.0.0.1
    openebs.io/cas-type: cstor
    pv.kubernetes.io/provisioned-by: openebs.io/provisioner-iscsi
  creationTimestamp: "2019-05-20T13:05:00Z"
  finalizers:
  - kubernetes.io/pv-protection
  labels:
    openebs.io/cas-type: cstor
    openebs.io/storageclass: openebs-cstor-sparse-auto
  name: pvc-b146d13b-b2e7-4540-bcba-b47e0e4edda2
  resourceVersion: "1206"
  selfLink: /api/v1/persistentvolumes/pvc-b146d13b-b2e7-4540-bcba-b47e0e4edda2
  uid: 90aa4f16-b3bb-41b7-931e-8331b447e142

Signed-off-by: prateekpandey14 <prateek.pandey@openebs.io>
Copy link

@AmitKumarDas AmitKumarDas left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@AmitKumarDas AmitKumarDas merged commit f60fee3 into openebs:master May 20, 2019
@prateekpandey14 prateekpandey14 deleted the fix-cstorvolume branch May 20, 2019 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants