feat: configure metallb

This commit is contained in:
2025-12-22 19:53:54 -08:00
parent 559746134c
commit 3302b71a39
5 changed files with 32 additions and 20 deletions

View File

@@ -1,2 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources: resources:
- ./longhorn/ingress.yaml - ./metallb/pool.yaml

View File

@@ -1,18 +0,0 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: longhorn-frontend
namespace: longhorn-system
spec:
rules:
- host: longhorn.local
http:
paths:
- path: /
pathType: Exact
backend:
service:
name: longhorn-frontend
port:
number: 80

View File

@@ -0,0 +1,17 @@
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: pool
namespace: metallb-system
spec:
addresses:
- 192.168.x.x
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: pool
namespace: metallb-system
spec:
ipAddressPools:
- pool

View File

@@ -35,7 +35,6 @@
extraFlags = toString [ extraFlags = toString [
"--write-kubeconfig-mode \"0644\"" "--write-kubeconfig-mode \"0644\""
"--disable servicelb" "--disable servicelb"
# "--disable local-storage"
]; ];
}; };

11
nix/homelab/update-node.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -e
HOST="$1"
if [ -z "$HOST" ]; then
echo "Usage: $0 <ip-or-hostname>"
exit 1
fi
ssh "$HOST" "cd ~/dotfiles && git pull && sudo nixos-rebuild switch --flake ~/dotfiles/nix/homelab --impure"