From 6b6ed53db8b70645b275c8d61ce8bb987f83bb30 Mon Sep 17 00:00:00 2001 From: ChengXiangdong Date: Thu, 5 Jan 2023 17:48:03 +0800 Subject: [PATCH] add serviceaccounts/token resources to system:cloud-controller-manager --- hack/pre-run-e2e.sh | 6 ++++++ manifests/rbac-huawei-cloud-controller-manager.yaml | 1 + 2 files changed, 7 insertions(+) diff --git a/hack/pre-run-e2e.sh b/hack/pre-run-e2e.sh index f862b58e3..b83761eed 100755 --- a/hack/pre-run-e2e.sh +++ b/hack/pre-run-e2e.sh @@ -37,6 +37,11 @@ kubectl delete -n kube-system deployment --ignore-not-found=true huawei-cloud-co echo -e "\nDeploy huawei-cloud-controller-manager" cat << EOF | kubectl apply -f - +apiVersion: v1 +kind: Namespace +metadata: + name: huawei-cloud-provider +--- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -60,6 +65,7 @@ rules: - services - secrets - serviceaccounts + - serviceaccounts/token verbs: - get - list diff --git a/manifests/rbac-huawei-cloud-controller-manager.yaml b/manifests/rbac-huawei-cloud-controller-manager.yaml index 99d26788d..959923f1b 100644 --- a/manifests/rbac-huawei-cloud-controller-manager.yaml +++ b/manifests/rbac-huawei-cloud-controller-manager.yaml @@ -21,6 +21,7 @@ rules: - services - secrets - serviceaccounts + - serviceaccounts/token verbs: - get - list