Skip to content

Commit 19bdb32

Browse files
authored
fix: grant namespace access for backup deletion guard (#10347)
1 parent 7cc649b commit 19bdb32

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

config/rbac/role.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ rules:
4242
- list
4343
- patch
4444
- watch
45+
- apiGroups:
46+
- ""
47+
resources:
48+
- namespaces
49+
verbs:
50+
- get
51+
- list
52+
- watch
4553
- apiGroups:
4654
- ""
4755
resources:

controllers/dataprotection/backup_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ type BackupReconciler struct {
7979
// +kubebuilder:rbac:groups=snapshot.storage.k8s.io,resources=volumesnapshots/finalizers,verbs=update;patch
8080
// +kubebuilder:rbac:groups=snapshot.storage.k8s.io,resources=volumesnapshotclasses,verbs=get;list;watch
8181

82+
// +kubebuilder:rbac:groups=core,resources=namespaces,verbs=get;list;watch
8283
// +kubebuilder:rbac:groups=core,resources=serviceaccounts,verbs=get;list;watch;create;update;patch;delete
8384
// +kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=rolebindings,verbs=get;list;watch;create;update;patch;delete
8485

deploy/helm/config/rbac/role.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ rules:
4242
- list
4343
- patch
4444
- watch
45+
- apiGroups:
46+
- ""
47+
resources:
48+
- namespaces
49+
verbs:
50+
- get
51+
- list
52+
- watch
4553
- apiGroups:
4654
- ""
4755
resources:

0 commit comments

Comments
 (0)