Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions apps/netbird/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ metadata:
secrets.infisical.com/auto-reload: "true"
spec:
replicas: 1
# hostPort 3478 と RWO の PVC を新旧 Pod で共有できないので Recreate。
# RWO の PVC を新旧 Pod で共有しないので Recreate。
strategy:
type: Recreate
selector:
Expand Down Expand Up @@ -90,13 +90,6 @@ spec:
ports:
- name: http
containerPort: 80
# STUN は UDP なのでゲートウェイを通せない。ノードの IP に直接出す。
# インターネットから届かせるにはルータで UDP 3478 を 10.0.0.2 に転送する必要がある
# (無くても relay 経由で通信自体は成立する。直接 P2P にならないだけ)。
- name: stun
containerPort: 3478
hostPort: 3478
protocol: UDP
readinessProbe:
# 公式インストーラが起動判定に使っているのと同じ口(内蔵 IdP が答えられる = 一通り上がっている)
httpGet:
Expand Down
3 changes: 1 addition & 2 deletions apps/netbird/namespace.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# PSA は privileged。理由: STUN(UDP 3478)の hostPort が baseline に通らない(STUN は Gateway を通せない。
# https://docs.netbird.io/selfhosted/external-reverse-proxy)。一覧と背景は docs/talos.md「PSA のラベル」。
# PSA は privileged。理由: routing peer の hostPort(WireGuard の 51820)と NET_ADMIN が baseline に通らない。一覧と背景は docs/talos.md「PSA のラベル」。
apiVersion: v1
kind: Namespace
metadata:
Expand Down
8 changes: 5 additions & 3 deletions apps/netbird/server-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ data:
listenAddress: ":80"
# ピアが実際に繋ぎに来るアドレス。relay の rels:// URL もここから作られる。
exposedAddress: "https://nb.doany.io:443"
# 内蔵 STUN。リバースプロキシを通せない(UDP なので)ため hostPort でノードに直接出す。
stunPorts:
- 3478
# STUN は外のもの(Cloudflare)を使い、内蔵の STUN は止める(`stuns` を書くと止まる)。
# 内蔵だと WAN 側のアドレスに問い合わせることになり、クラスタの中のピア(routing peer)からは
# ルーターで折り返さず届かない。届かないと IPv4 の P2P の候補を出せず relay に落ちる(2026-10-18)
stuns:
- uri: "stun:stun.cloudflare.com:3478"
metricsPort: 9090
healthcheckAddress: ":9000"
logLevel: "info"
Expand Down
2 changes: 1 addition & 1 deletion docs/decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ v0.65.0 から management/signal/relay が 1 つの combined コンテナなの

- **gRPC と HTTP が同じホスト名・同じポートに混在する。** gRPC のサービスを GRPCRoute に、`/api` `/oauth2` `/relay` `/ws-proxy` を
HTTPRoute に、残りをダッシュボードに振った。GRPCRoute なら Cilium が backend を h2c 扱いするので Gateway の設定を触らない
- **STUN(UDP 3478)はリバースプロキシを通せない**ので hostPort。namespace の PSA が `privileged` なのはこのため
- **STUN は外のもの(Cloudflare)を使う。** 内蔵だとクラスタの中の routing peer から WAN 側に届かず、IPv4 の P2P に落ちる
- **`livenessProbe` は付けない。** healthcheck は `localhost:9000` にしか bind されない
- **外部 IdP(Entra)は設定ファイルに書けない**(0.62 以降はストアに入るデータ)。ダッシュボードか `POST /api/identity-providers` で足す。
リダイレクト URI は `https://nb.doany.io/oauth2/callback` 固定
Expand Down
1 change: 0 additions & 1 deletion docs/router.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ DMZ の向け先を変えると、下の全部と AdGuard の split-horizon が
| 80 / 443 TCP | Gateway(全部の Web) | 要る |
| 53 UDP・TCP / 853 TCP | AdGuard Home(DNS / DoT) | 開けている(下の「53 番は外にも開けている」) |
| 8443 UDP・TCP | LiveKit(Matrix の通話。apps/matrix/README.md) | 要る |
| 3478 UDP | NetBird の STUN(apps/netbird/) | 要る |
| 51820 UDP | NetBird の routing peer(WireGuard) | 要る |
| 3129 TCP | 3proxy の TLS 口(apps/3proxy/) | 外から使うなら要る |
| 6443 TCP | Kubernetes の API(`ks.doany.io:6443`。recovery/README.md) | 要る(認証つき) |
Expand Down
2 changes: 1 addition & 1 deletion docs/talos.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ curl -X POST --data-binary @schematic.yaml https://factory.talos.dev/schematics
| --- | --- |
| `kube-system` | Cilium(privileged・hostNetwork・hostPath・SYS_ADMIN/NET_ADMIN・hostPort)。**Talos の側で例外にしてある** |
| `local-path-storage` | ヘルパー Pod の hostPath。[`talos/manifests/local-path.yaml`](../talos/manifests/local-path.yaml) がラベルを付ける |
| `netbird` | hostPort 3478(内蔵 STUN。UDP なのでゲートウェイを通せない)・51820、NET_ADMIN 等、hostPath |
| `netbird` | hostPort 51820(routing peer の WireGuard)、NET_ADMIN 等、hostPath |
| `denpa` | privileged・hostPath(`/dev/dvb`・`/dev/bus`・`/dev/dri`)、PT3 を付け直す DaemonSet([apps/pt3/](../apps/pt3/))。**ラベルは denpa リポジトリの `deploy/namespace.yaml`** にあり、gitops だけを grep すると抜けて見える |
| `adguardhome` | hostPort 53 / 853 |
| `matrix` | hostPort 8443(LiveKit) |
Expand Down
Loading