Move PV/PVC annotations to PV/PVC types.

They aren't part of storage.k8s.io/v1 or v1beta1 API.
Also move associated *GetClass functions.
This commit is contained in:
Jan Safranek
2017-03-02 10:23:55 +01:00
parent c535c3e20b
commit 7ae4152712
26 changed files with 194 additions and 362 deletions

View File

@@ -28,7 +28,7 @@ import (
"k8s.io/apimachinery/pkg/util/validation/field"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/service"
storageutil "k8s.io/kubernetes/pkg/apis/storage/util"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/capabilities"
"k8s.io/kubernetes/pkg/security/apparmor"
"k8s.io/kubernetes/pkg/volume"
@@ -253,7 +253,7 @@ func testVolumeClaim(name string, namespace string, spec api.PersistentVolumeCla
func testVolumeClaimStorageClass(name string, namespace string, annval string, spec api.PersistentVolumeClaimSpec) *api.PersistentVolumeClaim {
annotations := map[string]string{
storageutil.StorageClassAnnotation: annval,
v1.BetaStorageClassAnnotation: annval,
}
return &api.PersistentVolumeClaim{