diff --git a/src/app/backend/integration/manager_test.go b/src/app/backend/integration/manager_test.go index 1027434aa061..4bb9dd580d16 100644 --- a/src/app/backend/integration/manager_test.go +++ b/src/app/backend/integration/manager_test.go @@ -58,7 +58,7 @@ func TestIntegrationManager_GetState(t *testing.T) { "Server provided and using in-cluster heapster", "http://127.0.0.1:8080", "", &api.IntegrationState{ Connected: false, - Error: errors.New("Get http://127.0.0.1:8080/api/v1/proxy/namespaces/kube-system/services/heapster/healthz: dial tcp 127.0.0.1:8080: getsockopt: connection refused"), + Error: errors.New("Get http://127.0.0.1:8080/api/v1/namespaces/kube-system/services/heapster/proxy/healthz: dial tcp 127.0.0.1:8080: getsockopt: connection refused"), }, nil, }, { diff --git a/src/app/backend/integration/metric/heapster/restclient.go b/src/app/backend/integration/metric/heapster/restclient.go index 00395c6ad7d3..9adc531f207b 100644 --- a/src/app/backend/integration/metric/heapster/restclient.go +++ b/src/app/backend/integration/metric/heapster/restclient.go @@ -42,20 +42,22 @@ type inClusterHeapsterClient struct { // Get creates request to given path. func (c inClusterHeapsterClient) Get(path string) RequestInterface { - return c.client.Get().Prefix("proxy"). + return c.client.Get(). Namespace("kube-system"). Resource("services"). Name("heapster"). + SubResource("proxy"). Suffix("/api/v1/" + path) } // HealthCheck does a health check of the application. // Returns nil if connection to application can be established, error object otherwise. func (self inClusterHeapsterClient) HealthCheck() error { - _, err := self.client.Get().Prefix("proxy"). + _, err := self.client.Get(). Namespace("kube-system"). Resource("services"). Name("heapster"). + SubResource("proxy"). Suffix("/healthz"). DoRaw() return err diff --git a/src/deploy/alternative/kubernetes-dashboard-arm-head.yaml b/src/deploy/alternative/kubernetes-dashboard-arm-head.yaml index 2b59c20de921..0b74118bb487 100755 --- a/src/deploy/alternative/kubernetes-dashboard-arm-head.yaml +++ b/src/deploy/alternative/kubernetes-dashboard-arm-head.yaml @@ -56,6 +56,10 @@ rules: resources: ["services"] resourceNames: ["heapster"] verbs: ["proxy"] +- apiGroups: [""] + resources: ["services/proxy"] + resourceNames: ["heapster", "http:heapster:", "https:heapster:"] + verbs: ["get"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding diff --git a/src/deploy/alternative/kubernetes-dashboard-arm.yaml b/src/deploy/alternative/kubernetes-dashboard-arm.yaml index 2c8cb1a09c27..55e0e18d42a8 100644 --- a/src/deploy/alternative/kubernetes-dashboard-arm.yaml +++ b/src/deploy/alternative/kubernetes-dashboard-arm.yaml @@ -56,6 +56,10 @@ rules: resources: ["services"] resourceNames: ["heapster"] verbs: ["proxy"] +- apiGroups: [""] + resources: ["services/proxy"] + resourceNames: ["heapster", "http:heapster:", "https:heapster:"] + verbs: ["get"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding diff --git a/src/deploy/alternative/kubernetes-dashboard-head.yaml b/src/deploy/alternative/kubernetes-dashboard-head.yaml index 43381e3ad0dc..c6e16d6b4559 100755 --- a/src/deploy/alternative/kubernetes-dashboard-head.yaml +++ b/src/deploy/alternative/kubernetes-dashboard-head.yaml @@ -56,6 +56,10 @@ rules: resources: ["services"] resourceNames: ["heapster"] verbs: ["proxy"] +- apiGroups: [""] + resources: ["services/proxy"] + resourceNames: ["heapster", "http:heapster:", "https:heapster:"] + verbs: ["get"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding diff --git a/src/deploy/alternative/kubernetes-dashboard.yaml b/src/deploy/alternative/kubernetes-dashboard.yaml index 5a50fa254d63..154f19189861 100644 --- a/src/deploy/alternative/kubernetes-dashboard.yaml +++ b/src/deploy/alternative/kubernetes-dashboard.yaml @@ -56,6 +56,10 @@ rules: resources: ["services"] resourceNames: ["heapster"] verbs: ["proxy"] +- apiGroups: [""] + resources: ["services/proxy"] + resourceNames: ["heapster", "http:heapster:", "https:heapster:"] + verbs: ["get"] --- apiVersion: rbac.authorization.k8s.io/v1 diff --git a/src/deploy/recommended/kubernetes-dashboard-arm-head.yaml b/src/deploy/recommended/kubernetes-dashboard-arm-head.yaml index b27d66a7659c..7bc4ffba14f4 100755 --- a/src/deploy/recommended/kubernetes-dashboard-arm-head.yaml +++ b/src/deploy/recommended/kubernetes-dashboard-arm-head.yaml @@ -67,6 +67,10 @@ rules: resources: ["services"] resourceNames: ["heapster"] verbs: ["proxy"] +- apiGroups: [""] + resources: ["services/proxy"] + resourceNames: ["heapster", "http:heapster:", "https:heapster:"] + verbs: ["get"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding diff --git a/src/deploy/recommended/kubernetes-dashboard-arm.yaml b/src/deploy/recommended/kubernetes-dashboard-arm.yaml index d8caac435b4f..2217b8801dff 100644 --- a/src/deploy/recommended/kubernetes-dashboard-arm.yaml +++ b/src/deploy/recommended/kubernetes-dashboard-arm.yaml @@ -67,6 +67,10 @@ rules: resources: ["services"] resourceNames: ["heapster"] verbs: ["proxy"] +- apiGroups: [""] + resources: ["services/proxy"] + resourceNames: ["heapster", "http:heapster:", "https:heapster:"] + verbs: ["get"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding diff --git a/src/deploy/recommended/kubernetes-dashboard-head.yaml b/src/deploy/recommended/kubernetes-dashboard-head.yaml index 7630867d0496..b5b18e3d7352 100755 --- a/src/deploy/recommended/kubernetes-dashboard-head.yaml +++ b/src/deploy/recommended/kubernetes-dashboard-head.yaml @@ -67,6 +67,10 @@ rules: resources: ["services"] resourceNames: ["heapster"] verbs: ["proxy"] +- apiGroups: [""] + resources: ["services/proxy"] + resourceNames: ["heapster", "http:heapster:", "https:heapster:"] + verbs: ["get"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding diff --git a/src/deploy/recommended/kubernetes-dashboard.yaml b/src/deploy/recommended/kubernetes-dashboard.yaml index 2520ecd2f79d..8b07ebfdeee4 100644 --- a/src/deploy/recommended/kubernetes-dashboard.yaml +++ b/src/deploy/recommended/kubernetes-dashboard.yaml @@ -67,6 +67,10 @@ rules: resources: ["services"] resourceNames: ["heapster"] verbs: ["proxy"] +- apiGroups: [""] + resources: ["services/proxy"] + resourceNames: ["heapster", "http:heapster:", "https:heapster:"] + verbs: ["get"] --- apiVersion: rbac.authorization.k8s.io/v1