Skip to content

feat(platform): add slim installation variants - #4595

Merged
Aleksei Sviridkin (lexfrei) merged 2 commits into
mainfrom
feat/platform-slim-variants
Oct 1, 2026
Merged

Aleksei Sviridkin (lexfrei) merged 2 commits into
mainfrom
feat/platform-slim-variants

Conversation

@lexfrei

@lexfrei Aleksei Sviridkin (lexfrei) commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

This adds three minimal platform variants for small installs, such as arm64 labs, where isp-full is too heavy. They are isp-slim for Talos, isp-slim-generic for k3s, kubeadm or RKE2, and isp-hosted-slim for clusters where the host provides CNI and storage.

A slim variant installs only the base platform: the engine, API and dashboard, tenants, ingress and Gateway API. The two non-hosted variants also get LINSTOR. objectstorage-controller stays on too, because cozystack-controller watches BucketClaim unconditionally and crash-loops without that CRD. Everything else is opt-in through bundles.enabledPackages, including every paas and naas application and its operator, monitoring, backups, etcd, SeaweedFS, metrics-server, VPA, Multus and MetalLB. The iaas bundle is refused, so there are no VMs and no managed Kubernetes. With the stock preset a slim variant emits 20 Packages (15 for hosted), where isp-full emits 77.

On the two non-hosted slim variants, networking is Cilium alone. Without VMs nothing needs Kube-OVN, and Cilium L2 announcements take the place of MetalLB. The admin creates a CiliumLoadBalancerIPPool and a CiliumL2AnnouncementPolicy, or uses publishing.externalIPs. Pod ranges come from node.spec.podCIDR, which Talos and k3s allocate by default. networking.encryption only drives Kube-OVN IPsec, so the slim variants refuse it instead of silently ignoring it.

The tenant application needs its own slim variant. The default one waits on the monitoring, etcd and SeaweedFS applications, so on slim cozystack-basics and tenant-root would never become ready. tenant-rd and cozystack-basics still reference the default variant's artifacts by name. Those artifacts exist anyway, because the PackageSource builds them for every variant.

The full variants don't change. I rendered isp-full, isp-full-generic and isp-hosted against main and got byte-identical Packages. The only new output there is the slim variant in the tenant-application PackageSource.

Things to know before using it:

  • An opt-in package does not pull in its dependencies. The presets and the docs list the chains. A package enabled without its chain stays DependenciesNotReady.
  • Slim is for new installs. Switching a live isp-full cluster to isp-slim moves the networking Package from kubeovn-cilium to cilium, the operator removes the Kube-OVN release, and running pods lose networking. The other Packages are kept by helm.sh/resource-policy: keep, so the switch doesn't make the cluster smaller either.
  • No e2e suite runs a slim variant yet. Helm unit tests cover the presets, opt-in, OIDC, the networking values and both refusals, and a dependency check over every emitted Package passes for all three presets.

I installed isp-slim from a build of this branch on a fresh three-node Talos 1.13 cluster (amd64). All Packages and HelmReleases went Ready, with no Kube-OVN, MetalLB, monitoring, backup or KubeVirt pods. From outside, the dashboard and the API answered by name with valid certificates. A LoadBalancer Service got an address from a Cilium pool and answered through L2 announcements. Pod-to-pod traffic across nodes, cluster DNS and a replicated LINSTOR volume worked. Opting in postgres-operator and postgres-application gave a Ready Postgres. That run found the BucketClaim crash-loop above, which is fixed here. The base platform used about 215m CPU and 3.2 GiB of memory, not counting the Kubernetes control plane.

Screenshots

Not a UI change.

Downstream repositories

Release note

feat(platform): add the isp-slim, isp-slim-generic and isp-hosted-slim variants. They install only the base platform (engine, dashboard, tenants, ingress, gateway, and LINSTOR outside hosted) with Cilium-only networking and no MetalLB; applications, operators, monitoring, backups, etcd and SeaweedFS are opt-in through bundles.enabledPackages, and the iaas bundle is not available.

Summary by CodeRabbit

  • New Features
    • Added the isp-slim, isp-slim-generic, and isp-hosted-slim platform variants, with support for PaaS and NaaS bundles.
    • Slim variants use Cilium networking and include a reduced set of packages by default. Additional packages and their dependencies can be enabled as needed.
  • Limitations
    • IaaS and the platform encryption toggle are not supported on slim variants. Cilium-native encryption is not configured.

@github-actions github-actions Bot added area/platform Issues or PRs related to platform infrastructure (bundle, flux, talos, installer) kind/feature Categorizes issue or PR as related to a new feature size/XXL This PR changes 1000+ lines, ignoring generated files labels Sep 29, 2026
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: cozystack/cozystack/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 8ae79ede-c4f0-4d1b-b821-00b1e1f02808

📥 Commits

