Skip to content

Capacity RBAC: cloud tiers read Karpenter; EKS Auto NodeClasses join the karpenter grant - #35

Closed
nadaverell wants to merge 2 commits into
mainfrom
feature/capacity-rbac
Closed

Capacity RBAC: cloud tiers read Karpenter; EKS Auto NodeClasses join the karpenter grant#35
nadaverell wants to merge 2 commits into
mainfrom
feature/capacity-rbac

Conversation

@nadaverell

@nadaverell nadaverell commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Radar v1.9.0 ships the Capacity view, whose endpoints gate per-CALLER: the page on `list nodes`, the Karpenter screens on `list nodepools`. The radar ServiceAccount already collects everything (`rbac.crdGroups.karpenter` defaults on), but in Cloud mode the caller is the hub user under the `radar:{viewer,member,owner}` tier bindings — and the cluster-read add-on granted nodes without Karpenter, so every Cloud tier would land in the denied-NodePools shape on Karpenter clusters. No new flag: all the permissions Capacity needs already have homes in the existing model.

What changed

  • `cloud-rbac-cluster-read.yaml`: the tier add-on gains group-wide read on `karpenter.sh` + the provider NodeClass groups, gated on `rbac.crdGroups.karpenter` (caller read is meaningless for data the SA never caches — same rationale as the existing metrics gate). Group-wide rather than named kinds because Karpenter's kind set moves with its versions (NodeOverlays, provider NodeClass variants) and a named list would strand new kinds in an unexplainable denied state. Same benign-infra class as the rest of the role: cluster-scoped provisioning config, no secrets.
  • `eks.amazonaws.com` joins the karpenter group list in both the SA ClusterRole and the new tier rule — EKS Auto Mode's NodeClasses live there, and without it Auto Mode clusters lose NodeClass readiness (the cascade attribution) and the Inspect link while everything else works.
  • README + values.yaml comments updated to match.

Verification

`helm lint` clean. Rendered permutations: default (non-cloud) → SA rule carries the widened group list; cloud mode → the `-cluster-read` role carries the karpenter rule bound to all three tiers; `rbac.crdGroups.karpenter=false` → both rules drop together.

Notes

Chart version bumped to 1.8.8 (CI requires a bump on any chart change); the v1.9.0 release automation supersedes it. Existing installs pick the new roles up on their next `helm upgrade`; an image-only upgrade path won't re-render RBAC, so clusters upgraded that way keep the caller-denied shape until their next chart-level upgrade — the in-product denied state names the missing grant either way.


Note

Medium Risk
Expands read-only cluster RBAC for Cloud users and the Radar SA on Karpenter/EKS provisioning APIs; changes are gated and non-secret but affect authorization for all Cloud tiers on Karpenter clusters.

Overview
Fixes Capacity / Karpenter visibility for Radar Cloud hub users by extending the existing cluster-read add-on ClusterRole: when rbac.crdGroups.karpenter is on, all radar:{viewer,member,owner} tiers get read-only access to Karpenter-related API groups (group-wide * resources), gated the same way as metrics so caller permissions only apply when the SA actually caches those CRDs.

eks.amazonaws.com is added alongside the existing Karpenter provider groups on both the ServiceAccount ClusterRole and the new Cloud tier rule so EKS Auto Mode NodeClasses are included without a separate flag.

Chart version bumps to 1.8.8; README and values.yaml comments match the widened group list. Existing clusters need a Helm upgrade to re-render RBAC (image-only upgrades won’t apply these rules).

Reviewed by Cursor Bugbot for commit 9b53e07. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9b53e07. Configure here.

