Add test cases for init container failures, mesh network opt-out, and wstunnel port-forward connectivity with CI setup#19
Conversation
…out annotation Agent-Logs-Url: https://github.com/interlink-hq/vk-test-set/sessions/4199da12-3c5d-4fd7-9075-1d6a5650aef8 Co-authored-by: dciangot <4144326+dciangot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/interlink-hq/vk-test-set/sessions/569d3a50-0f59-43ed-a491-ceab94d96572 Co-authored-by: dciangot <4144326+dciangot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/interlink-hq/vk-test-set/sessions/569d3a50-0f59-43ed-a491-ceab94d96572 Co-authored-by: dciangot <4144326+dciangot@users.noreply.github.com>
|
@copilot try to setup locally an environment with network mesh. use traefik native k3s ingress. for the wildcard dns, consider using docker host ip together with nip.io wildcard. |
Agent-Logs-Url: https://github.com/interlink-hq/vk-test-set/sessions/06bae7e2-b996-439f-a3be-804ba8bd7eb9 Co-authored-by: dciangot <4144326+dciangot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/interlink-hq/vk-test-set/sessions/06bae7e2-b996-439f-a3be-804ba8bd7eb9 Co-authored-by: dciangot <4144326+dciangot@users.noreply.github.com>
Done in commit
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
spec:
entryPoints: [web]
routes:
- match: Host(`{{.Name}}-{{.Namespace}}.{{.WildcardDNS}}`)The hostname pattern matches exactly what the VK writes into the
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Adds E2E coverage for three behaviors: failing init containers, per-pod mesh networking opt-out (interlink-hq/interLink#522), and wstunnel port-forward connectivity. Also adds a self-contained CI/local environment to run the mesh network test against a real k3s + Traefik + interLink stack.
New templates
120-failing-init-container.yaml— pod with a failing init container; asserts pod reachesFailedand init container logs are accessible. Confirms the main container is never started.125-mesh-network-opt-out.yaml— pod annotated withinterlink.eu/mesh-network: disabled; asserts the pod still completes successfully, confirming the opt-out path doesn't break execution.130-mesh-network.yaml— end-to-end wstunnel port-forward test. Creates three resources:containerPort: 9999declared (triggersinterlink.eu/wstunnel-client-commandsannotation setup). Port 9999 is used deliberately — port 8080 is wstunnel's own WebSocket control port and cannot be reused as a reverse-tunnel port on the same process.PONGresponseValidates both pods reach terminal/running state and the client receives a response from the server, proving the full tunnel path is functional.
CI / local environment setup
scripts/setup-mesh-env.sh— fully self-contained setup script that:--disable=traefik) so the TraefikIngressRouteCRD is available172.17.0.1) and constructsWildcardDNS = <ip>.nip.io— Docker containers reach k3s Traefik via that address on port 80virtual-kubelet_Linux_x86_64binary from the latest interLink releaseNetwork.EnableTunnel: true,Network.WildcardDNS, and a customWstunnelTemplatePathscripts/wstunnel-traefik-template.yaml— custom wstunnel infrastructure template replacing the default nginxIngresswith a TraefikIngressRouteCRD. RoutesHost({{.Name}}-{{.Namespace}}.{{.WildcardDNS}}), matching the hostname the VK encodes in theinterlink.eu/wstunnel-client-commandsannotation.scripts/run-mesh-tests.sh— generatesvktest_config_mesh.yaml, installs vk-test-set in a venv, and runspytest.scripts/cleanup-mesh-env.sh— stops the VK process, removes Docker containers, and uninstalls k3s..github/workflows/integration-tests.yaml— GitHub Actions workflow (path-filtered tovktestset/**,scripts/**,.github/workflows/**) that runs setup → test → cleanup with artifact upload on failure.Notes
125and130together cover both branches of the mesh networking decision: opt-out (no tunnel) vs. active wstunnel path.Podrather than aJobto stay compatible with the framework's exact-name pod lookup inCheckPod.execute.125template merges the cluster-providedannotationsdict with the opt-out annotation using Jinja2'sdict()+update()side-effect pattern (thedoextension is unavailable in the plainEnvironmentused by the test runner).