Reviewing files that changed from the base of the PR and between f89e4ac and 465195c.

📒 Files selected for processing (5)
  • packages/core/platform/templates/bundles/system.yaml
  • packages/core/platform/tests/bundles_slim_variants_test.yaml
  • packages/core/platform/values-isp-hosted-slim.yaml
  • packages/core/platform/values-isp-slim-generic.yaml
  • packages/core/platform/values-isp-slim.yaml

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The platform now supports isp-slim, isp-slim-generic, and isp-hosted-slim profiles. Bundle templates select networking and packages by variant. Tests cover slim and full package behavior.

Changes

Slim platform variants

Layer / File(s) Summary
Variant profiles and tenant application source
cmd/cozystack-operator/main.go, cmd/cozystack-operator/main_test.go, packages/core/platform/values-isp-*.yaml, packages/core/platform/sources/tenant-application.yaml, packages/core/platform/tests/sources_tenant_application_slim_test.yaml, packages/core/platform/values.yaml
Adds three slim profile values files and PackageSource variants. Adds a reduced-dependency slim tenant application variant. Updates variant configuration documentation and tests.
Slim package and networking helpers
packages/core/platform/templates/_helpers.tpl
Adds slim-variant detection and package helpers. Slim networking rejects enabled encryption, removes KubeOVN, selects the supplied slim networking variant, and enables Cilium L2 announcements.
Bundle package selection
packages/core/platform/templates/bundles/system.yaml, packages/core/platform/templates/bundles/paas.yaml, packages/core/platform/templates/bundles/naas.yaml
Allows the slim variants in bundle guards and updates package rendering to use full-variant or networking-specific helpers. Selects the slim tenant application variant for slim platforms.
Slim and full variant validation
packages/core/platform/tests/bundles_slim_variants_test.yaml
Adds Helm assertions for slim package sets, opt-in packages, networking, unsupported settings, and representative full-variant behavior.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Operator as cozystack-operator
  participant Profile as profile values
  participant System as system bundle
  participant Helpers as package helpers
  Operator->>Profile: Select values.yaml and variant values
  Profile->>System: Set bundles and system variant
  System->>Helpers: Render packages for the selected variant
  Helpers-->>System: Apply slim or full package selection
Loading

Merge Risk: ⚪ Minimal · up to 46519

The slim profiles have consistent tenant dependencies and standalone networking configuration. No actionable merge-blocking risk remains; installations must satisfy the documented node-CIDR prerequisites.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 46519

The managed slim profiles reject unsupported encryption rather than silently dropping it, and existing full-profile encryption behavior is preserved. No introduced security weakness was established. Permissions over platform configuration and recovery from live profile changes remain unverified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The affected sink installs privileged networking components, so an unauthorized or incorrect platform configuration change could affect connectivity across cluster nodes and tenant workloads. Actual access to the upstream configuration is unresolved; tenant-level reachability is not established.

Trust Boundaries and Controls

  • observed — The platform chart enforces rejection of unsupported encryption before emitting managed slim networking. This is a configuration validation control, not proof of authorization: the identities permitted to modify the platform Package or equivalent Helm values remain unknown.

Resilience and Maintainability Implications

  • inferred — The encryption failure prevents successful rendering of the unsupported managed slim configuration. It does not establish transactional application, removal of previously installed components, or restoration after an interrupted profile switch; those guarantees depend on reconciliation behavior outside the inspected templates.

