Skip to content

Commit 3d6a573

Browse files
Merge pull request #732 from stuggi/rbac-cleanup-pods
Remove unnecessary pods RBAC permissions
2 parents 2550ce5 + 2adbb94 commit 3d6a573

2 files changed

Lines changed: 0 additions & 7 deletions

File tree

config/rbac/role.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ rules:
88
- ""
99
resources:
1010
- configmaps
11-
- pods
1211
- secrets
1312
- services
1413
verbs:

internal/controller/keystoneapi_controller.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ type KeystoneAPIReconciler struct {
125125
// +kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=rolebindings,verbs=get;list;watch;create;update;patch
126126
// keystone service account permissions that are needed to grant permission to the above
127127
// +kubebuilder:rbac:groups="security.openshift.io",resourceNames=anyuid,resources=securitycontextconstraints,verbs=use
128-
// +kubebuilder:rbac:groups="",resources=pods,verbs=create;delete;get;list;patch;update;watch
129128

130129
// Reconcile reconcile keystone API requests
131130
func (r *KeystoneAPIReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error) {
@@ -549,11 +548,6 @@ func (r *KeystoneAPIReconciler) reconcileInit(
549548
Resources: []string{"securitycontextconstraints"},
550549
Verbs: []string{"use"},
551550
},
552-
{
553-
APIGroups: []string{""},
554-
Resources: []string{"pods"},
555-
Verbs: []string{"create", "get", "list", "watch", "update", "patch", "delete"},
556-
},
557551
}
558552
rbacResult, err := common_rbac.ReconcileRbac(ctx, helper, instance, rbacRules)
559553
if err != nil {

0 commit comments

Comments
 (0)