Skip to content

Add apiextensions.k8s.io and dapr.io RBAC permissions to dynamic-rp service account#11350

Merged
lakshmimsft merged 2 commits intomainfrom
copilot/fix-dynamic-rp-permissions
Mar 3, 2026
Merged

Add apiextensions.k8s.io and dapr.io RBAC permissions to dynamic-rp service account#11350
lakshmimsft merged 2 commits intomainfrom
copilot/fix-dynamic-rp-permissions

Conversation

Copy link
Contributor

Copilot AI commented Mar 2, 2026

Description

The dynamic-rp service account lacks RBAC permissions required when deploying Dapr Recipes. Two failures occur:

  1. Cannot list CRDs (apiextensions.k8s.io) to resolve GVKs for custom resources
  2. Cannot manage Dapr resources (dapr.io) in target namespaces

Adds two rule blocks to the dynamic-rp ClusterRole:

  • apiextensions.k8s.io/customresourcedefinitionsget, list, watch (needed to look up GVKs among available CRDs)
  • dapr.iocomponents, subscriptions, configurations, resiliencies with full CRUD (matches the existing applications-rp pattern for Dapr resource management)

Type of change

  • This pull request fixes a bug in Radius and has an approved issue (issue link required).

Contributor checklist

Please verify that the PR meets the following requirements, where applicable:

  • An overview of proposed schema changes is included in a linked GitHub issue.
    • Yes
    • Not applicable
  • A design document PR is created in the design-notes repository, if new APIs are being introduced.
    • Yes
    • Not applicable
  • The design document has been reviewed and approved by Radius maintainers/approvers.
    • Yes
    • Not applicable
  • A PR for the samples repository is created, if existing samples are affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
    • Yes
    • Not applicable
  • A PR for the recipes repository is created, if existing recipes are affected by the changes in this PR.
    • Yes
    • Not applicable

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix insufficient permissions for dynamic-rp service account Add apiextensions.k8s.io and dapr.io RBAC permissions to dynamic-rp service account Mar 2, 2026
Copilot AI requested a deployment to external-contributor-approval March 2, 2026 18:59 Waiting
@willtsai willtsai marked this pull request as ready for review March 2, 2026 19:16
@willtsai willtsai requested review from a team as code owners March 2, 2026 19:16
Copilot AI review requested due to automatic review settings March 2, 2026 19:16
@nithyatsu nithyatsu requested a review from willdavsmith March 2, 2026 19:17
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Unit Tests

    2 files  ±0    415 suites  ±0   6m 29s ⏱️ -18s
4 862 tests ±0  4 860 ✅ ±0  2 💤 ±0  0 ❌ ±0 
5 762 runs  ±0  5 760 ✅ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit 6000d4a. ± Comparison against base commit d912167.

♻️ This comment has been updated with latest results.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Helm chart RBAC for the dynamic-rp service account to support Terraform-based deployment of Dapr recipes by granting access to (1) Kubernetes CRDs for GVK discovery and (2) Dapr custom resources for lifecycle management.

Changes:

  • Add apiextensions.k8s.io/customresourcedefinitions RBAC verbs (get, list, watch) to allow Terraform’s Kubernetes provider to resolve GVKs.
  • Add dapr.io RBAC for core Dapr resources (components, subscriptions, configurations, resiliencies) with CRUD + watch verbs.

