Add CableDriverOptions to Submariner CR - #4142
Conversation
|
Follow-up subctl PR: >>> Creating PR #3: subctl feat/cable-driver-options -> devel |
|
🤖 Created branch: z_pr4142/sanek9/feat/cable-driver-options |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
🚧 Files skipped from review as they are similar to previous changes (4)
WalkthroughThe Submariner API and CRD schemas now support optional driver-specific cable options. The controller serializes non-empty options into ChangesCable driver options
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant SubmarinerCR
participant newGatewayPodTemplate
participant encodingjson
participant GatewayDaemonSet
SubmarinerCR->>newGatewayPodTemplate: Provide Spec.CableDriverOptions
newGatewayPodTemplate->>encodingjson: Marshal options to JSON
encodingjson-->>newGatewayPodTemplate: Return JSON string
newGatewayPodTemplate->>GatewayDaemonSet: Set SUBMARINER_CABLEDRIVEROPTIONS
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
|
Part of the proposal overview: submariner-io/submariner#4101 |
dbfdbd5 to
bc5a983
Compare
|
@sanek9 "Bundle validation" job failed which means you need to run |
Expose cableDriverOptions on the Submariner CR and pass them to the gateway as SUBMARINER_CABLEDRIVEROPTIONS. Update OLM bundle manifests for the new field. Signed-off-by: sanek9 <sanya0996@gmail.com>
29c9efe to
36572da
Compare
What this PR does / why we need it
Adds cluster-wide
spec.cableDriverOptions(map[string]string) on the Submariner CRand injects it into the gateway as:
The field is intentionally driver-agnostic: it is an opaque
key=valuebag that theselected cable driver may consume. Drivers that do not recognize a key simply ignore it.
That keeps peer-facing
Endpoint.BackendConfigunchanged and avoids bakingdriver-specific knobs into the CR schema (one field instead of a growing set of
AmneziaWG- / Libreswan- / WireGuard-only API fields).
Today the AmneziaWG driver is the first consumer (obfuscation parameters). The same
mechanism is meant for other drivers later without another CRD change. For Libreswan,
a natural fit would be things discussed in #1668 — for example selecting IKE/ESP
proposals / ciphers so hardware crypto offload can be used — rather than growing the
CR with more Libreswan-specific fields. WireGuard or future drivers can opt in the
same way via
cable.GetDriverOptions().Empty/absent map → env var is not set, so gateways keep built-in driver defaults
(compatible with older submariner images that do not read the variable yet).
More details
--cable-driver-option key=valueto populate the CR at join time.config/crdanddeploy/crds(subctl installs from deploy).Related issues
Depends on / related PRs
--cable-driver-optionChecklist
config/crdanddeploy/crds)Cross-links (this series)
Made with Cursor
Summary by CodeRabbit
spec.cableDriverOptionsfield to pass cable-driver-specific configuration.cableDriverOptionsand clarify that unsupported option keys are ignored.cableDriverOptionsis provided.