Skip to content

fix(netbird): require explicit port in exposedAddress (#75)#79

Merged
mikkeldamsgaard merged 2 commits intomainfrom
issue-75-netbird-exposed-address
Apr 21, 2026
Merged

fix(netbird): require explicit port in exposedAddress (#75)#79
mikkeldamsgaard merged 2 commits intomainfrom
issue-75-netbird-exposed-address

Conversation

@mikkeldamsgaard
Copy link
Copy Markdown
Contributor

Fixes #75.

Summary

  • New Helm template validation (netbird.validate.exposedAddress) fails the install/upgrade with an actionable error when server.config.exposedAddress is set without an explicit port. NetBird clients build their gRPC dial target from this URL using Go's net/url parser, which fails with missing port in address when the port is absent — even when it would match the scheme default.
  • Updated README, values.yaml comment, and seed examples to use :443 explicitly, with a callout above the minimal-config examples explaining the requirement.
  • Updated three OIDC e2e values files (e2e-values-oidc-{embedded,keycloak,zitadel}.yaml) that previously used port-less https://netbird.localhost.
  • 6 new unit tests cover: rejects port-less https, rejects port-less http with path, accepts port + trailing slash, accepts bracketed IPv6 + port, accepts empty value, plus the existing rendering test updated to use :443.

Per CLAUDE.md rule #13, Chart.yaml version and artifacthub.io/changes are unchanged — those go through /release. The CHANGELOG Unreleased section has the user-facing entry.

Test plan

  • make lint — passes (2 charts)
  • make unittest — 198 netbird tests pass (6 new), 11 snapshots
  • make e2e-sqlite — PASS (chart deploys, PAT auth + peer registration)
  • make e2e-postgres — PASS
  • make e2e-mysql — PASS
  • make e2e-oidc-keycloak — PASS (uses updated port-included exposedAddress)
  • make e2e-oidc-zitadel — PASS
  • Manual fail-fast verification: helm template charts/netbird --set server.config.exposedAddress=https://netbird.example.com → errors with …must include an explicit port…

🤖 Generated with Claude Code

mikkeldamsgaard and others added 2 commits April 21, 2026 20:44
NetBird clients build their gRPC dial target from
server.config.exposedAddress using Go's net/url parser, which surfaces
"missing port in address" when no port is present (e.g.
"https://netbird.example.com"). The README example showed a port-less
URL, so users following it hit a confusing daemon error at first
connect.

Add a fail-fast Helm template validation that rejects port-less
exposedAddress values with an actionable error pointing at the right
form (e.g. "https://netbird.example.com:443"). Update README, values
comment, and seed examples to use ":443" explicitly. Update the three
OIDC e2e values files that previously used port-less localhost URLs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mikkeldamsgaard mikkeldamsgaard merged commit a0a8043 into main Apr 21, 2026
12 checks passed
@mikkeldamsgaard mikkeldamsgaard deleted the issue-75-netbird-exposed-address branch April 21, 2026 20:25
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.

Netbird: Wrong exposedAddress in example

1 participant