Skip to content

Commit

Permalink
chore: namespace RBACs added
Browse files Browse the repository at this point in the history
The RBACs have been updated with grants to watch, list, and get
namespaces.

Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
  • Loading branch information
mlavacca committed Jul 7, 2023
1 parent 2338e85 commit 2b13580
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/rbac/gateway/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ kind: ClusterRole
metadata:
name: kong-ingress-gateway
rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
8 changes: 8 additions & 0 deletions deploy/single/all-in-one-dbless-enterprise.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,14 @@ kind: ClusterRole
metadata:
name: kong-ingress-gateway
rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
8 changes: 8 additions & 0 deletions deploy/single/all-in-one-dbless-k4k8s-enterprise.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,14 @@ kind: ClusterRole
metadata:
name: kong-ingress-gateway
rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
8 changes: 8 additions & 0 deletions deploy/single/all-in-one-dbless-konnect-enterprise.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,14 @@ kind: ClusterRole
metadata:
name: kong-ingress-gateway
rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
8 changes: 8 additions & 0 deletions deploy/single/all-in-one-dbless-konnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,14 @@ kind: ClusterRole
metadata:
name: kong-ingress-gateway
rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
8 changes: 8 additions & 0 deletions deploy/single/all-in-one-dbless-legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,14 @@ kind: ClusterRole
metadata:
name: kong-ingress-gateway
rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
8 changes: 8 additions & 0 deletions deploy/single/all-in-one-dbless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,14 @@ kind: ClusterRole
metadata:
name: kong-ingress-gateway
rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
8 changes: 8 additions & 0 deletions deploy/single/all-in-one-postgres-enterprise.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,14 @@ kind: ClusterRole
metadata:
name: kong-ingress-gateway
rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
8 changes: 8 additions & 0 deletions deploy/single/all-in-one-postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,14 @@ kind: ClusterRole
metadata:
name: kong-ingress-gateway
rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
1 change: 1 addition & 0 deletions internal/controllers/gateway/httproute_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ func (r *HTTPRouteReconciler) listHTTPRoutesForGateway(ctx context.Context, obj

// +kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=httproutes,verbs=get;list;watch
// +kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=httproutes/status,verbs=get;update
// +kubebuilder:rbac:groups="",resources=namespaces,verbs=list;watch;get

// Reconcile is part of the main kubernetes reconciliation loop which aims to
// move the current state of the cluster closer to the desired state.
Expand Down

0 comments on commit 2b13580

Please sign in to comment.