From f3b870400d53d80a28c3166f790b94456edd0b31 Mon Sep 17 00:00:00 2001 From: Matt Matejczyk Date: Mon, 2 Sep 2019 13:52:10 +0200 Subject: [PATCH] Allow typha-cpa to get apps/deployments Without this it fails after deployments were switched from extensions to apps with ``` E0902 11:25:51.197420 1 reflector.go:283] github.com/kubernetes-incubator/cluster-proportional-autoscaler/pkg/autoscaler/k8sclient/k8sclient.go:96: Failed to watch *v1.Node: unknown (get nodes) E0902 11:25:53.118490 1 reflector.go:283] github.com/kubernetes-incubator/cluster-proportional-autoscaler/pkg/autoscaler/k8sclient/k8sclient.go:96: Failed to watch *v1.Node: unknown (get nodes) E0902 11:25:54.997493 1 reflector.go:283] github.com/kubernetes-incubator/cluster-proportional-autoscaler/pkg/autoscaler/k8sclient/k8sclient.go:96: Failed to watch *v1.Node: unknown (get nodes) E0902 11:25:57.097423 1 reflector.go:283] github.com/kubernetes-incubator/cluster-proportional-autoscaler/pkg/autoscaler/k8sclient/k8sclient.go:96: Failed to watch *v1.Node: unknown (get nodes) E0902 11:25:59.097417 1 reflector.go:283] github.com/kubernetes-incubator/cluster-proportional-autoscaler/pkg/autoscaler/k8sclient/k8sclient.go:96: Failed to watch *v1.Node: unknown (get nodes) I0902 11:25:59.697325 1 k8sclient.go:221] Falling back to extensions/v1beta1, error using apps/v1: deployments.apps "calico-typha" is forbidden: User "system:serviceaccount:kube-system:typha-cpha" cannot get resource "deployments/scale" in API group "apps" in the namespace "kube-system" E0902 11:25:59.699833 1 autoscaler_server.go:120] Update failure: the server could not find the requested resource ``` Ref. https://github.com/kubernetes/test-infra/pull/13709 --- .../typha-horizontal-autoscaler-role.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-role.yaml b/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-role.yaml index c605313fbb3..609fa774349 100644 --- a/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-role.yaml +++ b/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-role.yaml @@ -10,6 +10,6 @@ rules: - apiGroups: [""] resources: ["configmaps"] verbs: ["get"] - - apiGroups: ["extensions"] + - apiGroups: ["apps", "extensions"] resources: ["deployments/scale"] verbs: ["get", "update"]