remove cloud provider dependencies to pkg/volume

Co-authored-by: Weibin Lin <linweibin1@huawei.com>
This commit is contained in:
Andrew Kim
2019-02-05 13:44:45 -05:00
parent fd633d192f
commit ca6a051b00
53 changed files with 2200 additions and 2227 deletions

View File

@@ -29,7 +29,7 @@ import (
sets "k8s.io/apimachinery/pkg/util/sets"
"k8s.io/client-go/kubernetes/fake"
core "k8s.io/client-go/testing"
volumeutil "k8s.io/kubernetes/pkg/volume/util"
volumehelpers "k8s.io/cloud-provider/volume/helpers"
fakecloud "k8s.io/kubernetes/pkg/cloudprovider/providers/fake"
)
@@ -368,7 +368,7 @@ func TestCreatePatch(t *testing.T) {
},
}
zones, _ := volumeutil.ZonesToSet("1,2,3")
zones, _ := volumehelpers.ZonesToSet("1,2,3")
testCases := map[string]struct {
vol v1.PersistentVolume
labels map[string]string
@@ -416,12 +416,12 @@ func TestCreatePatch(t *testing.T) {
},
"cloudprovider multizone": {
vol: awsPV,
labels: map[string]string{v1.LabelZoneFailureDomain: volumeutil.ZonesSetToLabelValue(zones)},
labels: map[string]string{v1.LabelZoneFailureDomain: volumehelpers.ZonesSetToLabelValue(zones)},
expectedAffinity: &expectedAffinityZonesMergedWithAWSPV,
},
"cloudprovider multizone pre-existing affinity non-conflicting": {
vol: awsPVWithAffinity,
labels: map[string]string{v1.LabelZoneFailureDomain: volumeutil.ZonesSetToLabelValue(zones)},
labels: map[string]string{v1.LabelZoneFailureDomain: volumehelpers.ZonesSetToLabelValue(zones)},
expectedAffinity: &expectedAffinityZonesMergedWithAWSPVWithAffinity,
},
}