Skip to content

design-proposal(compute-plane): deliver as an operator-owned extra module wrapping apps/kubernetes (supersedes #27)#33

Draft
Andrei Kvapil (kvaps) wants to merge 2 commits into
mainfrom
design/compute-plane-module
Draft

design-proposal(compute-plane): deliver as an operator-owned extra module wrapping apps/kubernetes (supersedes #27)#33
Andrei Kvapil (kvaps) wants to merge 2 commits into
mainfrom
design/compute-plane-module

Conversation

@kvaps

@kvaps Andrei Kvapil (kvaps) commented Jul 13, 2026

Copy link
Copy Markdown
Member

What

Revises the ComputePlane design proposal. ComputePlane is delivered as a Cozystack-owned Tenant module (packages/extra/computeplane) that provisions a hardened kind: Kubernetes by wrapping the existing apps/kubernetes chart with operator-fixed values — not user-facing preset fields (isolationProfile × componentProfile) on kind: Kubernetes.

Because a Tenant module is registered via an ApplicationDefinition, ComputePlane does get its own apps.cozystack.io module-kind and API (like SeaweedFS, Kubernetes and every managed service). The accurate framing is therefore: no new CRD, no new controller/reconcile path, and no new fields on kind: Kubernetes — the ComputePlane kind is a thin operator-owned wrapper over the unchanged apps/kubernetes.

Why this supersedes #27

#27 put the posture on kind: Kubernetes as user-facing fields. This revision moves it into an operator-owned extra module:

  • apps vs extra (docs(development): explain why packages live in apps vs extra website#594): a ComputePlane is a per-tenant enabler switched on under the hood, not a first-class cluster the tenant orders/configures — exactly an extra module (like extra/etcdapps/kubernetes).
  • Tamper-proof by construction: the hardening lives in the operator-owned chart and the tenant holds no admin kubeconfig, so there is no field for the tenant to weaken. The chart is the profile.
  • kind: Kubernetes untouched: no fields added to the cluster app; the user still gets the same cluster — they just don't administer it and can change only the curated knobs the module exposes.

Mechanism

Reuses the existing PackageSource "source-only chart" pattern (how NATS/SeaweedFS already ship): a computeplane-application PackageSource re-sources apps/kubernetes as a source-only ExternalArtifact, plus a computeplane-rd resource-definition and the extra/computeplane module chart. Apps route in via a new placement: ManagementPlane | ComputePlane field on ApplicationDefinition, injecting kubeConfig.secretRef → computeplane-admin-kubeconfig for one-way remote Flux apply (unchanged mechanism from the merged first revision).

Relationship to prior proposals

Departs from #26's "no new kind at all" (that is the #27 field model, set aside here) but keeps the #26 / #17-review objection to a heavyweight distinct kind: the ComputePlane module-kind does not duplicate the cluster reconcile/RBAC path — it wraps the unchanged apps/kubernetes. Supersedes #27 (preset fields — see "Alternatives considered" for the full trade-off). The underlying isolation mechanism (remote Flux apply, per-VM boundary, single-tenant, scoped egress, cozystack-api visibility control) is unchanged.

Closes #26

…ing apps/kubernetes

Revise the ComputePlane proposal: deliver it as an operator-owned Tenant
module (extra/computeplane) that wraps the existing apps/kubernetes chart
with fixed values, instead of user-facing preset fields on kind: Kubernetes.
Keeps the "not a new kind" conclusion from the #17 review and #26;
supersedes the preset-field revision (#27). The underlying isolation
mechanism (remote Flux apply, per-VM boundary, single-tenant) is unchanged.

Assisted-By: Claude
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5c1dc9fa-d971-4adc-905b-2b2f26cbe368

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch design/compute-plane-module

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates the design proposal for Cozystack's ComputePlane. Instead of introducing a new top-level kind or user-facing preset fields on kind: Kubernetes, the proposal now delivers ComputePlane as an operator-controlled Tenant module (packages/extra/computeplane) that wraps the ordinary apps/kubernetes chart with operator-fixed values. The reviewer identified an architectural contradiction in the packaging design: the proposal describes ComputePlane as a new Tenant module, but the illustrative HelmRelease points directly to the re-sourced apps/kubernetes chart, which would bypass the packages/extra/computeplane chart entirely. Clarification on whether the module chart acts as a wrapper or if it is redundant is requested.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +78 to +98
Reuse the `kubernetes` app as the substrate, unchanged. A ComputePlane is delivered as a new Tenant module, `packages/extra/computeplane`, of the same shape as `extra/etcd` / `extra/seaweedfs`. When a tenant has the module enabled, the tenant chart renders a `HelmRelease` (in the tenant namespace, on the management cluster) whose `chartRef` points at the **source-only** `apps/kubernetes` `ExternalArtifact`, carrying operator-fixed values:

```yaml
# packages/extra/computeplane — rendered HelmRelease (illustrative)
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: computeplane
namespace: tenant-<name> # management cluster, tenant namespace
spec:
chartRef:
kind: ExternalArtifact
name: cozystack-computeplane-application-kubevirt-kubernetes # apps/kubernetes, re-sourced (Design §2)
namespace: cozy-system
values: # operator-owned; the tenant cannot edit these
# hardened posture: restricted PSA + admission, deny egress → management kube-apiserver,
# scoped per-service egress only, addon set, GPU node groups, autoscaling bounds …
valuesFrom:
- kind: Secret # only the curated knobs the module chooses to surface
name: cozystack-values
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

There is an architectural contradiction in how the packages/extra/computeplane module is defined versus how it is deployed:

  1. The proposal states that "ComputePlane is delivered as a new Tenant module, packages/extra/computeplane" (line 78).
  2. However, the illustrative HelmRelease (lines 81-98) has its chartRef pointing directly at cozystack-computeplane-application-kubevirt-kubernetes (which is the re-sourced apps/kubernetes chart).

If the tenant chart's HelmRelease points directly to the re-sourced apps/kubernetes chart, the packages/extra/computeplane chart itself is bypassed and remains completely unused.

To resolve this, please clarify the packaging structure:

  • Option A: The tenant chart renders a HelmRelease pointing to packages/extra/computeplane, and packages/extra/computeplane acts as the wrapper that contains/renders the apps/kubernetes HelmRelease or templates.
  • Option B: If the tenant chart directly releases apps/kubernetes with overridden values, then the packages/extra/computeplane chart is redundant and only the computeplane-application PackageSource and computeplane-rd are needed.

…module

A Tenant module is registered via an ApplicationDefinition, so ComputePlane
does get its own apps.cozystack.io kind and API — the 'not a new top-level
kind' claim carried over from #27 is inaccurate for this delivery. Reframe
honestly: no new CRD, no new controller/reconcile path, and no fields on
kind: Kubernetes; but a thin ComputePlane module-kind is registered like
every other managed service.

Assisted-By: Claude
Signed-off-by: Andrei Kvapil <kvapss@gmail.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.

Follow-up to #17 (ComputePlane): deliver it as composable presets on kind: Kubernetes, not a new kind

1 participant