Skip to content

feat(agent): add --host-ip flag for remote K8s cluster support#155

Merged
Defilan merged 1 commit intomainfrom
feat/agent-host-ip
Feb 20, 2026
Merged

feat(agent): add --host-ip flag for remote K8s cluster support#155
Defilan merged 1 commit intomainfrom
feat/agent-host-ip

Conversation

@Defilan
Copy link
Member

@Defilan Defilan commented Feb 20, 2026

Summary

  • Add --host-ip flag to the Metal Agent CLI for specifying an explicit IP address to register in Kubernetes endpoints
  • When set, the provided IP is used instead of auto-detecting via host.minikube.internal / host.docker.internal
  • Enables running the Metal Agent on a separate machine from the K8s cluster (e.g. Mac Studio over Tailscale)
  • Add tests for the new resolveHostIP behavior and explicit host IP endpoint registration

Test plan

  • All 27 agent tests pass (go test ./pkg/agent/ -v)
  • TestResolveHostIP_Explicit verifies explicit IP is returned
  • TestResolveHostIP_AutoDetect verifies fallback when empty
  • TestRegisterEndpoint_ExplicitHostIP verifies the IP appears in created Endpoints
  • GOOS=darwin GOARCH=arm64 go build ./cmd/metal-agent compiles cleanly
  • CI pipeline passes

Closes #154

Add a --host-ip flag to the Metal Agent that allows specifying an
explicit IP address to register in Kubernetes endpoints. This enables
running the Metal Agent on a separate machine from the K8s cluster
(e.g. Mac Studio with Metal GPU connected to a remote cluster over
Tailscale). When omitted, the existing auto-detection behavior via
host.minikube.internal / host.docker.internal is preserved.

Closes #154

Signed-off-by: Christopher Maher <chris@mahercode.io>
@Defilan Defilan merged commit b425569 into main Feb 20, 2026
15 checks passed
@Defilan Defilan deleted the feat/agent-host-ip branch February 20, 2026 09:17
@github-actions github-actions bot mentioned this pull request Feb 20, 2026
@github-actions github-actions bot mentioned this pull request Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(agent): add --host-ip flag for remote K8s cluster support

1 participant