feat(k8s): map compose service ports to Kind extraPortMappings and support hostNetwork #993

Open
AFDudley wants to merge 2 commits from fix/k8s-port-mappings-hostnetwork into main
Owner

_generate_kind_port_mappings now reads ports from compose services and
adds them to Kind's extraPortMappings with correct protocol handling
(TCP/UDP). Previously only ports 80/443 for Caddy were mapped, so
application ports like Solana gossip/RPC were unreachable from the host.

Also adds hostNetwork support: when any compose service declares
network_mode: host, the K8s pod spec gets hostNetwork: true and
dnsPolicy: ClusterFirstWithHostNet. This is required for workloads
like Solana validators that need direct host networking for UDP
gossip and TPU protocols.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

_generate_kind_port_mappings now reads ports from compose services and adds them to Kind's extraPortMappings with correct protocol handling (TCP/UDP). Previously only ports 80/443 for Caddy were mapped, so application ports like Solana gossip/RPC were unreachable from the host. Also adds hostNetwork support: when any compose service declares network_mode: host, the K8s pod spec gets hostNetwork: true and dnsPolicy: ClusterFirstWithHostNet. This is required for workloads like Solana validators that need direct host networking for UDP gossip and TPU protocols. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
AFDudley added 1 commit 2026-03-03 04:06:36 +00:00
feat(k8s): map compose service ports to Kind extraPortMappings and support hostNetwork
Some checks failed
Lint Checks / Run linter (pull_request) Failing after 2m23s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m36s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 6m2s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Failing after 7m36s
Webapp Test / Run webapp test suite (pull_request) Successful in 8m39s
Smoke Test / Run basic test suite (pull_request) Successful in 7m32s
9c5511ac5d
_generate_kind_port_mappings now reads ports from compose services and
adds them to Kind's extraPortMappings with correct protocol handling
(TCP/UDP). Previously only ports 80/443 for Caddy were mapped, so
application ports like Solana gossip/RPC were unreachable from the host.

Also adds hostNetwork support: when any compose service declares
network_mode: host, the K8s pod spec gets hostNetwork: true and
dnsPolicy: ClusterFirstWithHostNet. This is required for workloads
like Solana validators that need direct host networking for UDP
gossip and TPU protocols.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
AFDudley added 1 commit 2026-03-03 04:12:32 +00:00
refactor(k8s): extract _any_service_has_host_network to fix C901 complexity
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 5m1s
Deploy Test / Run deploy test suite (pull_request) Successful in 7m58s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 8m32s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Failing after 9m13s
Webapp Test / Run webapp test suite (pull_request) Successful in 9m30s
Smoke Test / Run basic test suite (pull_request) Successful in 9m8s
4d63448e7c
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
AFDudley force-pushed fix/k8s-port-mappings-hostnetwork from 4d63448e7c to fbaa2eaa71 2026-03-03 04:39:13 +00:00 Compare
AFDudley added 1 commit 2026-03-03 04:52:12 +00:00
fix(webapp): replace next experimental-compile with next build
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 2m7s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m34s
Webapp Test / Run webapp test suite (pull_request) Failing after 7m16s
Smoke Test / Run basic test suite (pull_request) Successful in 8m41s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 8m49s
15fa52227b
experimental-compile was removed in Next.js 14+. The functionality was
merged into the standard build command.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
AFDudley added 1 commit 2026-03-03 04:58:04 +00:00
add local test runner script
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 3m27s
Deploy Test / Run deploy test suite (pull_request) Successful in 7m4s
Webapp Test / Run webapp test suite (pull_request) Failing after 7m1s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 9m12s
Smoke Test / Run basic test suite (pull_request) Successful in 7m12s
5197c57119
Creates a temporary venv, installs shiv, builds the laconic-so package,
and runs any test script in isolation. Cleans up on exit.

Usage: ./tests/scripts/run-test-local.sh tests/webapp-test/run-webapp-test.sh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
AFDudley force-pushed fix/k8s-port-mappings-hostnetwork from 5197c57119 to f305214ce1 2026-03-03 05:29:05 +00:00 Compare
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 2m17s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m1s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 5m14s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Failing after 6m49s
Webapp Test / Run webapp test suite (pull_request) Successful in 7m51s
Smoke Test / Run basic test suite (pull_request) Successful in 8m5s
This pull request has changes conflicting with the target branch.
  • stack_orchestrator/deploy/k8s/cluster_info.py

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/k8s-port-mappings-hostnetwork:fix/k8s-port-mappings-hostnetwork
git checkout fix/k8s-port-mappings-hostnetwork
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/stack-orchestrator#993
No description provided.