Copilot AI requested a deployment to external-contributor-approval March 2, 2026 21:53 Waiting
@kachawla kachawla temporarily deployed to external-contributor-approval March 2, 2026 21:53 — with GitHub Actions Inactive
@kachawla kachawla self-assigned this Mar 2, 2026
@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.10%. Comparing base (d912167) to head (6000d4a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #11350   +/-   ##
=======================================
  Coverage   51.09%   51.10%           
=======================================
  Files         699      699           
  Lines       44067    44067           
=======================================
+ Hits        22517    22521    +4     
+ Misses      19402    19400    -2     
+ Partials     2148     2146    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI and others added 2 commits March 2, 2026 15:49
…lusterRole

The dynamic-rp service account was missing permissions needed by the
Terraform kubernetes provider when deploying Dapr Terraform Recipes:

1. apiextensions.k8s.io/customresourcedefinitions (get, list, watch) -
   needed to look up GVKs among available CRDs
2. dapr.io resources: components, subscriptions, configurations,
   resiliencies (full CRUD) - needed to manage Dapr resources

Fixes #8685

Co-authored-by: willtsai <28876888+willtsai@users.noreply.github.com>
Co-authored-by: kachawla <74574173+kachawla@users.noreply.github.com>
@lakshmimsft lakshmimsft force-pushed the copilot/fix-dynamic-rp-permissions branch from 3a3669e to 6000d4a Compare March 2, 2026 23:49
@lakshmimsft lakshmimsft temporarily deployed to external-contributor-approval March 2, 2026 23:49 — with GitHub Actions Inactive
@radius-functional-tests
Copy link

radius-functional-tests bot commented Mar 3, 2026

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository radius-project/radius
Commit ref 6000d4a
Unique ID funccac1c98b70
Image tag pr-funccac1c98b70
  • gotestsum 1.13.0
  • KinD: v0.29.0
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-funccac1c98b70
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-funccac1c98b70
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funccac1c98b70
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funccac1c98b70
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funccac1c98b70
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@lakshmimsft lakshmimsft merged commit 0980cf9 into main Mar 3, 2026
68 of 69 checks passed
@lakshmimsft lakshmimsft deleted the copilot/fix-dynamic-rp-permissions branch March 3, 2026 01:08
DariuszPorowski pushed a commit that referenced this pull request Mar 3, 2026
…ervice account (#11350)

# Description

The `dynamic-rp` service account lacks RBAC permissions required when
deploying Dapr Recipes. Two failures occur:

1. Cannot list CRDs (`apiextensions.k8s.io`) to resolve GVKs for custom
resources
2. Cannot manage Dapr resources (`dapr.io`) in target namespaces

Adds two rule blocks to the `dynamic-rp` ClusterRole:

- **`apiextensions.k8s.io/customresourcedefinitions`** — `get`, `list`,
`watch` (needed to look up GVKs among available CRDs)
- **`dapr.io`** — `components`, `subscriptions`, `configurations`,
`resiliencies` with full CRUD (matches the existing `applications-rp`
pattern for Dapr resource management)

## Type of change

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).

## Contributor checklist
Please verify that the PR meets the following requirements, where
applicable:

<!--
This checklist uses "TaskRadio" comments to make certain options
mutually exclusive.
See:
https://github.com/mheap/require-checklist-action?tab=readme-ov-file#radio-groups
For details on how this works and why it's required.
-->

- An overview of proposed schema changes is included in a linked GitHub
issue.
    - [ ] Yes <!-- TaskRadio schema -->
    - [x] Not applicable <!-- TaskRadio schema -->
- A design document PR is created in the [design-notes
repository](https://github.com/radius-project/design-notes/), if new
APIs are being introduced.
    - [ ] Yes <!-- TaskRadio design-pr -->
    - [x] Not applicable <!-- TaskRadio design-pr -->
- The design document has been reviewed and approved by Radius
maintainers/approvers.
    - [ ] Yes <!-- TaskRadio design-review -->
    - [x] Not applicable <!-- TaskRadio design-review -->
- A PR for the [samples
repository](https://github.com/radius-project/samples) is created, if
existing samples are affected by the changes in this PR.
    - [ ] Yes <!-- TaskRadio samples-pr -->
    - [x] Not applicable <!-- TaskRadio samples-pr -->
- A PR for the [documentation
repository](https://github.com/radius-project/docs) is created, if the
changes in this PR affect the documentation or any user facing updates
are made.
    - [ ] Yes <!-- TaskRadio docs-pr -->
    - [x] Not applicable <!-- TaskRadio docs-pr -->
- A PR for the [recipes
repository](https://github.com/radius-project/recipes) is created, if
existing recipes are affected by the changes in this PR.
    - [ ] Yes <!-- TaskRadio recipes-pr -->
    - [x] Not applicable <!-- TaskRadio recipes-pr -->

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: willtsai <28876888+willtsai@users.noreply.github.com>
Co-authored-by: kachawla <74574173+kachawla@users.noreply.github.com>

(cherry picked from commit 0980cf9)
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
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.

5 participants