Skip to content

Commit

Permalink
Merge pull request #39 from Yuggupta27/add-intree
Browse files Browse the repository at this point in the history
Add support for Intree driver migration
  • Loading branch information
Yuggupta27 authored Feb 3, 2022
2 parents ea23f7c + 1b299c7 commit f2f8788
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifests/migrator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ spec:
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: rook-ceph-migrator
image: rook/ceph:v1.7.8
image: rook/ceph:v1.7.11
command: ["/tini"]
args: ["-g", "--", "/usr/local/bin/toolbox.sh"]
imagePullPolicy: IfNotPresent
Expand Down
10 changes: 8 additions & 2 deletions pkg/k8sutil/pv.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,14 @@ func UpdateReclaimPolicy(client *k8s.Clientset, pv *corev1.PersistentVolume) err
}

func GetVolumeName(pv *corev1.PersistentVolume) string {
// Rook creates rbd image with PV name
return pv.Name
// check if Volume is provisioned by FlexVolume Driver.
if pv.Spec.FlexVolume != nil {
// In case of FlexVolume driver, rbd image is created with the PV name.
return pv.Name
}
// else in the case of volume provisioned by the intree driver,
// return the imagename from the spec.
return pv.Spec.RBD.RBDImage
}

func WaitForRBDImage(pv *corev1.PersistentVolume) string {
Expand Down

0 comments on commit f2f8788

Please sign in to comment.