# read is meaningless for data the SA never caches.
- apiGroups: ["karpenter.sh", "karpenter.k8s.aws", "karpenter.azure.com", "karpenter.k8s.gcp", "eks.amazonaws.com"]
resources: ["*"]
verbs: ["get", "list", "watch"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Wildcard exposes NodeDiagnostic credentials

High Severity

Group-wide resources: ["*"] on eks.amazonaws.com also covers NodeDiagnostic, whose spec.logCapture.destination can embed pre-signed S3 URLs with AWS credential material. With defaults on, every Cloud tier (including radar:viewer) and the SA gain get/list/watch on those objects, which conflicts with the role’s “no secrets” / benign-infra boundary aimed at NodeClasses.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9b53e07. Configure here.

@nadaverell

Copy link
Copy Markdown
Contributor Author

Closing: the release pipeline syncs charts/radar wholesale from skyhook-io/radar's deploy/helm/radar (rm -rf && cp on every release), so changes here get erased at the next release. The identical change landed at the source of truth instead — see the radar PR referenced above — and will arrive in this repo with the v1.9.0 sync, alongside the binary that needs it.

@nadaverell nadaverell closed this Aug 3, 2026
nadaverell added a commit to skyhook-io/radar that referenced this pull request Aug 3, 2026
…sses covered (#1327)

The Capacity view gates per-CALLER: the page on \`list nodes\`, the
Karpenter screens on \`list nodepools\`. The radar ServiceAccount
already collects everything (\`rbac.crdGroups.karpenter\` defaults on),
but in Cloud mode the caller is the hub user under the
\`radar:{viewer,member,owner}\` tier bindings — and the cluster-read
add-on granted nodes without Karpenter, so every Cloud tier would land
in the denied-NodePools shape on Karpenter clusters. No new flag: every
permission Capacity needs already has a home in the existing model.

## What changed (in \`deploy/helm/radar\` — the chart's source of truth;
releases sync it wholesale to skyhook-io/helm-charts)

- **\`cloud-rbac-cluster-read.yaml\`**: the tier add-on gains group-wide
read on \`karpenter.sh\` + the provider NodeClass groups, gated on
\`rbac.crdGroups.karpenter\` (caller read is meaningless for data the SA
never caches — same rationale as the existing metrics gate). Group-wide
rather than named kinds because Karpenter's kind set moves with its
versions, and a named list would strand new kinds in an unexplainable
denied state.
- **\`eks.amazonaws.com\` joins the karpenter group list** in both the
SA ClusterRole and the new tier rule — EKS Auto Mode's NodeClasses live
there; without it, Auto Mode clusters lose NodeClass readiness (the
cascade attribution) and the Inspect link.
- README + values comment updated to match.

Landing this here rather than in helm-charts means the grants ship with
exactly the release whose binary needs them (v1.9.0), and the release
pipeline's \`rm -rf && cp\` sync can't erase them. Supersedes
skyhook-io/helm-charts#35, closed for that reason.

## Verification

\`helm lint\` clean. Rendered permutations: default → SA rule carries
the widened group list; cloud mode → the \`-cluster-read\` role carries
the karpenter rule bound to all three tiers;
\`rbac.crdGroups.karpenter=false\` → both rules drop together.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Read-only RBAC widening for provisioning config CRDs, gated on an
existing flag; no secrets or write verbs.
> 
> **Overview**
> Fixes **Radar Cloud** Capacity/Karpenter UX where hub users under
`radar:{viewer,member,owner}` could list nodes but were denied on
NodePools because the cluster-read add-on never included Karpenter.
> 
> **`cloud-rbac-cluster-read.yaml`** adds group-wide `get/list/watch` on
Karpenter provider groups when `rbac.crdGroups.karpenter` is enabled,
matching the SA cache gate used for metrics.
> 
> **`eks.amazonaws.com`** is added alongside the existing Karpenter
groups in the SA **ClusterRole**, the new tier rule, **README**, and
**values** comments so EKS Auto Mode NodeClasses (and related
readiness/Inspect behavior) are covered.
> 
> Setting `rbac.crdGroups.karpenter=false` drops both the SA and tier
Karpenter rules together.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
a11e517. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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.

1 participant