Skip to content

Commit 123328c

Browse files
authored
fix: missing list and watch RBAC of unstructured objects (#170)
* fix(rbac): missing marker for cached unstructured Signed-off-by: Dario Tranchitella <[email protected]> * fix(rbac): missing watch and get for unstructured objects Signed-off-by: Dario Tranchitella <[email protected]> --------- Signed-off-by: Dario Tranchitella <[email protected]>
1 parent e60d06a commit 123328c

File tree

3 files changed

+7
-19
lines changed

3 files changed

+7
-19
lines changed

config/control-plane-components.yaml

+3-9
Original file line numberDiff line numberDiff line change
@@ -13345,6 +13345,9 @@ rules:
1334513345
- nutanixclusters
1334613346
- openstackclusters
1334713347
- packetclusters
13348+
- proxmoxclusters
13349+
- tinkerbellclusters
13350+
- vsphereclusters
1334813351
verbs:
1334913352
- get
1335013353
- list
@@ -13364,15 +13367,6 @@ rules:
1336413367
- metal3clusters
1336513368
verbs:
1336613369
- get
13367-
- apiGroups:
13368-
- infrastructure.cluster.x-k8s.io
13369-
resources:
13370-
- proxmoxclusters
13371-
- tinkerbellclusters
13372-
- vsphereclusters
13373-
verbs:
13374-
- get
13375-
- patch
1337613370
- apiGroups:
1337713371
- kamaji.clastix.io
1337813372
resources:

config/rbac/role.yaml

+3-9
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ rules:
6060
- nutanixclusters
6161
- openstackclusters
6262
- packetclusters
63+
- proxmoxclusters
64+
- tinkerbellclusters
65+
- vsphereclusters
6366
verbs:
6467
- get
6568
- list
@@ -79,15 +82,6 @@ rules:
7982
- metal3clusters
8083
verbs:
8184
- get
82-
- apiGroups:
83-
- infrastructure.cluster.x-k8s.io
84-
resources:
85-
- proxmoxclusters
86-
- tinkerbellclusters
87-
- vsphereclusters
88-
verbs:
89-
- get
90-
- patch
9185
- apiGroups:
9286
- kamaji.clastix.io
9387
resources:

controllers/kamajicontrolplane_controller_cluster_patch.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (r *KamajiControlPlaneReconciler) patchCluster(ctx context.Context, cluster
118118
}
119119
}
120120

121-
//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=proxmoxclusters;vsphereclusters;tinkerbellclusters,verbs=get
121+
//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=proxmoxclusters;vsphereclusters;tinkerbellclusters,verbs=get;list;watch
122122
//+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=proxmoxclusters;vsphereclusters;tinkerbellclusters,verbs=patch
123123

124124
func (r *KamajiControlPlaneReconciler) checkOrPatchGenericCluster(ctx context.Context, cluster capiv1beta1.Cluster, endpoint string, port int64) error {

0 commit comments

Comments
 (0)