Chore: Overhaul Claude Code setup and join k3s nodes via the control-plane VIP #35
@@ -1,6 +1,6 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code when working anywhere in this repository. Each stack directory (`01-proxmox-infra`, `02-k8s-bootstrap`, etc.) has its own `CLAUDE.md` with stack-specific commands and architecture — Claude Code loads both this file and the stack's file automatically when working inside a stack directory.
|
||||
Repository-wide instructions. Each stack directory has its own `CLAUDE.md` with stack-specific commands and architecture.
|
||||
|
||||
## Project overview
|
||||
|
||||
@@ -36,21 +36,37 @@ A stack's outputs must exist (i.e. it must have been deployed) before any downst
|
||||
- **Secrets**: read via `config.requireSecret()`, never via environment variables or hardcoded values.
|
||||
- **`Pulumi.dev.yaml`**: gitignored (contains the encryption salt) — never delete it or secrets become unrecoverable. Encrypted with `PULUMI_CONFIG_PASSPHRASE`.
|
||||
- **Backend**: self-hosted Postgres state backend, set via `PULUMI_BACKEND_URL`.
|
||||
- Don't add a co-author when committing to git.
|
||||
|
||||
## Git conventions
|
||||
|
||||
Branch names, commit messages and PR titles follow @CONVENTIONS.md. Don't add a co-author when committing to git.
|
||||
|
||||
## Live infrastructure
|
||||
|
||||
- Don't change live systems (cluster, pfSense, Proxmox, VMs, my local kubeconfig) on your own initiative, even for small or reversible changes. Give me the exact steps and let me decide who runs them.
|
||||
- Code edits in the repo are fine without asking.
|
||||
- Never recreate VMs to apply a change. Write code for a clean fresh install, plus separate manual steps for the running cluster.
|
||||
|
||||
## Verifying changes
|
||||
|
||||
After editing a stack, run `npm run typecheck` in that stack's directory, then `pulumi preview`, and show the output of both. A passing typecheck only proves the code compiles; the preview is what shows which resources would be created, updated or replaced.
|
||||
|
||||
## Common commands (run from a stack directory)
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run typecheck
|
||||
pulumi preview
|
||||
pulumi up --yes
|
||||
pulumi destroy
|
||||
pulumi up --yes # run by the user or CI
|
||||
pulumi destroy # run by the user
|
||||
pulumi stack output
|
||||
pulumi config
|
||||
```
|
||||
|
||||
Requires `PULUMI_BACKEND_URL` and `PULUMI_CONFIG_PASSPHRASE` in the environment (or `pulumi login`).
|
||||
|
||||
Start Claude Code sessions from the repository root: the permission rules and the live-infra hook in `.claude/settings.json` only load from there.
|
||||
|
||||
## CI/CD (Gitea Actions)
|
||||
|
||||
One workflow per stack: `.gitea/workflows/0N-deploy-<stack>.yaml`, scoped to changes under that stack's directory.
|
||||
|
||||
Reference in new issue
Block a user