Skip to content

Commit f90f518

Browse files
committed
fix: r
Signed-off-by: Ashing Zheng <[email protected]>
1 parent 34b13bc commit f90f518

File tree

4 files changed

+23
-8
lines changed

4 files changed

+23
-8
lines changed

config/rbac/role.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,7 @@ rules:
77
- apiGroups:
88
- ""
99
resources:
10-
- events
11-
verbs:
12-
- create
13-
- patch
14-
- apiGroups:
15-
- ""
16-
resources:
10+
- endpoints
1711
- namespaces
1812
- pods
1913
- secrets
@@ -22,6 +16,13 @@ rules:
2216
- get
2317
- list
2418
- watch
19+
- apiGroups:
20+
- ""
21+
resources:
22+
- events
23+
verbs:
24+
- create
25+
- patch
2526
- apiGroups:
2627
- apisix.apache.org
2728
resources:

internal/manager/controllers.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ import (
4848
// +kubebuilder:rbac:groups="",resources=pods,verbs=get;list;watch
4949
// +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch
5050
// +kubebuilder:rbac:groups="",resources=namespaces,verbs=get;list;watch
51+
// +kubebuilder:rbac:groups="",resources=endpoints,verbs=get;list;watch
5152

5253
// CustomResourceDefinition v2
5354
// +kubebuilder:rbac:groups=apisix.apache.org,resources=apisixconsumers,verbs=get;list;watch

test/e2e/crds/v2/route.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@ spec:
9292
By("update ApisixRoute")
9393
applier.MustApplyAPIv2(types.NamespacedName{Namespace: s.Namespace(), Name: "default"}, &apisixRoute, fmt.Sprintf(apisixRouteSpec, "/headers"))
9494
Eventually(request).WithArguments("/get").WithTimeout(8 * time.Second).ProbeEvery(time.Second).Should(Equal(http.StatusNotFound))
95-
s.NewAPISIXClient().GET("/headers").WithHost("httpbin").Expect().Status(http.StatusOK)
95+
s.RequestAssert(&scaffold.RequestAssert{
96+
Method: "GET",
97+
Path: "/headers",
98+
Host: "httpbin",
99+
Check: scaffold.WithExpectedStatus(http.StatusOK),
100+
})
96101

97102
By("delete ApisixRoute")
98103
err := s.DeleteResource("ApisixRoute", "default")

test/e2e/framework/manifests/ingress.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ rules:
8585
- get
8686
- list
8787
- watch
88+
- apiGroups:
89+
- ""
90+
resources:
91+
- endpoints
92+
verbs:
93+
- get
94+
- list
95+
- watch
8896
- apiGroups:
8997
- ""
9098
resources:

0 commit comments

Comments
 (0)