Merge pull request #56654 from supereagle/rbac-client-with-version

Automatic merge from submit-queue (batch tested with PRs 56828, 55184, 56849, 57081, 56654). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use rbac client with explicit version

**What this PR does / why we need it**:
Rbac client without explicit version has been deprecated, change them to the one with explicit version.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes partially #55993

**Special notes for your reviewer**:
/cc @caesarxuchao @sttts

This is the cleanup for the last client. Hope there is detailed plan to remove these deprecated clients.

**Release note**:
```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-12-16 17:45:49 -08:00 committed by GitHub
commit 3afff0a2a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,8 +104,8 @@ func testAdapter(f *framework.Framework, kubeClient clientset.Interface, customM
}
defer CleanupAdapter()
_, err = kubeClient.Rbac().ClusterRoleBindings().Create(HPAPermissions)
defer kubeClient.Rbac().ClusterRoleBindings().Delete("custom-metrics-reader", &metav1.DeleteOptions{})
_, err = kubeClient.RbacV1().ClusterRoleBindings().Create(HPAPermissions)
defer kubeClient.RbacV1().ClusterRoleBindings().Delete("custom-metrics-reader", &metav1.DeleteOptions{})
// Run application that exports the metric
err = createSDExporterPods(f, kubeClient)