Skip to content

Commit d1016f1

Browse files
committed
Add RBAC rules for namespaces
1 parent 2cadbfa commit d1016f1

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

config/rbac/role.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ metadata:
55
creationTimestamp: null
66
name: appuio-cloud-agent
77
rules:
8+
- apiGroups:
9+
- ""
10+
resources:
11+
- namespaces
12+
verbs:
13+
- get
14+
- list
15+
- watch
816
- apiGroups:
917
- ""
1018
resources:

webhooks/ratio_validator.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
)
2121

2222
// +kubebuilder:rbac:groups="",resources=pods,verbs=get;list;watch
23+
// +kubebuilder:rbac:groups="",resources=namespaces,verbs=get;list;watch
2324

2425
// RatioValidator checks for every action in a namespace whether the Memory to CPU ratio limit is exceeded and will return a warning if it is.
2526
type RatioValidator struct {

0 commit comments

Comments
 (0)