Skip to content

Commit

Permalink
Adds Update Verb to Gateway RBAC
Browse files Browse the repository at this point in the history
Signed-off-by: Daneyon Hansen <daneyonhansen@gmail.com>
  • Loading branch information
danehans committed Jun 15, 2021
1 parent eafb94c commit 6b45a4e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 6 deletions.
10 changes: 9 additions & 1 deletion examples/contour/02-role-contour.yaml
Expand Up @@ -84,7 +84,6 @@ rules:
resources:
- backendpolicies
- gatewayclasses
- gateways
- httproutes
- tcproutes
- tlsroutes
Expand All @@ -105,6 +104,15 @@ rules:
- udproutes/status
verbs:
- update
- apiGroups:
- networking.x-k8s.io
resources:
- gateways
verbs:
- get
- list
- update
- watch
- apiGroups:
- projectcontour.io
resources:
Expand Down
4 changes: 2 additions & 2 deletions examples/gateway/02-gateway.yaml
Expand Up @@ -4,12 +4,12 @@ metadata:
name: contour
namespace: projectcontour
spec:
gatewayClassName: example
gatewayClassName: contour-class
listeners:
- protocol: HTTP
port: 80
routes:
kind: HTTPRoute
selector:
matchLabels:
app: kuard
app: filter
10 changes: 9 additions & 1 deletion examples/render/contour-gateway.yaml
Expand Up @@ -2830,7 +2830,6 @@ rules:
resources:
- backendpolicies
- gatewayclasses
- gateways
- httproutes
- tcproutes
- tlsroutes
Expand All @@ -2851,6 +2850,15 @@ rules:
- udproutes/status
verbs:
- update
- apiGroups:
- networking.x-k8s.io
resources:
- gateways
verbs:
- get
- list
- update
- watch
- apiGroups:
- projectcontour.io
resources:
Expand Down
10 changes: 9 additions & 1 deletion examples/render/contour.yaml
Expand Up @@ -2827,7 +2827,6 @@ rules:
resources:
- backendpolicies
- gatewayclasses
- gateways
- httproutes
- tcproutes
- tlsroutes
Expand All @@ -2848,6 +2847,15 @@ rules:
- udproutes/status
verbs:
- update
- apiGroups:
- networking.x-k8s.io
resources:
- gateways
verbs:
- get
- list
- update
- watch
- apiGroups:
- projectcontour.io
resources:
Expand Down
3 changes: 2 additions & 1 deletion internal/k8s/informers.go
Expand Up @@ -48,7 +48,8 @@ func IngressV1Resources() []schema.GroupVersionResource {
}
}

// +kubebuilder:rbac:groups="networking.x-k8s.io",resources=gatewayclasses;gateways;httproutes;backendpolicies;tlsroutes;tcproutes;udproutes,verbs=get;list;watch
// +kubebuilder:rbac:groups="networking.x-k8s.io",resources=gateways,verbs=get;list;watch;update
// +kubebuilder:rbac:groups="networking.x-k8s.io",resources=gatewayclasses;httproutes;backendpolicies;tlsroutes;tcproutes;udproutes,verbs=get;list;watch
// +kubebuilder:rbac:groups="networking.x-k8s.io",resources=gatewayclasses/status;gateways/status;httproutes/status;backendpolicies/status;tlsroutes/status;tcproutes/status;udproutes/status,verbs=update

// GatewayAPIResources returns a list of Gateway API group/version resources.
Expand Down

0 comments on commit 6b45a4e

Please sign in to comment.