docs: trim CLAUDE.md files to what the code doesn't show
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.
This commit is contained in:
1 parent
5cd50c31ff
commit
897813a916
6 files changed
+26
-208
No files matched your search
+4
-44
@@ -1,46 +1,6 @@
|
||||
# k8s-infra
|
||||
|
||||
Cluster-level infrastructure for the k3s homelab cluster, deployed via Helm and `@pulumi/kubernetes`. Reads `kubeconfig` from `k8s-bootstrap` via StackReference.
|
||||
|
||||
## Common Commands
|
||||
|
||||
```bash
|
||||
npm install
|
||||
pulumi refresh --yes && pulumi up --yes
|
||||
```
|
||||
|
||||
CI installs the `helm` CLI (`azure/setup-helm`) before running Pulumi.
|
||||
|
||||
## Architecture
|
||||
|
||||
| Component | What it does |
|
||||
| --- | --- |
|
||||
| NFS CSI Driver | `csi-driver-nfs` Helm chart — enables NFS-backed PVCs |
|
||||
| `truenas-nfs` StorageClass | Backed by an NFS share on TrueNAS (`Retain` reclaim policy) |
|
||||
| cert-manager | Certificate lifecycle management |
|
||||
| `letsencrypt-prod` ClusterIssuer | DNS-01 via Cloudflare, issues Let's Encrypt TLS certs |
|
||||
| Longhorn | Default block storage (`longhorn` StorageClass, 2 replicas) — used by app/monitoring PVCs. Worker nodes get an extra `longhorn-extra` disk at `/mnt/longhorn-extra` (a dedicated mount set up by `k8s-bootstrap`, patched onto the Longhorn `Node` CR here) so Longhorn data stays off the root disk and doesn't cause `DiskPressure`. `nodeDownPodDeletionPolicy` deletes both the StatefulSet and Deployment pod on node-down so stateful workloads reschedule automatically |
|
||||
| kube-vip | DaemonSet that ARP-announces a virtual IP for LoadBalancer Services |
|
||||
| kube-vip-cloud-provider | Allocates LoadBalancer IPs from a single-address pool (`kubeVipAddress`) — k3s's built-in ServiceLB is not used |
|
||||
| `traefik` ServicePatch | Pins Traefik's LoadBalancer IP to `kubeVipAddress` |
|
||||
|
||||
**Export**: `nfsStorageClass = "truenas-nfs"`.
|
||||
|
||||
## Required Pulumi config
|
||||
|
||||
```bash
|
||||
pulumi config set --secret truenasHost <truenas-ip>
|
||||
pulumi config set --secret truenasNfsPath /mnt/pool/k8s
|
||||
pulumi config set --secret cloudflareApiToken <cf-token>
|
||||
pulumi config set --secret letsencryptEmail <your-email>
|
||||
pulumi config set --secret kubeVipAddress <vip-ip>
|
||||
pulumi config set kubeVipInterface <e.g. eth0>
|
||||
```
|
||||
|
||||
`kubeconfig` is read automatically via StackReference — do not set it here.
|
||||
|
||||
The TrueNAS dataset and NFS share must exist before deploying; they are created by hand, see [the runbook](../docs/runbooks/truenas-nfs.md).
|
||||
|
||||
## CI/CD
|
||||
|
||||
Workflow: `../.gitea/workflows/03-deploy-k8s-infra.yaml`. Secret: `K8S_INFRA_PULUMI_DEV_YAML`.
|
||||
- **k3s's built-in ServiceLB is not used.** kube-vip ARP-announces LoadBalancer VIPs, and kube-vip-cloud-provider allocates them from a single-address pool (`kubeVipAddress`). Traefik's LoadBalancer IP is pinned to that address.
|
||||
- **Longhorn stays off the root disk.** Worker nodes get an extra `longhorn-extra` disk at `/mnt/longhorn-extra` (mounted by `k8s-bootstrap`, registered on the Longhorn `Node` CR here) to avoid `DiskPressure`. `nodeDownPodDeletionPolicy` deletes StatefulSet and Deployment pods on node-down so stateful workloads reschedule.
|
||||
- The TrueNAS dataset and NFS share are created by hand before deploying, see [the runbook](../docs/runbooks/truenas-nfs.md).
|
||||
- Needs the `helm` CLI; CI installs it with `azure/setup-helm`.
|
||||
Reference in new issue
Block a user