Switch storage version to use v1.CSINode in 1.18

This commit is contained in:
Ted Yu 2019-11-25 19:14:09 -08:00
parent 6be19d85f2
commit 1cb3992d1b
2 changed files with 1 additions and 3 deletions

View File

@ -55,8 +55,6 @@ func NewStorageFactoryConfig() *StorageFactoryConfig {
resources := []schema.GroupVersionResource{
batch.Resource("cronjobs").WithVersion("v1beta1"),
networking.Resource("ingresses").WithVersion("v1beta1"),
// TODO #83513 csinodes override can be removed in 1.18
apisstorage.Resource("csinodes").WithVersion("v1beta1"),
apisstorage.Resource("csidrivers").WithVersion("v1beta1"),
}

View File

@ -550,13 +550,13 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
etcdStorageData[gvr("storage.k8s.io", "v1beta1", "csinodes")] = StorageData{
Stub: `{"metadata": {"name": "csini1"}, "spec": {"drivers": [{"name": "test-driver", "nodeID": "localhost", "topologyKeys": ["company.com/zone1", "company.com/zone2"]}]}}`,
ExpectedEtcdPath: "/registry/csinodes/csini1",
ExpectedGVK: gvkP("storage.k8s.io", "v1", "CSINode"),
}
// k8s.io/kubernetes/pkg/apis/storage/v1
etcdStorageData[gvr("storage.k8s.io", "v1", "csinodes")] = StorageData{
Stub: `{"metadata": {"name": "csini2"}, "spec": {"drivers": [{"name": "test-driver", "nodeID": "localhost", "topologyKeys": ["company.com/zone1", "company.com/zone2"]}]}}`,
ExpectedEtcdPath: "/registry/csinodes/csini2",
ExpectedGVK: gvkP("storage.k8s.io", "v1beta1", "CSINode"),
}
}