fix static check failure in pkg/controller/disruption and pkg/controller/namespace/deletion

This commit is contained in:
yiyang5055
2020-01-20 09:10:46 +00:00
parent 3d8317ae91
commit 53aff819e0
3 changed files with 1 additions and 10 deletions

View File

@@ -162,7 +162,7 @@ func (d *namespacedResourcesDeleter) initOpCache() {
if len(resources) == 0 {
klog.Fatalf("Unable to get any supported resources from server: %v", err)
}
deletableGroupVersionResources := []schema.GroupVersionResource{}
for _, rl := range resources {
gv, err := schema.ParseGroupVersion(rl.GroupVersion)
if err != nil {
@@ -183,7 +183,6 @@ func (d *namespacedResourcesDeleter) initOpCache() {
d.opCache.setNotSupported(operationKey{operation: op, gvr: gvr})
}
}
deletableGroupVersionResources = append(deletableGroupVersionResources, gvr)
}
}
}