From 4cc04147a2a2dd38798d183895dafc2ed7c49ce3 Mon Sep 17 00:00:00 2001 From: Keith Jackson Date: Mon, 17 Aug 2026 07:34:31 -0500 Subject: [PATCH] fix(k3s): disable local-storage so Longhorn is the sole default StorageClass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The deployed cluster has TWO default StorageClasses — k3s's built-in local-path AND longhorn — which is ambiguous for PVCs without an explicit class. Longhorn (ADR-0003) is the cluster storage, so add local-storage to k3s --disable. Effective on fresh installs (the k3s install task is idempotent → no restart of the running cluster); the running dev cluster keeps both defaults harmlessly (all platform PVCs pin storageClassName: longhorn). Rebuilds get a single default. Co-Authored-By: Claude Opus 4.8 (1M context) --- infra/ansible/roles/k3s_server/defaults/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/infra/ansible/roles/k3s_server/defaults/main.yml b/infra/ansible/roles/k3s_server/defaults/main.yml index 1d26380..716c388 100644 --- a/infra/ansible/roles/k3s_server/defaults/main.yml +++ b/infra/ansible/roles/k3s_server/defaults/main.yml @@ -11,7 +11,11 @@ k3s_install_script: "/usr/local/bin/k3s-install.sh" # Components disabled at install so Cilium + Gateway API own networking (ADR-0001/0002). # flannel + kube-proxy + network-policy are disabled via dedicated flags below; # traefik + servicelb via --disable. -k3s_disable: "traefik,servicelb" +# local-storage: k3s ships local-path as a DEFAULT StorageClass, which collides with Longhorn's +# default (two default SCs = ambiguous PVC binding). Longhorn (ADR-0003) is the cluster's storage, +# so disable k3s local-path entirely → `longhorn` is the sole default. (Effective on fresh installs; +# the k3s install task is idempotent, so this does not restart an existing cluster — see DECISIONS-LOG.) +k3s_disable: "traefik,servicelb,local-storage" # Set per-play: 'primary' (runs --cluster-init) or 'secondary' (joins the primary). k3s_server_mode: "secondary"