Skip to content

[18-stable] Remove unnecessary pods RBAC permissions - #968

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:18-stablefrom
openshift-cherrypick-robot:cherry-pick-957-to-18-stable
Jul 29, 2026
Merged

[18-stable] Remove unnecessary pods RBAC permissions#968
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:18-stablefrom
openshift-cherrypick-robot:cherry-pick-957-to-18-stable

Conversation

@openshift-cherrypick-robot

Copy link
Copy Markdown

This is an automated cherry-pick of #957

/assign stuggi

The workload rbacRules and kubebuilder RBAC markers granted the
operator and its workload service accounts full CRUD (create/delete/
get/list/patch/update/watch) on core Pods. Most of these components
never read or write Pod objects directly, so the unused grants are
removed.

Two exceptions are kept, scoped down to what is actually used:

- Ceilometer deploys a kube-state-metrics StatefulSet running as its
  workload service account, which genuinely needs get;list;watch on
  Pods to produce kube_pod_status_* metrics. Keep that rbacRules grant
  (scoped to get;list;watch, dropping the unused write verbs), and add
  the matching kubebuilder marker so the controller-manager's own
  ClusterRole retains the permissions it needs to grant that Role.
- CloudKittyAPI and CloudKittyProc call lib-common's
  VerifyNetworkStatusFromAnnotation to verify NetworkAttachments,
  which lists Pods using the controller-manager's own client. Keep the
  get;list kubebuilder markers on both.

Regenerate config/rbac/role.yaml.

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>

@stuggi stuggi 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 added the lgtm label Jul 29, 2026
@openshift-ci

openshift-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: openshift-cherrypick-robot, 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

@openshift-merge-bot
openshift-merge-bot Bot merged commit 8c0f0ae into openstack-k8s-operators:18-stable Jul 29, 2026
4 checks passed
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.

2 participants