From 60fcea24892573f8acade553c617f2d3957dbe19 Mon Sep 17 00:00:00 2001 From: Daniel Lipovetsky Date: Fri, 6 Oct 2023 16:14:27 -0700 Subject: [PATCH] clusterapi: Add 'watch' verb to scale-from-zero example If the 'get' and 'list' verbs are present, but the 'watch' verb is absent, the autoscaler reports an error. For example: cluster-autoscaler-b8949d8b9-76vcd E1006 22:11:43.056176 1 reflector.go:148] k8s.io/client-go/dynamic/dynamicinformer/informer.go:108: Failed to watch infrastructure.cluster.x-k8s.io/v1beta2, Resource=vcdmachinetemplates: unknown --- cluster-autoscaler/cloudprovider/clusterapi/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cluster-autoscaler/cloudprovider/clusterapi/README.md b/cluster-autoscaler/cloudprovider/clusterapi/README.md index d68e4b2ddaf8..ba4a62660d68 100644 --- a/cluster-autoscaler/cloudprovider/clusterapi/README.md +++ b/cluster-autoscaler/cloudprovider/clusterapi/README.md @@ -239,8 +239,8 @@ If you are using the opt-in support for scaling from zero as defined by the Cluster API infrastructure provider, you will need to add the infrastructure machine template types to your role permissions for the service account associated with the cluster autoscaler deployment. The service account will -need permission to `get` and `list` the infrastructure machine templates for -your infrastructure provider. +need permission to `get`, `list`, and `watch` the infrastructure machine +templates for your infrastructure provider. For example, when using the [Kubemark provider](https://github.com/kubernetes-sigs/cluster-api-provider-kubemark) you will need to set the following permissions: @@ -254,6 +254,7 @@ rules: verbs: - get - list + - watch ``` #### Pre-defined labels and taints on nodes scaled from zero