Add interlink.eu/mesh-network: disabled annotation to opt out of mesh networking per pod#491
Add interlink.eu/mesh-network: disabled annotation to opt out of mesh networking per pod#491
interlink.eu/mesh-network: disabled annotation to opt out of mesh networking per pod#491Conversation
✅ Deploy Preview for interlink-dev canceled.
|
Co-authored-by: dciangot <4144326+dciangot@users.noreply.github.com> Agent-Logs-Url: https://github.com/interlink-hq/interLink/sessions/73bd9971-c3d8-487b-99eb-339ad5764e71
interlink.eu/mesh-network: disabled annotation to opt out of mesh networking per pod
There was a problem hiding this comment.
Pull request overview
Adds a per-pod opt-out annotation to skip mesh networking setup when FullMesh is enabled globally, and documents the new behavior.
Changes:
- Introduces
interlink.eu/mesh-network: "disabled"annotation handling (isMeshNetworkingDisabled) and gates FullMesh-related setup/cleanup. - Updates documentation (current + v0.6.x) to describe the new annotation and how to use it.
- Removes dependency declarations from the
ci/Go module (go.mod/go.sum).
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/virtualkubelet/virtualkubelet.go | Adds annotation constant + helper and gates FullMesh setup/cleanup paths. |
| docs/versioned_docs/version-0.6.x/guides/13-mesh-network-configuration.mdx | Documents per-pod mesh opt-out for v0.6.x. |
| docs/versioned_docs/version-0.6.x/guides/09-pod-annotations.mdx | Adds annotation reference entry for v0.6.x. |
| docs/docs/guides/13-mesh-network-configuration.mdx | Documents per-pod mesh opt-out in current docs. |
| docs/docs/guides/09-pod-annotations.mdx | Adds annotation reference entry in current docs. |
| ci/go.mod | Removes all require directives (leaves only replace). |
| ci/go.sum | Clears all checksums (file becomes empty). |
Comments suppressed due to low confidence (1)
ci/go.mod:12
ci/go.modno longer has anyrequiredirectives andci/go.sumis now empty, but this module imports generated packages (/internal/dagger,/internal/querybuilder,/internal/telemetry) that are gitignored and typically bring in dependencies (e.g., GraphQL client + OTel). With this state, runningdagger call/go buildwill likely need to modify go.mod/go.sum to add back requirements; in environments that use-mod=readonly(or workflows that verify module files), this can fail. Suggest regenerating the Dagger Go SDK files (e.g.,dagger develop) and committing the resultinggo.mod/go.sumfrom ago mod tidy, or otherwise keeping the required dependency set in version control.
module dagger/interlink
go 1.24.0
replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.14.0
replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.14.0
replace go.opentelemetry.io/otel/log => go.opentelemetry.io/otel/log v0.14.0
replace go.opentelemetry.io/otel/sdk/log => go.opentelemetry.io/otel/sdk/log v0.14.0
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ading log Co-authored-by: dciangot <4144326+dciangot@users.noreply.github.com> Agent-Logs-Url: https://github.com/interlink-hq/interLink/sessions/c5f9af41-6f2d-47d3-ad99-49945b18578b
|
@Bianco95 i think we might want to make this into a new pre 0.6.1 |
|
@copilot please check this pr, and be sure it compiles and passes lint. Also check for conflicts and be careful in do not discard fieatures that are already in main. |
…n-disable-mesh-networking # Conflicts: # pkg/virtualkubelet/virtualkubelet.go Co-authored-by: dciangot <4144326+dciangot@users.noreply.github.com>
Merged |
|
Thanks, @copilot please take the occasion to fix that test as well. |
…SSRF loopback check on httptest servers Agent-Logs-Url: https://github.com/interlink-hq/interLink/sessions/61f01bab-82ad-4ce6-8a13-e68f32bc5ddb Co-authored-by: dciangot <4144326+dciangot@users.noreply.github.com>
Fixed in 1f1ff08. Both |
|
LGTM, one question @copilot is the network mesh opt-out also disabling the possibility of using the wstunnel port forwarding behavior? |
No — the opt-out only disables the FullMesh (WireGuard/subnet) layer, not wstunnel port forwarding. The two paths are kept separate at line 1564: if p.shouldCreateWstunnel(pod) || (p.config.Network.FullMesh && !isMeshNetworkingDisabled(pod)) {
|
|
lint/lint action is failing. fix it @copilot |
Extract setupVPNPodIP, setPodInitialStatus, handleRemoteExecutionFailure, and buildTerminatedContainerStatuses from CreatePod to reduce its cyclomatic complexity from 33 to 16, fixing the gocyclo lint failure (> 30 threshold). Agent-Logs-Url: https://github.com/interlink-hq/interLink/sessions/74849b64-b785-4795-83ac-128f68e22c08 Co-authored-by: dciangot <4144326+dciangot@users.noreply.github.com>
Fixed in 853fbc5. The
|
|
@Bianco95 ready to be merged and tested |
With
fullMeshenabled globally, there is no way to exclude individual pods from mesh networking. All offloaded pods unconditionally get WireGuard/wstunnel setup regardless of whether they need it.Changes
pkg/virtualkubelet/virtualkubelet.goannMeshNetworkDisabled = "interlink.eu/mesh-network"annotation constantisMeshNetworkingDisabled(pod)helper (case-insensitive"disabled"check)p.config.Network.FullMeshcall sites —createDummyPod,CreatePod,DeletePod— with&& !isMeshNetworkingDisabled(pod)to skip WireGuard keypair generation, wstunnel infrastructure creation/cleanup, and pod-subnet annotation injectionDocumentation
interlink.eu/mesh-networkentry to the Pod Annotations Reference (both current andv0.6.xversioned docs)Usage
When this annotation is present, the pod is offloaded without any mesh networking setup. All pods without the annotation continue to follow the global
fullMeshconfiguration.Original prompt
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.