Use HPA permissions to read custom metrics in Custom Metrics e2e test

This commit is contained in:
Karol Wychowaniec
2017-11-10 14:15:41 +01:00
parent 7c04a684ae
commit 770dacde45
3 changed files with 24 additions and 0 deletions

View File

@@ -104,6 +104,9 @@ 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{})
// Run application that exports the metric
err = createSDExporterPods(f, kubeClient)
if err != nil {