The key is only needed during bootstrap, but it stayed on every node with
passwordless sudo. A final step now removes it once all SSH steps are done.
Needs the ciRunnerPublicKey output from proxmox-infra, so deploy that first.
Also moves the repeated start, SSH-wait and join commands into helpers.
Resource names are unchanged, so nothing re-runs on the live cluster.
A VM rather than an LXC: jobs run in Docker, and Docker in an LXC needs
nesting + keyctl. The runner holds the Proxmox, pfSense and Pulumi
credentials, so it gets its own kernel. The Ansible node gets a key used
only for this VM, so its access can be revoked on its own.
Turns on the Helm chart's snapshot CronJob. It logs in with Kubernetes auth and uploads with an upload-only RustFS key, so it can't read or delete backups. Its own pruning is off because it would need delete access; object lock and RustFS lifecycle rules handle retention.
The install flags only apply to fresh installs, because existing install
commands ignore changes. The running cluster was encrypted by hand with
the steps in the runbook.
Traefik verifies OpenBao's certificate against the internal CA. Helm doesn't wait for readiness because the pods stay sealed until they are unsealed by hand.
The new provider adds takeOwnership: false to the Longhorn, cert-manager
and NFS CSI releases, so deploying this runs a Helm upgrade for each one
with the same chart versions and values.
The new provider adds takeOwnership: false to the kube-prometheus-stack
release, so deploying this runs a Helm upgrade with the same chart
version and values.
Keep the Proxmox provider at 8.2.1. Version 8.7.0 plans in-place updates
to all six k3s VMs and the Ansible container, and protect doesn't block
in-place updates.
Nothing in this stack imports @pulumi/kubernetes. Its dependencies
caused the stack's last npm audit findings, and updating it to 4.35.0
wouldn't have fixed them.
Clear the critical and high npm audit findings. Keep provider versions
unchanged: @pulumi/kubernetes 4.35.0 makes the k8s-infra preview update
the Longhorn, cert-manager and NFS CSI Helm releases, and it doesn't fix
the remaining moderate findings. Provider updates will be separate.
Keeps the encrypted config versioned in git instead of copying it into a base64 CI secret after every change. Monitoring goes first as a trial before the other stacks move.
The import options fail on a fresh cluster, where the namespace and Helm release do not exist yet. Protect both resources instead, and update the rebuild runbook because clearing protected state requires --force.
A normal pulumi up can't rebuild the cluster: bootstrap commands run once, the later stacks' state describes the old cluster, and monitoring's import options fail on a fresh one.
Deploys depended on master-1 being up. A fixed clusterIdentifier lets the provider move to the VIP as an update, because Pulumi otherwise treats a new API address as a different cluster and replaces every resource. The identifier was added to the stack state first so this change does not itself trigger a replacement.
Deploys depended on master-1 being up. A fixed clusterIdentifier lets the provider move to the VIP as an update, because Pulumi otherwise treats a new API address as a different cluster and replaces every resource. The identifier was added to the stack state first so this change does not itself trigger a replacement.
Deploys depended on master-1 being up. A fixed clusterIdentifier lets the provider move to the VIP as an update, because Pulumi otherwise treats a new API address as a different cluster and replaces every resource. The identifier was added to the stack state first so this change does not itself trigger a replacement.
The Proxmox API token has admin rights but was sent with TLS verification off and, like the k3s token, was visible in process arguments. Verify each host against its public CA in certs/ and pass both tokens outside the command line.
Fetch the k3s installer from the pinned release tag so the script cannot change independently of the version. The new environment and stdin inputs are ignored so they do not re-run commands on live nodes.
k8s-bootstrap now exports the control-plane VIP while these stacks have master-1 stored in state. Pulumi treats the new server address as a different cluster and plans to replace the provider and every resource under it, including Longhorn and PVCs. Ignore kubeconfig changes on the provider so the stacks keep their stored connection.
A changed node IP or SSH key could re-run the unpinned k3s installer on live nodes, so ignore connection changes and pin k3s to the version the cluster runs.
Several steps reported success without reaching the desired state: a failed Longhorn mount fell through to the root disk, any HTTP error passed the VIP check, and VM start errors were swallowed. Each step now checks its outcome. mkfs only runs when blkid reports an empty disk, and package installs wait for cloud-init.
Any file under .gitea/workflows triggered pulumi up on 03, 04 and 05, so
adding an unrelated workflow would deploy all three. PR previews still
watch the whole folder.
Pin the bridge and pfSense provider versions so local SDK generation
matches the deployed state. The regenerated SDK requires a newer
@pulumi/pulumi, which updates the lockfile.
Prepare the stack for deploying on merge. Protect templates, DHCP mappings
and the Ansible container, and stop in-place updates from rebooting k3s VMs.
Bootstrap commands used VM IDs as triggers, so renumbering VMs would re-run the unpinned k3s installer on every node and append duplicate fstab entries. Treat them as run-once and re-run them explicitly after recreating a VM. Also start master-2 through pve-esprimo, where it now lives.
The Pulumi bridge applies the provider's internal default for the disk speed block, but Proxmox stores nothing when no limit is set, so every preview shows a change that can never settle. Ignore the field per disk because the wildcard form is reported not to work with this provider.
Orphaned replica data and a large snapshot left no room for a second Prometheus replica, so the volume faulted when its only replica failed. Clean up orphans and system snapshots, trim volumes daily, and lower the free-space reserve to 10% because longhorn-extra is a dedicated disk. Align the UI default with the StorageClass at 3 replicas so volumes keep two copies during a node reboot.
The Longhorn UI has no login of its own and can delete volumes, so it is only reachable through a Traefik basicAuth middleware. Credentials come from the new longhornUiUser/longhornUiPassword config secrets; the hostname uses the new domain config.
Default 300s not-ready/unreachable tolerations kept the pod bound to a dead node for ~5 min. Lower both to 30s, and switch to Recreate so a single-replica RWO pod never waits on a Multi-Attach during rollouts. Verified by stopping worker-2: pod running on worker-3 ~2 min later.
The existing Deployment's defaulted rollingUpdate block was removed once with kubectl patch so the API server accepts Recreate.
Without a version every pulumi up installed the newest chart, so any merge touching 03-k8s-infra silently upgraded cert-manager. Pinned to v1.21.1, the version running in the cluster; upgrades now happen on purpose.
Following the Claude Code memory docs: drop architecture lists, generic commands and CI details Claude can read from the code, keep the reasons behind decisions, and fix the outdated provider and pfSense SDK statements.
Claude committed after a yes that was only meant for an edit, and once edited the local kubeconfig on its own. Commits now prompt, and kubeconfig/token edits are denied or prompt instead of relying on CLAUDE.md alone.
Rules in CLAUDE.md can be forgotten; hooks can't. Reads are now free,
live changes still ask, and PRs go through the claude-bot account since
gh doesn't work with Gitea.
The pfSense and TrueNAS procedures are for people, so they no longer load as Claude context. The stack CLAUDE.md files keep only what the code cannot show.
Live-infrastructure commands were pre-approved in a local allowlist. Deploys, cluster mutations and SSH now always prompt, and a PreToolUse hook catches the same commands when they are wrapped.
Every join and the exported kubeconfig previously pointed at master1Ip,
so losing master-1 cut off API access even with etcd quorum intact. Use
controlPlaneVipAddress (a pfSense IP Alias fronted by HAProxy across all
three masters) instead, add it as a TLS SAN on master-1, and wait for
the VIP's /healthz before any other node joins.
The VIP is set up manually on pfSense rather than via a second
kube-vip/ARP VIP: API access is too critical to depend on the same
failover mechanism that serves LoadBalancer Services.
Also strips trailing whitespace from the Longhorn disk mount script.
Provider, image download, and template were three separate consts per
physical node with matching lookups scattered through nodeConfigs -
easy to update one and miss another when adding a node. Folded them
into one pveNodes pipeline (seed data -> provider -> image -> template)
and had nodeConfigs reference a host row instead of copying its fields.
Also folds in two fixes discovered while bringing up worker-3, now
inseparable from the restructuring above:
- disable the default physical CD-ROM passthrough (cdrom: fileId "none")
that failed VM start on nodes without an optical drive
- shorten the qemu-agent timeout from the 15m default so refresh/read
fails fast instead of hanging
qemu-guest-agent isn't present in the stock Ubuntu Noble cloud image,
which was causing pulumi refresh on proxmox-infra to block up to 15m
per VM waiting for agent data that never arrives.
Wires the k8s-bootstrap join sequence (start, SSH wait, k3s agent join,
Longhorn disk mount) and the k8s-infra Longhorn disk patch for worker-3.
Its VM was already provisioned by proxmox-infra in an earlier branch.