Repository navigation
feat(platform): add opt-in in-cluster east-west encryption toggle - #2984
Conversation
Add networking.encryption.enabled (off by default), a platform-level opt-in that turns on in-cluster transport encryption for the active datapath. On the default kubeovn-cilium datapath (and its generic variant) KubeOVN owns the overlay, so the toggle maps to KubeOVN's Geneve-overlay IPsec (kube-ovn ENABLE_OVN_IPSEC). KubeOVN's controller provisions the IPsec CA and per-node certificates through the Kubernetes CSR API, so no cert-manager wiring is required. This is defense-in-depth for the whole mesh without per-application changes; it complements, and does not replace, application-level / end-to-end TLS. Values comments document the per-datapath scope (including Kilo's cross-location-only mesh and the unreached Cilium-native path on cilium/cilium-generic variants) and the MTU/throughput overhead. Assisted-By: Claude <[email protected]> Signed-off-by: Aleksei Sviridkin <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdds an opt-in ChangesKubeOVN IPsec encryption toggle
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request implements an opt-in feature for in-cluster network encryption, providing a defense-in-depth layer for pod-to-pod traffic. By enabling IPsec for the KubeOVN Geneve overlay, the change secures inter-node communication without requiring application-level modifications. The implementation is designed to be backward compatible, off by default, and includes detailed documentation regarding its scope, performance implications, and limitations. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces an opt-in east-west transport encryption feature (networking.encryption.enabled) for the platform's networking bundle, configuring KubeOVN to use Geneve-overlay IPsec (ENABLE_OVN_IPSEC) when enabled. Comprehensive test cases have been added to verify the bundle wiring and backward compatibility. The feedback requests running make generate to update values.schema.json with the new configuration property, ensuring proper input validation and dashboard UI integration.
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.
| encryption: | ||
| enabled: false |
There was a problem hiding this comment.
Please run make generate to regenerate values.schema.json so that the new networking.encryption property is included in the schema. This is necessary for input validation and to expose the setting in the dashboard UI.
References
- values.schema.json is the JSON Schema for dashboard UI and input validation, and must be updated when values.yaml changes. (link)
There was a problem hiding this comment.
Thanks. I checked this against the package and there's nothing to regenerate here. packages/core/platform has no values.schema.json (no core/* package does), and its Makefile has no generate target, so make generate -C packages/core/platform errors rather than emitting a schema. The values.schema.json / cozyvalues-gen pipeline is for the user-facing catalog charts: the run-make-generate pre-commit hook iterates ./packages/apps/*/ and ./packages/extra/*/ only, never core/, and the repo-root make generate (codegen-drift) is scoped by its files: filter to the Go API paths. So no schema gate applies to this platform-chart change; the operator-facing docs for the new key live in the values.yaml comments. Leaving as-is.
myasnikovdaniil
left a comment
There was a problem hiding this comment.
LGTM — approving. Clean, purely-additive opt-in with the safety properties this kind of toggle needs.
Verified locally (render/static — did not enable IPsec on any live cluster):
- Default-off is byte-identical to
main. Renderedtemplates/bundles/system.yamlwith the toggle absent on this branch vsmain→ zero diff, forisp-full. Existing installs are untouched. - On-delta is exactly the IPsec flag, deep-merged. Toggle on → the only change is
func.ENABLE_OVN_IPSEC: truenested underkube-ovn, with the existingipv4overrides preserved (not replaced). Confirmed for bothisp-full(kubeovn-cilium) andisp-full-generic(kubeovn-cilium-generic); no-op onisp-hosted/noop as documented. - Wiring is complete, not a dead flag.
func.ENABLE_OVN_IPSECis consumed by the vendored kube-ovn chart (--enable-ovn-ipsecon both controller and CNI daemonset, IPsec key-dir mount,runAsUser: 0), and the controller self-manages the IPsec CA + per-node certs via the K8s CSR API (RBAC forcertificatesigningrequestsapprove/sign +kubeovn.io/signerpresent) — so the "no cert-manager wiring" claim holds. - Variant scoping in the values comments is accurate: the system bundle only selects
kubeovn-cilium/kubeovn-cilium-generic/noop, so the Cilium-native and Kilo notes are correct. Kilo'smeshGranularity: locationdefault checks out. helm unittest66/66 pass (7 new),helm lintclean,core/platformis not cozyvalues-gen managed so no schema regen needed.
One optional hardening thought (non-blocking): enabling east-west IPsec on a running cluster is cluster-wide-disruptive (CNI rollout, ovs restart, effective-MTU drop) with no clean live disable. The values comment documents this well, so an operator flipping it via GitOps is informed. But this is exactly the class of change the proxyProtocol hazard guard a few lines down in the same file was built to gate. Worth considering whether a similar render-time acknowledgement (e.g. a networking.encryptionAcknowledgeDisruption: true confirm) is warranted, or whether the doc comment is sufficient given there's no hidden state asymmetry here (unlike proxyProtocol). Happy to merge as-is either way.
|
Heads-up from testing this on a live Talos cluster: with The IPsec path mounts a hostPath for the OVS IPsec keys at The container never starts ( Static checks don't surface this — helm-unittest and chart review both pass, because the template renders correctly; the failure is a runtime hostPath-vs-read-only-rootfs issue specific to Talos that only appears on a live Talos node. Fix direction: the IPsec keys path needs to be Talos-writable — a hostPath under |
|
Follow-up from the same Talos cluster, with the keys path fixed: the direction above was right and the knob exists. That half is really an upstream documentation gap, and I sent it there: the Talos sections of both kube-ovn charts list only two of the three host directories and leave the IPsec one at its That unblocks container creation, but not the feature. With it applied IPsec does come up — 8 ESP SAs establish between node IPs in transport mode, and notably they establish with
So the blocker is neither the chart wiring nor the keys path — both are solved. It is that kube-ovn IPsec does not carry traffic on this datapath and cannot be turned off cleanly, which looks like an upstream problem rather than something this toggle can paper over. Unlike the keys path, these two are not reported upstream yet. I am keeping this in draft until the datapath and the teardown are fixed: shipping an opt-in that silently blackholes pod-to-pod traffic and cannot be reverted without manual surgery on every node is not worth the defense-in-depth. |
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
What this PR does
Adds
networking.encryption.enabledto the platform chart — a single operator-facing opt-in, off by default, that turns on in-cluster (east-west) transport encryption for the active datapath. When enabled, pod-to-pod traffic across nodes is encrypted at the network layer regardless of whether the workload implements TLS: defense-in-depth for the whole mesh without per-application changes.The default
isp-fullbundle selects thekubeovn-ciliumdatapath (andisp-full-genericselectskubeovn-cilium-generic), where KubeOVN owns the datapath and the overlay is a Geneve tunnel. The toggle therefore maps to KubeOVN's overlay IPsec (kube-ovnENABLE_OVN_IPSEC). KubeOVN's own controller provisions the IPsec CA and per-node certificates through the Kubernetes CSR API, so no cert-manager wiring is needed.This complements, and does not replace, application-level / end-to-end TLS: in-cluster encryption never reaches an external client and gives a tenant no verifiable endpoint certificate. The values comments document the per-datapath scope — including that Kilo's WireGuard mesh (
meshGranularity: location) covers only cross-location traffic and leaves the intra-location gap this toggle targets, and that the Cilium-native WireGuard/IPsec path on thecilium/cilium-genericvariants is not reached because the system bundle does not select those variants — plus the MTU/throughput overhead.Scope: only the default KubeOVN datapath is wired through the platform toggle, which is what the system bundle actually selects. Wiring the Cilium-native path would require the bundle to expose cilium-only variant selection; that is out of scope here and called out in the values comments.
Validation:
helm unitteston the platform chart passes (66 tests, 7 new) covering on / off / absent / null and verifying the IPsec flag deep-merges without dropping the existingkube-ovnoverrides, for bothisp-fullandisp-full-generic.Closes #2977
Part of #2811
Screenshots
N/A — no UI changes.
Release note
Summary by CodeRabbit
New Features
networking.encryptionconfiguration toggle (disabled by default) with full backward compatibility.Tests