Skip to content

feat(manager): grant RBAC for IPAM resources used by ui-apis - #5294

Closed
tianfeng92 wants to merge 2 commits into
tigera:masterfrom
tianfeng92:EV-7009-manager-rbac-ipam
Closed

feat(manager): grant RBAC for IPAM resources used by ui-apis#5294
tianfeng92 wants to merge 2 commits into
tigera:masterfrom
tianfeng92:EV-7009-manager-rbac-ipam

Conversation

@tianfeng92

@tianfeng92 tianfeng92 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Description

The IP Pools page (EV-7009) in ui-apis needs to read IPAM resources via the calico-manager service account. This PR adds the necessary RBAC rules to the manager ClusterRole:

  • ippools and ipamconfigurations via projectcalico.org (aggregated API)
  • ipamblocks via crd.projectcalico.org (CRD API group — blocks are not served by the aggregated projectcalico.org/v3 API)

https://github.com/tigera/calico-private/pull/13614

Release Note

None

AI Assistance

This PR was written with AI assistance (Claude Code).

Docs Changes

docs-not-required

@tianfeng92
tianfeng92 requested a review from a team as a code owner September 1, 2026 20:55
Copilot AI lite review requested due to automatic review settings September 1, 2026 20:55
@marvin-tigera marvin-tigera added this to the v1.45.0 milestone Sep 1, 2026

Copilot AI 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.

Pull request overview

This PR updates the Manager component’s ClusterRole RBAC to allow the calico-manager service account (used by ui-apis) to read the Calico IPAM resources needed to power the IP Pools page (EV-7009), specifically across both the aggregated API and the CRD API group where required.

Changes:

  • Grant get/list on ippools and ipamconfigurations in the aggregated projectcalico.org API group.
  • Grant list on ipamblocks in the crd.projectcalico.org API group (since blocks are not served by the aggregated API).
  • Extend Manager rendering tests to assert the new RBAC rules in both relevant rule sets.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/render/manager.go Adds the new RBAC PolicyRules to the manager ClusterRole for IPAM resources required by ui-apis.
pkg/render/manager_test.go Updates expected ClusterRole rules to include the new IPAM-related permissions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

The IP Pools page in ui-apis needs to read ippools, ipamconfigurations
(via projectcalico.org aggregated API) and ipamblocks (via the CRD API
group crd.projectcalico.org, since blocks are not served by the
aggregated API).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 1, 2026 21:29
@tianfeng92
tianfeng92 force-pushed the EV-7009-manager-rbac-ipam branch from 350cf42 to 8f54376 Compare September 1, 2026 21:29

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

ui-apis reads the Installation resource to detect IPAM mode for the
/cluster endpoint. Add operator.tigera.io/installations get permission
to the calico-manager ClusterRole.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 2, 2026 20:23

Copilot AI 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.

🟡 Changes recommended

The code grants an additional permission (get on operator.tigera.io/installations) that is not described in the PR description and should be either justified in the description or removed.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread pkg/render/manager.go
Comment on lines +1065 to +1069
{
// IP Pools page: ui-apis reads the Installation to detect the IPAM mode.
APIGroups: []string{"operator.tigera.io"},
Resources: []string{"installations"},
Verbs: []string{"get"},
@tianfeng92

Copy link
Copy Markdown
Contributor Author

RBAC changes moved into calico-private PR https://github.com/tigera/calico-private/pull/13614 — operator code lives in the monorepo now.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants