Chore: Overhaul Claude Code setup and join k3s nodes via the control-plane VIP #35

Merged
claude-bot Bot merged 9 commits from chore/overhaul-claude-code-setup into main 2026-11-20 22:14:59 +01:00

k8s-bootstrap

  • Nodes join and the exported kubeconfig points at the control-plane VIP (pfSense + HAProxy) instead of master-1's IP. Not applied to the live cluster yet: 02 deploys only via manual dispatch, and the live masters still need the TLS SAN added by hand.
  • Decision record and runbook in docs/.

Claude Code setup

  • Permissions: reads run freely, live changes, commits and pushes ask; secrets, kubeconfig and token edits are denied.
  • Hooks: live-infra guard (PreToolUse), typecheck before finishing (Stop), commit-msg check in .githooks/.
  • .claude/scripts/gitea.sh for PRs as claude-bot.
  • /stack-review and /explain-diff skills.
  • CLAUDE.md files trimmed to what the code doesn't show.

Docs

  • README: 6 VMs on three hosts, Longhorn 2 replicas, current config keys.

Merging touches 03-05 (CLAUDE.md only), so their workflows will run pulumi refresh + pulumi up. Check the previews on this PR first.

## k8s-bootstrap - Nodes join and the exported kubeconfig points at the control-plane VIP (pfSense + HAProxy) instead of master-1's IP. Not applied to the live cluster yet: 02 deploys only via manual dispatch, and the live masters still need the TLS SAN added by hand. - Decision record and runbook in `docs/`. ## Claude Code setup - Permissions: reads run freely, live changes, commits and pushes ask; secrets, kubeconfig and token edits are denied. - Hooks: live-infra guard (PreToolUse), typecheck before finishing (Stop), commit-msg check in `.githooks/`. - `.claude/scripts/gitea.sh` for PRs as `claude-bot`. - `/stack-review` and `/explain-diff` skills. - CLAUDE.md files trimmed to what the code doesn't show. ## Docs - README: 6 VMs on three hosts, Longhorn 2 replicas, current config keys. Merging touches `03`-`05` (CLAUDE.md only), so their workflows will run `pulumi refresh` + `pulumi up`. Check the previews on this PR first.
claude-bot Bot added 9 commits 2026-11-20 21:50:06 +01:00
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.
Gives Claude and CI a pass/fail check that does not need the Pulumi backend.
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.
The guard hook only sees shell commands, so file edits to live systems
(like the local kubeconfig) need a written rule.
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.
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.
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.
docs: correct cluster size, Longhorn replicas and config keys in README
Deploy Proxmox Infra / Pulumi Deploy (pull_request) Skipped
Deploy k8s Bootstrap / Bootstrap k3s Cluster (pull_request) Skipped
Deploy k8s Infra / Pulumi Deploy (pull_request) Skipped
Deploy k8s Apps / Pulumi Deploy (pull_request) Skipped
Deploy Monitoring / Pulumi Deploy (pull_request) Skipped
Deploy Proxmox Infra / Pulumi Preview (pull_request) Successful in 2m15s
Deploy k8s Bootstrap / Pulumi Preview (pull_request) Successful in 37s
Deploy k8s Infra / Pulumi Preview (pull_request) Successful in 48s
Deploy k8s Apps / Pulumi Preview (pull_request) Successful in 39s
Deploy Monitoring / Pulumi Preview (pull_request) Successful in 39s
739e0ff111
claude-bot Bot merged commit 481ff9e7ac into main 2026-11-20 22:14:59 +01:00
claude-bot Bot deleted branch chore/overhaul-claude-code-setup 2026-11-20 22:14:59 +01:00
Sign in to join this conversation.