WIP: harbor (Update): pull from the internal harbor name - stage 2, needs node DNS first #1770

Closed
ginjiruu wants to merge 1 commit from harbor-internal-pulls into main
Owner

Stage 2 of the DNS cutover audit. Do not merge until the node-side preconditions below are done. Stage 1 is lab/clusters#1769 (with lab/iac#179).

The problem

#1759 made Harbor internal-only, which matches your public list in #1749. Nothing that pulls from or pushes to Harbor was moved:

  • harbor.animeteamspeak.moe still resolves (Cloudflare wildcard, 70.26.10.82), but no listener serves it, so TLS fails (curl rc=35).
  • harbor.apps.caosh.int.animeteamspeak.moe works from the LAN (401 on /v2/, lab-CA TLS OK), but no node can resolve it. mini-01 uses 8.8.8.8 1.1.1.1 and the c1 nodes use 1.1.1.1 8.8.8.8 (read from a hostNetwork pod's /etc/resolv.conf). Publicly the name is NOERROR with no answer.

Running workloads that pull harbor.animeteamspeak.moe/library/* and live only off the node cache (IfNotPresent): authz-bridge-system/authz-bridge-bridge-0, discord/fxtwitterbot, the tofu-controller branch-planner, the glmocr CronJob, and every tf-runner pod (harbor-config and the three routeros stacks). Image GC, a new tag or a new node turns any of them into ImagePullBackOff, and for tf-runner that stops all Terraform applies.

Pull-through cache: c1's containerd mirrors docker.io/quay/ghcr/gcr through harbor.animeteamspeak.moe (machine-configs registryMirror.host default). Upstream is the fallback, so pulls still work, uncached and exposed to Docker Hub rate limits.

This PR

Repoints, to harbor.apps.caosh.int.animeteamspeak.moe:

  • the tf-runner image in clusters/mini/iac/{harbor-config,routeros-crs309,routeros-rb5009-a,routeros-rb5009-b}.yaml
  • the branch-planner image in generic-templates/tofu-controller/values.yaml
  • bootstrap/configs/registries.yaml.j2 (the mirror template the runbook copies to nodes)

Merged today, this changes nothing for the better: the pods would ask for a name the node can't resolve. It's ready for when the preconditions hold.

Preconditions (each needs your decision or hands)

  1. mini-01 resolves caosh.int.animeteamspeak.moe. It's hand-managed Arch, and I have no SSH. Split DNS keeps public names off the c1 resolver, which is the lesson from the 10.10.1.53 bootstrap incident (machine-configs docs/bringup-2026-11-01.md). With systemd-resolved, add a link or global DNS=10.30.100.53 + Domains=~caosh.int.animeteamspeak.moe, keeping the public servers as default route. Check: resolvectl query harbor.apps.caosh.int.animeteamspeak.moe gives 10.10.6.40.
  2. mini-01 trusts the lab root, so containerd verifies Harbor's lab-CA cert. Arch: trust anchor --store lab-root.crt (the same root as machine-configs pki/root.crt). Alternatively, give containerd a ca_file in registries.yaml configs: for the host.
  3. mini-01 /etc/rancher/rke2/registries.yaml: rename the configs: key (auth) and mirror endpoints from harbor.animeteamspeak.moe to the internal name, as in this PR's registries.yaml.j2, then restart rke2 (single node, so a short control-plane blip).
  4. Pull test before merging: crictl pull harbor.apps.caosh.int.animeteamspeak.moe/library/tf-runner:v0.16.6-lab.1 on mini-01.
  5. c1 (optional, the cache only): machine-configs registryMirror.host default to the internal name, plus split DNS on the thinks/Pis. NixOS already trusts the lab root (modules/base.nix). The node nameservers are 1.1.1.1/8.8.8.8 by design (modules/network.nix comment), so this is a design call. I didn't open a machine-configs PR because changing fleet resolvers rolls out unattended through comin on merge.

Also still on the old name (other repos, not changed)

  • lab/automation: Taskfile.yml (oci://harbor.animeteamspeak.moe/helm), ci/harbor-push.yaml, k8s/ci/harbor-push.yaml and k8s/ci/build-workflow.yaml (library/tools:latest). CI image pushes fail until these move. The build pods run on mini, so after this PR's preconditions they resolve through the coredns caosh.int forward (#1767) but also need the lab CA in their trust (the same initContainer trick as harbor-config in #1765).
  • authz-bridge, fxtwitter-discord-bot and glmocr manifests live outside this repo (authz-bridge is Flux KS authz-bridge from its own repo).
  • Pull secrets dockerhub-pullthrough in monitoring, teamspeak and vm are keyed to harbor.animeteamspeak.moe.
  • Your workstation ~/.docker/config.json auth is for the old name: docker login harbor.apps.caosh.int.animeteamspeak.moe once (arch-ws already resolves and trusts it).

After merge

kubectl --context mini -n flux-system get terraform: each object runs a plan, and the runner pod starts with the new image (kubectl -n flux-system get pods -o jsonpath='{..image}'). Ready with "Plan no changes" means it worked.

**Stage 2 of the DNS cutover audit. Do not merge until the node-side preconditions below are done.** Stage 1 is lab/clusters#1769 (with lab/iac#179). ## The problem #1759 made Harbor internal-only, which matches your public list in #1749. Nothing that pulls from or pushes to Harbor was moved: - `harbor.animeteamspeak.moe` still resolves (Cloudflare wildcard, 70.26.10.82), but no listener serves it, so TLS fails (curl rc=35). - `harbor.apps.caosh.int.animeteamspeak.moe` works from the LAN (401 on `/v2/`, lab-CA TLS OK), **but no node can resolve it**. mini-01 uses `8.8.8.8 1.1.1.1` and the c1 nodes use `1.1.1.1 8.8.8.8` (read from a hostNetwork pod's `/etc/resolv.conf`). Publicly the name is NOERROR with no answer. Running workloads that pull `harbor.animeteamspeak.moe/library/*` and live only off the node cache (IfNotPresent): `authz-bridge-system/authz-bridge-bridge-0`, `discord/fxtwitterbot`, the tofu-controller branch-planner, the `glmocr` CronJob, and every tf-runner pod (harbor-config and the three routeros stacks). Image GC, a new tag or a new node turns any of them into ImagePullBackOff, and for tf-runner that stops all Terraform applies. Pull-through cache: c1's containerd mirrors docker.io/quay/ghcr/gcr through `harbor.animeteamspeak.moe` (machine-configs `registryMirror.host` default). Upstream is the fallback, so pulls still work, uncached and exposed to Docker Hub rate limits. ## This PR Repoints, to `harbor.apps.caosh.int.animeteamspeak.moe`: - the tf-runner image in `clusters/mini/iac/{harbor-config,routeros-crs309,routeros-rb5009-a,routeros-rb5009-b}.yaml` - the branch-planner image in `generic-templates/tofu-controller/values.yaml` - `bootstrap/configs/registries.yaml.j2` (the mirror template the runbook copies to nodes) Merged today, this changes nothing for the better: the pods would ask for a name the node can't resolve. It's ready for when the preconditions hold. ## Preconditions (each needs your decision or hands) 1. **mini-01 resolves `caosh.int.animeteamspeak.moe`.** It's hand-managed Arch, and I have no SSH. Split DNS keeps public names off the c1 resolver, which is the lesson from the 10.10.1.53 bootstrap incident (machine-configs `docs/bringup-2026-11-01.md`). With systemd-resolved, add a link or global `DNS=10.30.100.53` + `Domains=~caosh.int.animeteamspeak.moe`, keeping the public servers as default route. Check: `resolvectl query harbor.apps.caosh.int.animeteamspeak.moe` gives 10.10.6.40. 2. **mini-01 trusts the lab root**, so containerd verifies Harbor's lab-CA cert. Arch: `trust anchor --store lab-root.crt` (the same root as machine-configs `pki/root.crt`). Alternatively, give containerd a `ca_file` in `registries.yaml` `configs:` for the host. 3. **mini-01 `/etc/rancher/rke2/registries.yaml`**: rename the `configs:` key (auth) and mirror endpoints from `harbor.animeteamspeak.moe` to the internal name, as in this PR's `registries.yaml.j2`, then restart rke2 (single node, so a short control-plane blip). 4. Pull test before merging: `crictl pull harbor.apps.caosh.int.animeteamspeak.moe/library/tf-runner:v0.16.6-lab.1` on mini-01. 5. **c1 (optional, the cache only)**: machine-configs `registryMirror.host` default to the internal name, plus split DNS on the thinks/Pis. NixOS already trusts the lab root (`modules/base.nix`). The node `nameservers` are 1.1.1.1/8.8.8.8 by design (`modules/network.nix` comment), so this is a design call. I didn't open a machine-configs PR because changing fleet resolvers rolls out unattended through comin on merge. ## Also still on the old name (other repos, not changed) - `lab/automation`: `Taskfile.yml` (`oci://harbor.animeteamspeak.moe/helm`), `ci/harbor-push.yaml`, `k8s/ci/harbor-push.yaml` and `k8s/ci/build-workflow.yaml` (`library/tools:latest`). CI image pushes fail until these move. The build pods run on mini, so after this PR's preconditions they resolve through the coredns caosh.int forward (#1767) but also need the lab CA in their trust (the same initContainer trick as harbor-config in #1765). - authz-bridge, fxtwitter-discord-bot and glmocr manifests live outside this repo (authz-bridge is Flux KS `authz-bridge` from its own repo). - Pull secrets `dockerhub-pullthrough` in `monitoring`, `teamspeak` and `vm` are keyed to `harbor.animeteamspeak.moe`. - Your workstation `~/.docker/config.json` auth is for the old name: `docker login harbor.apps.caosh.int.animeteamspeak.moe` once (arch-ws already resolves and trusts it). ## After merge `kubectl --context mini -n flux-system get terraform`: each object runs a plan, and the runner pod starts with the new image (`kubectl -n flux-system get pods -o jsonpath='{..image}'`). Ready with "Plan no changes" means it worked.
Author
Owner

Superseded: Harbor serves its public name again (see the harbor-public PR), so node configs and image refs stay on harbor.animeteamspeak.moe. Closing.

Superseded: Harbor serves its public name again (see the harbor-public PR), so node configs and image refs stay on harbor.animeteamspeak.moe. Closing.
ginjiruu closed this pull request 2026-11-21 01:40:55 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.