Add --[no-]default-mrap flag to project run - #302
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesDefault MRAP control
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: 🔵 Low · up to The new option narrows managed-resource activation for newly created local control planes, while existing control planes retain their previous activation state when reused. The change is mergeable with owner awareness that users must recreate an existing control plane for the setting to take effect. Sequence Diagram(s)sequenceDiagram
participant ProjectRun
participant EnsureLocalDevControlPlane
participant HelmChart
ProjectRun->>EnsureLocalDevControlPlane: pass WithDefaultMRAP
EnsureLocalDevControlPlane->>HelmChart: set provider.defaultActivations to nil when disabled
HelmChart-->>EnsureLocalDevControlPlane: install control plane without default wildcard MRAP
Suggested reviewers: 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
Full details: Breaking ChangesExplanation PASS. The pull request diff changes no files under Full details: Feature Gate RequirementExplanation The check passes. The PR changes no files under Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
06abed8 to
6773cdf
Compare
Crossplane's helm chart defaults provider.defaultActivations to ["*"], so the dev control plane always installs a wildcard ManagedResourceActivationPolicy that activates every managed resource CRD its providers offer. That is a convenient default, but it does not match a production control plane that manages activation explicitly, so a project can pass locally while its own activation policies are incomplete. Add --[no-]default-mrap, defaulting to true to preserve the current behavior. When disabled, set provider.defaultActivations to null in the chart values, which removes the chart default during value coalescing so no --activation args are passed to Crossplane and no default MRAP is created. This mirrors the flag of the same name in the up CLI. Signed-off-by: Steven Borrelli <steve@borrelli.org> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
6773cdf to
97e76f1
Compare
Regenerated with `crossplane generate-docs` from crossplane/cli#302, which adds a --[no-]default-mrap flag to `crossplane project run` for skipping the wildcard ManagedResourceActivationPolicy that Crossplane's helm chart installs by default in the local dev control plane. Targets the master CLI docs rather than v2.5, since the flag is not in the released v2.5.0 binary. Signed-off-by: Steven Borrelli <steve@borrelli.org> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Integration fix. crossplane#304 adds a cacheDir parameter to baseImageForArch; crossplane#170 adds a TypeScript builder that calls it. The branches merge cleanly because they touch different files, but the result does not compile without this. Whichever PR merges second upstream needs this one line. Also update the testing notes: crossplane#302 and crossplane#303 have merged, so they now arrive through main rather than as merges here. Signed-off-by: Steven Borrelli <steve@borrelli.org> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The opening still said the branch merges four open PRs when only two remain open. Reword it so the count does not go stale again, mark the --no-default-mrap check as testing something that now lives in main, and add a short section recording what has already landed. Signed-off-by: Steven Borrelli <steve@borrelli.org> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description of your changes
Adds a
--[no-]default-mrapflag tocrossplane project run, mirroring the flag of the same name in theupCLI.Docs PR crossplane/docs#1147
Crossplane's Helm chart defaults
provider.defaultActivationsto["*"], so the local dev control plane always gets a wildcardManagedResourceActivationPolicyactivating every managed resource CRD its providers offer. That's a convenient default, but it doesn't match a production control plane that manages activation explicitly — a project can passproject runlocally while its own activation policies are incomplete, and only fail once deployed.--no-default-mrapsetsprovider.defaultActivationstonullin the chart values. The chart template is a barerangeover that value (templates/deployment.yaml), so an explicit null both removes the chart default during value coalescing and, failing that, ranges over nothing — either way no--activationargs reach Crossplane and no default MRAP is created. Verified against chart v2.4.0:The flag defaults to
true, so existing behavior is unchanged.Implementation follows the existing
--cluster-adminpattern: aWithDefaultMRAPfunctional option oncontrolplane.EnsureLocalDevControlPlane, threaded intoensureCrossplane.Reviewer note:
ensureCrossplanereturns early when Crossplane is already installed, so this flag — like--cluster-admintoday — only takes effect when the control plane is created. Reusing an existing control plane keeps whatever it was built with. This is documented inhelp/run.md, but it's worth a look if you think the flag should instead force a reinstall or fail loudly on a mismatch.I have:
./nix.sh flake checkto ensure this PR is ready for review.Added or updated unit tests.Linked a PR or a docs tracking issue to document this change.Addedbackport release-x.ylabels to auto-backport this PR.Need help with this checklist? See the cheat sheet.