mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
## What this PR does Adds an **opt-in** `bundles.system.networkingVariant: "cozyplane"` for the `isp-full` (Talos) bundle: it replaces kube-ovn, Cilium and kube-proxy with the [cozyplane](https://github.com/lllamnyp/cozyplane) eBPF CNI, its aggregated `sdn.cozystack.io` API server, and the `cozyplane-kpr` socket-LB kube-proxy replacement. The default `kubeovn-cilium` path renders identically to main; the selector is refused outright on every other bundle variant (slim variants included), where it would half-apply. Components: three wrapper charts around cozyplane's upstream charts — the CNI (`packages/system/cozyplane`), the kube-proxy replacement (`cozyplane-kpr`) and the aggregated apiserver with its etcd-operator-managed, PVC-backed etcd (`cozyplane-apiserver`) — plus the Cilium policy CRDs shipped inert so stock charts install (`cozyplane-cilium-crds`), a `cozystackAPI.serveSDN` toggle in cozystack-api, and the platform wiring. The wiring threads the platform's `networking.podCIDR`/`serviceCIDR` (and `clusterDNS`, the service network's address plus 10 when unset) into the cozyplane component, drops the packages that assume the replaced stack (kubeovn-webhook/-plunger, multus, securitygroup-controller, the virtualprivatecloud app), refuses the default `cilium` gateway class and `networking.encryption.enabled` on the variant, and turns off sdn serving in cozystack-api. Bootstrap ordering: the CNI installs first with the kube API as its only dependency and ships only the LOCAL group's CRDs (`local.sdn.cozystack.io`, underlay IPAM); the tenant kinds (VPC, Port, SecurityGroup, …) have **no CRDs** and are served only by the aggregated apiserver, which installs later behind cert-manager, etcd-operator and storage. Until it lands, `sdn.cozystack.io` is simply not served; there is no takeover. On Talos the agent and kpr bootstrap against KubePrism, since with no kube-proxy the `kubernetes.default` ClusterIP is unserved until kpr itself runs. Each cozyplane package follows the umbrella pattern: the upstream chart is vendored verbatim under `charts/<name>` by `make update` from a ref pinned in the wrapper's Makefile, and everything Cozystack-specific lives in the wrapper — the Talos overlays, the apiserver's etcd storage class and replica count, and two ClusterRoles that carry cozyplane's own tenant roles into the `cozy:tenant` tiers by aggregation, so the list of tenant kinds stays upstream's to maintain. Image pins are the digests upstream pins for that ref, with multi-arch legs verified there. The wrappers carry helm-unittest suites pinning the platform contract, the egress args the platform threads included, and the platform suite covers the variant's package set, the guards and the CIDR threading. The variant is experimental: it has no e2e lane yet and is not for production clusters, which the operator-facing values comment says. **CiliumNetworkPolicy objects apply but are not enforced on this variant** — tenant network isolation on the default network, the Cilium host firewall and the platform components' own Cilium policies (several of them `ingressDeny` rules native NetworkPolicy cannot express) are not in effect, as stated in the values comment, the networking source and the threat model; rebuilding them on what cozyplane does enforce (native NetworkPolicy, its operator-only HostFirewall) is a follow-up. cozystack-api's SecurityGroup (a restricted interface over CiliumNetworkPolicy) is not served on the variant; cozyplane's own SecurityGroup is the first-class tenant instrument for traffic inside and across VPCs. The tenant-facing VPC application lands in #4508, stacked on this PR. ### Screenshots Not a UI change. ### Downstream repositories The trigger map fires for cozystack/website (a new platform variant and new `platform.values` keys); cozystack/website#815 documents both. It arguably fires for terraform-provider-cozystack too (the SecurityGroup spec differs per variant); that box is left unticked so a human decides. - [ ] No downstream repository is affected by this change - [x] [cozystack/website](https://github.com/cozystack/website) - follow-up: cozystack/website#815 - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note feat(platform): opt-in networkingVariant "cozyplane" for the Talos bundle — replaces kube-ovn, Cilium and kube-proxy with the cozyplane eBPF CNI, its aggregated sdn.cozystack.io API server and a socket-LB kube-proxy replacement; CiliumNetworkPolicy objects are not enforced on this variant ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added an opt-in Cozyplane networking variant with cluster DNS configuration, CNI, and service routing. * Added a Cozyplane API service for tenant networking resources, with tenant edit and view permissions. * Added control over whether the existing SDN API is served. * Gateway configurations using an unavailable class are now rejected with guidance. * **Important Limitations** * Cozyplane does not enforce existing Cilium network policies or platform Cilium rules. Tenant traffic isolation may require native NetworkPolicies; some platform rules require operator-managed HostFirewall policies. * Cozyplane networking does not support encryption or the default Cilium Gateway class, and requires pod and service CIDRs. <!-- end of auto-generated comment: release notes by coderabbit.ai -->