From dbbc66cdbd2fc306fba70c03a70e391bc97cbbcd Mon Sep 17 00:00:00 2001 From: Richard Kovacs Date: Thu, 11 Apr 2024 16:25:24 +0200 Subject: [PATCH] Workarounds to pass e2e tests --- deploy/ccm-linode-template.yaml | 8 +++++--- deploy/chart/templates/clusterrole-rbac.yaml | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/deploy/ccm-linode-template.yaml b/deploy/ccm-linode-template.yaml index 6d4c53ce..cc5570e4 100644 --- a/deploy/ccm-linode-template.yaml +++ b/deploy/ccm-linode-template.yaml @@ -22,7 +22,7 @@ metadata: rules: - apiGroups: [""] resources: ["endpoints"] - verbs: ["get", "watch", "list", "update", "create"] + verbs: ["get"] - apiGroups: [""] resources: ["nodes"] verbs: ["get", "watch", "list", "update", "delete", "patch"] @@ -44,6 +44,9 @@ rules: - apiGroups: [""] resources: ["services/status"] verbs: ["get", "watch", "list", "update", "patch"] +- apiGroups: ["coordination.k8s.io"] + resources: ["leases"] + verbs: ["get", "watch", "list", "update", "create"] --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 @@ -101,9 +104,8 @@ spec: imagePullPolicy: Always name: ccm-linode args: - - --leader-elect-resource-lock=endpoints + - --leader-elect-resource-lock=leases - --v=3 - - --port=0 - --secure-port=10253 volumeMounts: - mountPath: /etc/kubernetes diff --git a/deploy/chart/templates/clusterrole-rbac.yaml b/deploy/chart/templates/clusterrole-rbac.yaml index 3d18d68c..81520bbb 100644 --- a/deploy/chart/templates/clusterrole-rbac.yaml +++ b/deploy/chart/templates/clusterrole-rbac.yaml @@ -5,7 +5,7 @@ metadata: rules: - apiGroups: [""] resources: ["endpoints"] - verbs: ["get", "watch", "list", "update", "create"] + verbs: ["get"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] verbs: ["get", "watch", "list", "update", "create"] @@ -30,3 +30,6 @@ rules: - apiGroups: [""] resources: ["services/status"] verbs: ["get", "watch", "list", "update", "patch"] + - apiGroups: ["coordination.k8s.io"] + resources: ["leases"] + verbs: ["get", "watch", "list", "update", "create"]