Commit Graph
15 Commits
Author SHA1 Message Date
kacerrandClaude Opus 5.5 81462e0e0f lab1: pin cilium-operator to the control plane; Step 5 verified
Re-check of lab1 after Steps 4-5 (inspector on lab-mgmt, read-only gets
on lab1):
- Cluster/KCP/MD Available for 13h; no controller errors since bootstrap.
- All six autoscaler annotations on lab1-workers (copied to the
  MachineSet). spec.replicas has no owner: kubectl-client-side-apply owns
  only clusterName/selector/template, so re-applying lab1.yaml won't
  fight cluster-autoscaler.
- Nodes Ready on v1.35.9; Node/Machine providerIDs match.
- Cilium, envoy and CoreDNS healthy. No PDBs in the cluster.

Found: cilium-operator (replicas: 1) was scheduled onto the only worker.
It is a non-DaemonSet kube-system pod without a PDB, so with CA's default
skip-nodes-with-system-pods=true the last worker could never scale to
zero (Step 7). The chart already tolerates the control-plane taint, so a
nodeSelector on node-role.kubernetes.io/control-plane pins it there.

- configs/cilium/values.yaml: operator.nodeSelector.
- phase-1 doc: Step 5 ticked, Step 4 explains why replicas: 1 isn't
  enough, new troubleshooting row.
- Session note extended with the re-check.

Not applied yet: the owner runs helm upgrade with the new values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 09:23:41 +02:00
kacerrandClaude Opus 5.5 49c548e296 cluster-inspector: read-only kubeconfig for lab1, workload-aware triage
The agent could only reach lab-mgmt, so it couldn't verify nodes, CNI or
system pods on lab1. It correctly refused the admin ~/.kube/lab1.kubeconfig
when the owner's permission was relayed through the main session.

Workload kubeconfigs:
- make-kubeconfig.sh: new --capi-cluster [NS/]NAME. --admin-kubeconfig
  is then the management cluster. The workload admin kubeconfig is read
  from Secret NS/NAME-kubeconfig into a mktemp file, removed on exit, so
  no admin file for the workload cluster lands on disk.
- ansible/mgmt.yml --tags inspector now also mints kubeconfigs for every
  cluster in the new inspector_workload_clusters (group_vars: lab1).
  Clusters without a <name>-kubeconfig Secret are skipped. The tag is now
  the single weekly token refresh; tasks stay changed_when: false, so the
  playbook's changed=0 rule still holds.
- Owner ran --tags inspector: kubeconfigs/lab1.kubeconfig (lab1-ro)
  minted, can-i checks as expected.

Agent prompt:
- Cluster map: what to inspect on lab-mgmt vs the workload cluster.
  Machine -> Node -> VM via nodeRef, providerID and
  ProxmoxMachine.spec.virtualMachineID (checked on live objects).
- New triage step: scale-down blockers (non-DaemonSet kube-system pods
  without PDB, local storage, bare pods, PDBs at 0, safe-to-evict /
  scale-down-disabled).
- Refuses admin kubeconfigs even when a caller relays permission; points
  the owner to --tags inspector on missing file or 401.
- Verb before --kubeconfig so commands match the kubectl get/describe/logs
  allow rules; single-quote jsonpath/custom-columns for zsh.
- Report format: abnormal first, then health summary, then unverified.

settings.json: allow kubectl describe/logs/events and clusterctl describe.
All four are read-only, and the RO kubeconfigs enforce read-only anyway.

Checked: bash -n on the script; ansible-playbook --syntax-check and
ansible-lint --profile production pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 09:23:41 +02:00
kacerrandClaude Opus 5.5 1d0b669d07 lab1: autoscaler min/max and capacity annotations on lab1-workers (Step 5)
kubectl diff against the live cluster shows only the six annotations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 11:26:55 +02:00
kacerrandClaude Opus 5.5 9fb8a8dcc1 Phase-1 Step 4 done: Cilium up, lab1 Available
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 11:25:47 +02:00
kacerrandClaude Opus 5.5 2c793da4f6 Cilium values file for lab1; runbook Step 4 uses helm upgrade --install
ipam.mode=kubernetes, operator.replicas=1 (default 2 would pin one on a
worker and block scale-to-zero). Keys checked against chart 1.20.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 11:16:04 +02:00
kacerrandClaude Opus 5.5 6d552ebf33 lab1 provisioned: fix IPAddress kubectl name, inspector CRD read, review notes
- runbook + inspector agent: ipaddresses.ipam.cluster.x-k8s.io (plain
  `ipaddresses` is the built-in networking.k8s.io type on k8s 1.35)
- inspector RBAC: get/list CRDs so clusterctl describe works read-only
- phase-1 Step 3 ticked; session note with the first lab1 review

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 11:14:11 +02:00
kacerrandClaude Opus 5.5 57f58f1fc5 Add lab1 workload cluster manifest; workers sized 4 vCPU / 4 GiB
Generated with clusterctl v1.12.11 + the six runbook edits (pod CIDR,
kube-vip v1.2.4, no qcow2, VLAN 4, worker size, no MD replicas); passes
server-side dry run. Inflate test pods lowered to 1Gi to stay CPU-bound,
capacity annotation 4Gi, decision #15.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 10:54:44 +02:00
kacerrandClaude Opus 5.5 d8efa3b961 Document Ansible-built management cluster (plan step 4)
Phase-1 Step 2 rewritten around ansible/mgmt.yml and cluster-api-operator,
version pins for operator/cert-manager/cloud image, decisions #12-14,
execution log and changelog. Phase-1 Step 2 checked off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 10:41:03 +02:00
kacerrandClaude Opus 5.5 aaa1ed64e2 Use data instead of stringData for capmox-variables Secret
stringData is never stored, so kubectl apply reported "configured" on
every run and the capi play was never changed=0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 10:35:26 +02:00
kacerrandClaude Opus 5.5 0592608850 Record step 2 of mgmt cluster plan; widen inspector read-only RBAC
Inspector role can now read operator Provider CRs, k3s HelmCharts and nodes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 10:28:30 +02:00
kacerrandClaude Opus 5.5 605d6ebf0d Accept cloud-init rc 2 (recoverable errors) in the k3s play
PVE's cloud-init user-data triggers a deprecation warning that makes
`cloud-init status --wait` exit 2 even though provisioning succeeded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 09:40:28 +02:00
kacerrandClaude Opus 5.5 bfc0a9e15d Fix mgmt VM nameserver argument; record first vm run
mgmt_dns is a list, passed to qm create as one space-separated argument.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 09:31:57 +02:00
kacerrandClaude Opus 5.5 66d61b21fc Add Ansible playbook for the management cluster (step 1)
VM from Ubuntu cloud image on pv1-1, pinned k3s, cert-manager and
cluster-api-operator via k3s HelmChart CRs, CAPI providers as operator CRs,
kubeconfig fetch + cluster-inspector kubeconfig. Lint passes (production).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 01:02:50 +02:00
kacerrandClaude Opus 5.5 ac7d5a45b9 Add plan: idempotent management cluster (Ansible + cluster-api-operator)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 00:58:57 +02:00
kacerrandClaude Opus 5.5 5fd998c5f9 Initial import: phase docs, configs, Claude conventions
Phase 1-3 runbooks and design notes, version pins, config templates,
project-history conventions, cluster-inspector read-only credentials setup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 00:58:52 +02:00