Skip to content

Remove unnecessary pods RBAC permissions - #682

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
stuggi:rbac-cleanup-pods
Jul 27, 2026
Merged

Remove unnecessary pods RBAC permissions#682
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
stuggi:rbac-cleanup-pods

Conversation

@stuggi

@stuggi stuggi commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Operators create Deployments/StatefulSets/Jobs to run workload pods but never manage Pod objects directly (get/list/watch/create/update/patch/delete). Drop the unused "pods" resource from the kubebuilder RBAC markers and the workload-facing ClusterRole rbacRules, and regenerate config/rbac/role.yaml accordingly.

@openshift-ci
openshift-ci Bot requested review from eharney and fmount July 24, 2026 13:42
@stuggi
stuggi force-pushed the rbac-cleanup-pods branch from d6d6ba3 to cde917b Compare July 24, 2026 13:53
@centosinfra-prod-github-app

Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/5d9fd1632e164572b3002cfb4a675460

openstack-k8s-operators-content-provider FAILURE in 15m 10s
⚠️ cinder-operator-kuttl SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cinder-operator-tempest SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@stuggi

stuggi commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

recheck

@centosinfra-prod-github-app

Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/efa6abeaa4714cab8ce71e63e74bb771

openstack-k8s-operators-content-provider FAILURE in 13m 33s
⚠️ cinder-operator-kuttl SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cinder-operator-tempest SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@abays abays left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci

openshift-ci Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abays, stuggi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@stuggi

stuggi commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

recheck

@centosinfra-prod-github-app

Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/5c2fff43c18241c4aecbcb462b72f911

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 18m 25s
✔️ cinder-operator-kuttl SUCCESS in 49m 34s
cinder-operator-tempest FAILURE in 1h 51m 29s

@stuggi

stuggi commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

recheck

@centosinfra-prod-github-app

Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/5a2d054d5c324fea863e7eb9ad49fa34

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 18m 12s
✔️ cinder-operator-kuttl SUCCESS in 47m 59s
cinder-operator-tempest FAILURE in 1h 47m 52s

The workload rbacRules in cinder_controller.go granted the workload
service account full CRUD (create/delete/get/list/patch/update/watch)
on core Pods, but that service account never reads or writes Pod
objects directly. Remove the unused rbacRules grant.

The kubebuilder RBAC markers for pods are kept (get;list), and
restored on CinderAPI, CinderBackup, CinderScheduler and CinderVolume
where they were removed: lib-common's VerifyNetworkStatusFromAnnotation,
called from those four controllers to verify NetworkAttachments, lists
Pods using the controller-manager's own client, so the manager's
ClusterRole (config/rbac/role.yaml) still needs get;list on pods.
Regenerate config/rbac/role.yaml.

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
@stuggi
stuggi force-pushed the rbac-cleanup-pods branch from cde917b to ce27c85 Compare July 27, 2026 07:35
@openshift-ci openshift-ci Bot removed the lgtm label Jul 27, 2026
@openshift-ci

openshift-ci Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@centosinfra-prod-github-app

Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/bc312c5519c84420a26823209c06727a

openstack-k8s-operators-content-provider FAILURE in 15m 20s
⚠️ cinder-operator-kuttl SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cinder-operator-tempest SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@abays

abays commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

recheck

@abays abays added the lgtm label Jul 27, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit f40a22c into openstack-k8s-operators:main Jul 27, 2026
6 checks passed
@stuggi

stuggi commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

/cherry-pick 18-stable

@openshift-cherrypick-robot

Copy link
Copy Markdown

@stuggi: new pull request created: #689

Details

In response to this:

/cherry-pick 18-stable

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants