Commit 573fafbc authored by NickrenREN's avatar NickrenREN

Using BetaStorageClassAnnotation to avoid hardcode

parent e18843d3
...@@ -203,7 +203,7 @@ func getVSphereStorageClassSpec(name string, scParameters map[string]string) *st ...@@ -203,7 +203,7 @@ func getVSphereStorageClassSpec(name string, scParameters map[string]string) *st
func getVSphereClaimSpecWithStorageClassAnnotation(ns string, storageclass *storage.StorageClass) *v1.PersistentVolumeClaim { func getVSphereClaimSpecWithStorageClassAnnotation(ns string, storageclass *storage.StorageClass) *v1.PersistentVolumeClaim {
scAnnotation := make(map[string]string) scAnnotation := make(map[string]string)
scAnnotation["volume.beta.kubernetes.io/storage-class"] = storageclass.Name scAnnotation[v1.BetaStorageClassAnnotation] = storageclass.Name
claim := &v1.PersistentVolumeClaim{ claim := &v1.PersistentVolumeClaim{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment