Commit Graph
286 Commits
Author SHA1 Message Date
micqdf ba6cf42c04 fix: restart kubelet during CRISocket recovery and add registration diagnostics
Terraform Plan / Terraform Plan (push) Successful in 16s
When kubeadm init fails at upload-config/kubelet due missing node object, explicitly restart kubelet to ensure bootstrap flags are loaded before waiting for node registration. Add kubelet flag dump and focused registration log output to surface auth/cert errors.
2026-03-04 18:37:50 +00:00
micqdf 3cd0c70727 fix: stop overriding kubelet config in kubeadm init
Terraform Plan / Terraform Plan (push) Successful in 17s
Remove custom KubeletConfiguration from init config so kubeadm uses default kubelet authn/authz settings and bootstrap registration path. This avoids the standalone-style kubelet behavior where the node never appears in the API.
2026-03-04 18:35:34 +00:00
micqdf d2dd6105a6 fix: recover from kubeadm CRISocket node-registration race
Terraform Plan / Terraform Plan (push) Successful in 17s
Handle kubeadm init failures where upload-config/kubelet runs before the node object exists. When that specific error occurs, wait for cp-1 registration and run upload-config kubelet phase explicitly instead of aborting immediately.
2026-03-04 03:00:34 +00:00
micqdf b3c975bd73 fix: use kubeadm v1beta4 list format for kubeletExtraArgs
Terraform Plan / Terraform Plan (push) Successful in 17s
kubeadm v1beta4 expects nodeRegistration.kubeletExtraArgs as a list of name/value args, not a map. Switch hostname-override to the correct structure so init config unmarshals successfully.
2026-03-04 02:00:07 +00:00
micqdf 308a2fd4b7 fix: hard reset kubelet identity before kubeadm init
Terraform Plan / Terraform Plan (push) Successful in 17s
Clear kubelet cert/bootstrap artifacts after reset and force hostname override in kubeadm nodeRegistration so the node consistently registers as cp-1 instead of inheriting stale template identity.
2026-03-04 01:35:41 +00:00
micqdf 0cc0de2aea fix: pin kubeadm init node identity to flake hostname
Terraform Plan / Terraform Plan (push) Successful in 17s
Set hostname before init and inject nodeRegistration.name into kubeadm InitConfiguration so cp-1 registers as the expected node (cp-1) instead of inheriting the template hostname. This fixes upload-config/kubelet failures caused by node lookup for k8s-base-template.
2026-03-04 01:17:44 +00:00
micqdf 422b7d7f23 fix: force fresh kubeadm init after rebuild and make kubelet enable-able
Terraform Plan / Terraform Plan (push) Successful in 17s
Always re-run primary init when reconcile performs node rebuilds to avoid stale/partial cluster state causing join preflight failures. Also add wantedBy for kubelet so systemctl enable works as expected during join/init flows.
2026-03-04 00:55:20 +00:00
micqdf 3ebeb121b4 fix: force fresh bootstrap stages after rebuild and stabilize join node identity
Terraform Plan / Terraform Plan (push) Successful in 17s
Clear completed bootstrap stage checkpoints whenever nodes are rebuilt so reconcile does not skip required init/cni/join work on fresh hosts. Also pass explicit --node-name for control-plane and worker joins, and ensure kubelet is enabled before join commands run.
2026-03-04 00:26:37 +00:00
micqdf b4265a649e fix: map SSH-discovered nodes by VMID when hostnames are generic
Terraform Plan / Terraform Plan (push) Successful in 16s
Some freshly cloned VMs still report template/generic hostnames during discovery. Probe DMI product serial over SSH and map it to Terraform VMIDs so cp-2/cp-3/wk-2 can be resolved even before hostname reconciliation.
2026-03-03 22:16:35 +00:00
micqdf 9ae8eb6134 fix: make SSH inventory discovery more reliable on CI
Terraform Plan / Terraform Plan (push) Successful in 16s
Increase default SSH timeout, reduce scan concurrency, and add a second slower scan pass to avoid transient misses on busy runners. Also print discovered hostnames to improve failure diagnostics when node-name matching fails.
2026-03-03 21:08:29 +00:00
micqdf a66ae788f6 fix: run Cilium install with sudo and explicit kubeconfig
Terraform Plan / Terraform Plan (push) Successful in 17s
Use sudo for helm/kubectl on cp-1 and pass /etc/kubernetes/admin.conf so controller can install Cilium without permission errors.
2026-03-03 08:55:22 +00:00
micqdf cbb8358ce6 fix: ensure kubelet is enabled for kubeadm init node registration
Terraform Plan / Terraform Plan (push) Successful in 17s
Enable kubelet before kubeadm init and stop forcing kubelet out of wantedBy so kubeadm can reliably register the node during upload-config/kubelet. Also clear stale kubelet config files during remote prep to avoid restart-loop leftovers.
2026-03-03 01:04:50 +00:00
micqdf a16112a87a fix: rebuild nodes by default on reconcile
Terraform Plan / Terraform Plan (push) Successful in 17s
Do not skip node rebuilds unless SKIP_REBUILD=1 is explicitly set. This prevents stale remote helper scripts from being reused across retries after bootstrap logic changes.
2026-03-03 00:34:55 +00:00
micqdf 51b56e562e fix: use valid kube-vip log flag value
Terraform Plan / Terraform Plan (push) Successful in 17s
kube-vip expects an unsigned integer for --log. Replace --log -4 with --log 4 so manifest generation no longer fails during bootstrap.
2026-03-03 00:25:25 +00:00
micqdf 6fecfb3ee6 refactor: add Python bootstrap controller with resumable state
Terraform Plan / Terraform Plan (push) Successful in 17s
Introduce a clean orchestration layer in nixos/kubeadm/bootstrap/controller.py and slim rebuild-and-bootstrap.sh into a thin wrapper. The controller now owns preflight, rebuild, init, CNI install, join, and verify stages with persisted checkpoints on cp-1 plus a local state copy for CI debugging.
2026-03-03 00:09:10 +00:00
micqdf 355273add5 fix: preserve kube-vip mount path and only swap hostPath to super-admin
Terraform Plan / Terraform Plan (push) Successful in 19s
The previous replacement changed both mountPath and hostPath, causing kube-vip to lose its expected in-container kubeconfig path and exit. Keep mountPath at /etc/kubernetes/admin.conf, swap only hostPath during bootstrap, and enable kube-vip debug log level.
2026-03-02 23:59:41 +00:00
micqdf 262e9eb4d7 fix: bootstrap kube-vip without leader election
Terraform Plan / Terraform Plan (push) Successful in 17s
Run first-control-plane kube-vip manifest without --leaderElection so VIP can bind before API/RBAC are fully available. Also print kube-vip container exit details on failure.
2026-03-02 23:28:44 +00:00
micqdf c445638d4a fix: run kube-vip in control-plane-only mode during bootstrap
Terraform Plan / Terraform Plan (push) Successful in 17s
Remove --services from kube-vip static pod manifests for init/join. Service LB mode can crash-loop during kubeadm bootstrap before cluster RBAC is ready, which prevented VIP binding.
2026-03-02 22:52:44 +00:00
micqdf 880bbcceca ci: speed up Terraform plan by skipping refresh in pipelines
Terraform Plan / Terraform Plan (push) Successful in 16s
Use terraform plan -refresh=false in plan/apply workflows to avoid slow Proxmox state refresh on every push. This keeps CI fast while preserving apply behavior from the generated plan.
2026-03-02 22:32:10 +00:00
micqdf 190dc2e095 fix: restore compatibility with older nixos-rebuild sudo flag
Terraform Plan / Terraform Plan (push) Has been cancelled
Use --use-remote-sudo in rebuild script since the runner's nixos-rebuild does not support --sudo yet.
2026-03-02 22:30:38 +00:00
micqdf a81799a2b5 fix: stabilize kubeadm bootstrap and reduce Proxmox plan latency
Terraform Plan / Terraform Plan (push) Has been cancelled
Move kubeadm reset ahead of kube-vip manifest generation, use super-admin.conf during bootstrap for kube-vip, and restore admin.conf after init. Also switch nixos-rebuild to --sudo and make QEMU guest agent optional so Terraform plan can skip slow guest-agent refreshes when it is not installed.
2026-03-02 22:09:10 +00:00
micqdf 46c0786e57 fix: run kube-vip daemon before kubeadm init
Terraform Plan / Terraform Plan (push) Successful in 10m8s
- Start kube-vip as a detached container to claim VIP before kubeadm init
- Wait for VIP to be bound before proceeding
- Generate static pod manifest for kube-vip
- Stop bootstrap kube-vip after API server is healthy (static pod takes over)
- Add kube-vip logs output if VIP fails to bind
2026-03-02 20:39:28 +00:00
micqdf 1af45ca51e fix: skip kubeadm wait-control-plane phase, wait for VIP manually
Terraform Plan / Terraform Plan (push) Has been cancelled
- Use --skip-phases=wait-control-plane to avoid 4-minute timeout
- Wait for kube-vip to bind VIP before checking API server health
- Add kube-vip logs and VIP status to debug output
2026-03-02 19:37:06 +00:00
micqdf 533f5a91e0 fix: add image pre-pull and debug output for kubeadm init
Terraform Plan / Terraform Plan (push) Has been cancelled
- Pre-pull k8s control plane images before init to speed up startup
- Add crictl pods and crictl ps -a output on failure for debugging
2026-03-02 18:35:41 +00:00
micqdf c061dda31d fix: disable webhook authz and clean stale kubelet configs
Terraform Plan / Terraform Plan (push) Has been cancelled
- Add authorization.mode: AlwaysAllow to KubeletConfiguration
- Remove stale kubelet config.yaml before unmasking in all kubeadm scripts
- This prevents 'no client provided, cannot use webhook authorization' error
2026-03-02 17:59:31 +00:00
micqdf fb21fbef4f fix: disable kubelet webhook auth in kubeadm init config
Terraform Plan / Terraform Plan (push) Has been cancelled
- Use explicit kubeadm config file with KubeletConfiguration
- Disable webhook authentication which was causing 'no client provided' error
- Add ConditionPathExists to kubelet systemd unit
2026-03-02 16:49:21 +00:00
micqdf 1b76e07326 fix: kubelet directories and containerd readiness
Terraform Plan / Terraform Plan (push) Has been cancelled
- Create /var/lib/kubelet and /var/lib/kubelet/pki directories via tmpfiles
- Ensure containerd is running before kubeadm init
- Add kubelet logs output on kubeadm init failure for debugging
2026-03-02 14:44:47 +00:00
micqdf db72dcab75 fix: remove kubelet ConditionPathExists, add daemon-reload
Terraform Plan / Terraform Plan (push) Has been cancelled
- Remove ConditionPathExists from kubelet service definition as it
  prevents kubelet from starting when managed by kubeadm
- Add systemctl daemon-reload after unmasking in all kubeadm scripts
- Add reset-failed for consistent state cleanup
2026-03-02 13:58:49 +00:00
micqdf d42e83358c fix: mask kubelet before rebuild, unmask in kubeadm helpers
Terraform Plan / Terraform Plan (push) Has been cancelled
- Mask kubelet service entirely before nixos-rebuild to prevent systemd
  from restarting it during switch
- Unmask kubelet in th-kubeadm-init/join scripts before starting
2026-03-02 12:44:40 +00:00
micqdf 93e43a546f fix: prevent kubelet auto-start during rebuild
Terraform Plan / Terraform Plan (push) Has been cancelled
Add wantedBy = [] to prevent kubelet from being started by multi-user.target
during nixos-rebuild switch. This allows rebuilds to succeed even when the
cluster is in a transitional state. Kubelet will be started by kubeadm
init/join commands instead.
2026-03-02 12:13:05 +00:00
micqdf ab5cc8b01d fix: disable lingering kubelet service before node rebuild
Terraform Plan / Terraform Plan (push) Has been cancelled
2026-03-02 10:08:27 +00:00
micqdf f65a414959 fix: stop auto-enabling kubelet during base node rebuild
Terraform Plan / Terraform Plan (push) Successful in 10m8s
2026-03-02 09:13:53 +00:00
micqdf 7c849ed019 fix: gate kubelet startup until kubeadm config exists
Terraform Plan / Terraform Plan (push) Has been cancelled
2026-03-02 08:39:22 +00:00
micqdf 388b0c4f5d fix: align kubelet systemd unit with kubeadm flags
Terraform Plan / Terraform Plan (push) Has been cancelled
2026-03-02 03:44:35 +00:00
micqdf d810547675 fix: ignore kubeadm HTTPProxyCIDR preflight in homelab workflow
Terraform Plan / Terraform Plan (push) Has been cancelled
2026-03-02 03:06:29 +00:00
micqdf 9426968cd4 fix: run kubeadm init/reset with clean environment
Terraform Plan / Terraform Plan (push) Has been cancelled
2026-03-02 02:36:57 +00:00
micqdf 02a6bca60b fix: harden kubeadm scripts for proxy and preflight issues
Terraform Plan / Terraform Plan (push) Has been cancelled
2026-03-02 02:02:38 +00:00
micqdf a098c0aa29 fix: avoid sudo env loss for kube-vip image reference
Terraform Plan / Terraform Plan (push) Successful in 10m8s
2026-03-02 01:27:44 +00:00
micqdf 9b03cec23e fix: correctly propagate remote command exit status
Terraform Plan / Terraform Plan (push) Successful in 10m7s
2026-03-02 00:52:24 +00:00
micqdf c794e07ab2 chore: trigger workflows
Terraform Plan / Terraform Plan (push) Successful in 10m7s
2026-03-02 00:18:10 +00:00
micqdf fd7be1a428 fix: require admin kubeconfig before skipping cp init
Terraform Plan / Terraform Plan (push) Successful in 10m8s
2026-03-01 23:42:56 +00:00
micqdf c0b820c92a Merge branch 'master' into stage
Terraform Plan / Terraform Plan (push) Waiting to run
2026-03-01 22:40:05 +00:00
micqdf f9e7356f94 fix: make cp-1 init detection and join token generation robust
Terraform Plan / Terraform Plan (push) Successful in 9m44s
2026-03-01 21:56:59 +00:00
micqdf 27185ed17a Merge pull request 'fix: recover when admin kubeconfig is missing on primary control plane' (#72) from stage into master
Terraform Apply / Terraform Apply (push) Successful in 19m30s
Reviewed-on: #72
2026-03-01 21:30:33 +00:00
micqdf 9baf35d886 Merge branch 'master' into stage
Terraform Plan / Terraform Plan (push) Successful in 10m7s
2026-03-01 21:30:28 +00:00
micqdf a5f0f0a420 fix: recover when admin kubeconfig is missing on primary control plane
Terraform Plan / Terraform Plan (push) Successful in 10m7s
2026-03-01 20:58:44 +00:00
micqdf 310d273378 Merge pull request 'fix: use admin kubeconfig for final cluster node check' (#71) from stage into master
Terraform Apply / Terraform Apply (push) Successful in 19m16s
Reviewed-on: #71
2026-03-01 20:38:17 +00:00
micqdf 661fbc2ff4 fix: use admin kubeconfig for final cluster node check
Terraform Plan / Terraform Plan (push) Successful in 10m7s
2026-03-01 20:31:57 +00:00
micqdf 3b0219f211 Merge pull request 'feat: add SSH-based fallback for kubeadm IP inventory' (#70) from stage into master
Terraform Apply / Terraform Apply (push) Successful in 20m6s
Reviewed-on: #70
2026-03-01 20:07:55 +00:00
micqdf 3fa227d7c9 feat: add SSH-based fallback for kubeadm IP inventory
Terraform Plan / Terraform Plan (push) Successful in 10m7s
2026-03-01 19:28:15 +00:00