Hardening Proposals

  • proposed — If live full-to-slim switching is intended, define and validate its ownership, cleanup, ordering, interruption, and rollback contract. Otherwise, explicitly document and enforce the unsupported transition rather than treating profile selection as a migration mechanism.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (5 skipped: 5… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding slim platform installation variants.
Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (5 skipped: 5 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

…riants

Small installs such as arm64 labs had to take the whole isp-full set:
KubeVirt, backups, monitoring, etcd, SeaweedFS and every paas/naas
operator. The slim variants keep only the engine, tenants, ingress,
gateway, LINSTOR storage and networking, and turn everything else into
opt-in packages listed in bundles.enabledPackages. Full variants render
the same Packages as before.

Networking on isp-slim and isp-slim-generic is Cilium alone: without
VMs nothing needs KubeOVN, and Cilium L2 announcements take the place of
MetalLB, which stays available as an opt-in package. KubeOVN IPsec is
what networking.encryption drives, so the slim variants refuse it
rather than ignore it. isp-hosted-slim keeps the noop datapath.

tenant-application gains a slim variant whose dependsOn drops the
monitoring, etcd and seaweedfs applications; the default variant waits
on them, which would leave cozystack-basics and tenant-root never Ready.
The iaas bundle stays limited to the isp-full variants.

objectstorage-controller stays on everywhere: cozystack-controller
watches BucketClaim unconditionally, so without that CRD its manager
never syncs its caches and crash-loops.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <[email protected]>
Add isp-slim, isp-slim-generic and isp-hosted-slim to the platform
PackageSource so a Package can select the minimal presets shipped by
the platform chart.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <[email protected]>
@myasnikovdaniil

Copy link
Copy Markdown
Contributor

Aleksei Sviridkin (@lexfrei) where did request for slim variants come from? Description motivates it with one line (small installs like arm64 labs where isp-full is too heavy), there is no linked issue, and I didn't find any request for slim or minimal install in cozystack or community repos.

I had minimal install request myself, but it is covered by default variant where you enable only what you need from scratch, plus bundles.disabledPackages, and slim variants don't fit that task.

Yes, variant is cheap, it is mostly config, but without concrete user or use case I don't understand motivation. arm64 by itself doesn't look like reason either - #1961 reports isp-full-generic running fully on 3-node arm64 k3s, and PR has numbers only for slim, not for isp-full on same hardware.

@IvanHunters IvanHunters left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict

LGTM with non-blocking notes

Upgrade-safe: every existing variant renders byte-identical to main except for one additive, unselected PackageSource block. The three slim variants render a coherent, dependency-closed package set, and the new tests actually guard the behaviour rather than just rendering it. Two notes below, neither blocks.

Claim mismatches

[PARTIAL] The PR body says "the slim variants refuse [networking.encryption] instead of silently ignoring it". Only isp-slim and isp-slim-generic do: they fail at render time. isp-hosted-slim selects the noop networking variant, so there the toggle is silently ignored, exactly like isp-hosted. Rendering isp-hosted-slim with networking.encryption.enabled=true produces no error and a cozystack.networking Package on variant noop. The in-code values.yaml comment is accurate; only the PR-body summary overstates it. No code change needed.

Caveats

  • Opt-in gating on slim is a two-key gate. An opt-in paas/naas package renders only when bundles.{paas,naas}.enabled: true AND it is listed in bundles.enabledPackages. Set paas.enabled=false and put cozystack.postgres-application in enabledPackages and you get nothing, with no error. The shipped slim presets set both flags true so the default path works; a doc line saying the bundle flag is itself the opt-in gate would save someone the silent no-op.
  • golangci-lint would not run locally here (its binary was built with go1.26, the repo targets go1.27.1), so I leaned on the green CI "Analyze (go)" job for lint. go build, go vet and go test ./cmd/cozystack-operator/ pass locally.
  • The new slim variant on the cozystack.tenant-application PackageSource is only exercised by render in this review. How the operator reconciles a newly-added-but-unselected variant on a live cluster is not something I can test hermetically. The change is additive and existing variants still select default, so the blast radius is small.
  • No e2e covers a slim install. The cilium / cilium-generic networking variants were dormant before this PR (the system bundle never selected them), and this change turns them on together with Cilium L2 announcements standing in for MetalLB. Whether a LoadBalancer Service actually gets an address from the admin-created CiliumLoadBalancerIPPool plus CiliumL2AnnouncementPolicy, and the host ingress comes up, is only answerable on a cluster. hack/e2e-platform-packages.sh does not exercise slim. Not a defect, a gap worth a follow-up e2e.
  • [NIT] packages/core/platform/templates/_helpers.tpl:124: set $components "cilium" (dict "values" (dict "cilium" $cilium)) rebuilds components.cilium.values wholesale, so any future sibling key next to cilium under values would be dropped. Harmless today, since both system.yaml branches put only cilium there. Flagging it so the line is not copied as-is into a path that carries more.

Recommended follow-ups

  • Satellites (ccp#23, ansible-cozystack#79, website#718) carry the downstream variant wiring. Not reviewed here, and no desync with them is visible in this diff.

@lexfrei
Aleksei Sviridkin (lexfrei) merged commit de570a3 into main Oct 1, 2026
56 checks passed
@lexfrei
Aleksei Sviridkin (lexfrei) deleted the feat/platform-slim-variants branch October 1, 2026 11:03
Aleksei Sviridkin (lexfrei) added a commit to cozystack/website that referenced this pull request Oct 5, 2026
This documents the three slim platform variants added in
cozystack/cozystack#4595: `isp-slim`, `isp-slim-generic` and
`isp-hosted-slim`.

The variants page gets them in the comparison table and one section
each. It also explains the Cilium load balancer setup that replaces
MetalLB there, and has a table of which packages to add to
`bundles.enabledPackages` to bring back applications, monitoring, etcd,
SeaweedFS and backups. The platform package, generic install,
distribution and Ansible pages list the new names.

Only `docs/next` is touched, since the variants are not in a release
yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/platform Issues or PRs related to platform infrastructure (bundle, flux, talos, installer) kind/feature Categorizes issue or PR as related to a new feature size/XXL This PR changes 1000+ lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants