Skip to content

Commit 41da5d6

Browse files
author
Richard Kovacs
committed
Workarounds to pass e2e tests
1 parent 968257f commit 41da5d6

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

deploy/ccm-linode-template.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ metadata:
2222
rules:
2323
- apiGroups: [""]
2424
resources: ["endpoints"]
25-
verbs: ["get", "watch", "list", "update", "create"]
25+
verbs: ["get"]
2626
- apiGroups: [""]
2727
resources: ["nodes"]
2828
verbs: ["get", "watch", "list", "update", "delete", "patch"]
@@ -44,6 +44,9 @@ rules:
4444
- apiGroups: [""]
4545
resources: ["services/status"]
4646
verbs: ["get", "watch", "list", "update", "patch"]
47+
- apiGroups: ["coordination.k8s.io"]
48+
resources: ["leases"]
49+
verbs: ["get", "watch", "list", "update", "create"]
4750
---
4851
kind: ClusterRoleBinding
4952
apiVersion: rbac.authorization.k8s.io/v1
@@ -101,9 +104,8 @@ spec:
101104
imagePullPolicy: Always
102105
name: ccm-linode
103106
args:
104-
- --leader-elect-resource-lock=endpoints
107+
- --leader-elect-resource-lock=leases
105108
- --v=3
106-
- --port=0
107109
- --secure-port=10253
108110
volumeMounts:
109111
- mountPath: /etc/kubernetes

deploy/chart/templates/clusterrole-rbac.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
rules:
66
- apiGroups: [""]
77
resources: ["endpoints"]
8-
verbs: ["get", "watch", "list", "update", "create"]
8+
verbs: ["get"]
99
- apiGroups: ["coordination.k8s.io"]
1010
resources: ["leases"]
1111
verbs: ["get", "watch", "list", "update", "create"]
@@ -30,3 +30,6 @@ rules:
3030
- apiGroups: [""]
3131
resources: ["services/status"]
3232
verbs: ["get", "watch", "list", "update", "patch"]
33+
- apiGroups: ["coordination.k8s.io"]
34+
resources: ["leases"]
35+
verbs: ["get", "watch", "list", "update", "create"]

e2e/test/ccm_e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ var _ = Describe("e2e tests", func() {
6161
f = root.Invoke()
6262
workers, err = f.GetWorkerNodeList()
6363
Expect(err).NotTo(HaveOccurred())
64-
Expect(len(workers)).Should(BeNumerically(">=", 2))
64+
Expect(workers).Should(HaveLen(2))
6565
})
6666

6767
createPodWithLabel := func(pods []string, ports []core.ContainerPort, image string, labels map[string]string, selectNode bool) {

0 commit comments

Comments
 (0)