flux-operator + FluxInstance instead of the patched install.yaml (c1) #22

Closed
opened 2026-11-11 21:46:07 +00:00 by ginjiruu · 2 comments
Owner

Part of lab/machine-configs#7. Do this as part of #14 (the c1 rebuild).

Why

modules/k3s/flux.nix installs Flux from the pinned release install.yaml and patches the text:

  • a Python filter strips the bundle's NetworkPolicies (they crash-looped every controller under Cilium, vm:e2e 2026-11-02)
  • since b939e24 (#11), a sed rewrites the hardcoded .svc.cluster.local for clusters with cluster.zone set. Without it, kustomize-controller can't resolve source-controller.

The flux-operator (controlplaneio-fluxcd) with a FluxInstance resource turns both into settings: spec.cluster.domain, and charts that ship without those NetworkPolicies. It also gives an upstream-supported upgrade path, with no bundle parsing at render time. This was deferred in docs/niki-nixos-k3s-study.md ("redesign of fluxRootManifest mid-migration"). c1 is a fresh cluster with no Flux to migrate, so that reason no longer applies.

What

  • Bootstrap flux-operator + a FluxInstance from the k3s manifests dir for c1, with cluster.domain = c1.caosh.int.animeteamspeak.moe.
  • Keep the sync source (lab/clusters, clusters/<cluster>) and the sops-age secret handling as they are.
  • Prove it on test-01 first (zone test.caosh.int.animeteamspeak.moe).
  • Remove the cluster.local sed and the NetworkPolicy filter once no cluster uses the bundle path.

Done when

  • vm:e2e green with test-01 on flux-operator + FluxInstance
  • c1 bootstraps Flux this way at #14
  • bundle text-patching in flux.nix gone, or left only for clusters not yet moved
Part of lab/machine-configs#7. Do this as part of #14 (the c1 rebuild). ## Why `modules/k3s/flux.nix` installs Flux from the pinned release `install.yaml` and patches the text: - a Python filter strips the bundle's NetworkPolicies (they crash-looped every controller under Cilium, vm:e2e 2026-11-02) - since b939e24 (#11), a `sed` rewrites the hardcoded `.svc.cluster.local` for clusters with `cluster.zone` set. Without it, kustomize-controller can't resolve source-controller. The flux-operator (controlplaneio-fluxcd) with a `FluxInstance` resource turns both into settings: `spec.cluster.domain`, and charts that ship without those NetworkPolicies. It also gives an upstream-supported upgrade path, with no bundle parsing at render time. This was deferred in `docs/niki-nixos-k3s-study.md` ("redesign of fluxRootManifest mid-migration"). c1 is a fresh cluster with no Flux to migrate, so that reason no longer applies. ## What - Bootstrap flux-operator + a `FluxInstance` from the k3s manifests dir for c1, with `cluster.domain = c1.caosh.int.animeteamspeak.moe`. - Keep the sync source (lab/clusters, `clusters/<cluster>`) and the sops-age secret handling as they are. - Prove it on test-01 first (zone `test.caosh.int.animeteamspeak.moe`). - Remove the `cluster.local` sed and the NetworkPolicy filter once no cluster uses the bundle path. ## Done when - [ ] vm:e2e green with test-01 on flux-operator + FluxInstance - [ ] c1 bootstraps Flux this way at #14 - [ ] bundle text-patching in flux.nix gone, or left only for clusters not yet moved
Author
Owner

e236c68 on main: cluster.fluxInstaller = bundle | operator (flux-operator 0.62.1 + FluxInstance with cluster.domain from the zone, networkPolicy false; our GitRepository/Kustomization tail kept for sparse ignore + SOPS). test-01 on operator: full vm:e2e green 2026-11-11 (flux controllers rendered by the operator, podinfo delivered, Cilium adopted). Fleet unchanged (bundle default). Box 1 done, box 3 done for now (bundle path left only for the old think cluster); box 2 closes when c1 bootstraps this way at #14.

e236c68 on main: cluster.fluxInstaller = bundle | operator (flux-operator 0.62.1 + FluxInstance with cluster.domain from the zone, networkPolicy false; our GitRepository/Kustomization tail kept for sparse ignore + SOPS). test-01 on operator: full vm:e2e green 2026-11-11 (flux controllers rendered by the operator, podinfo delivered, Cilium adopted). Fleet unchanged (bundle default). Box 1 done, box 3 done for now (bundle path left only for the old think cluster); box 2 closes when c1 bootstraps this way at #14.
Author
Owner

Done: c1 bootstrapped Flux via flux-operator + FluxInstance (cluster.domain c1.caosh...) at #14, 2026-11-12. Bundle path remains only as the option default for clusters not yet moved.

Done: c1 bootstrapped Flux via flux-operator + FluxInstance (cluster.domain c1.caosh...) at #14, 2026-11-12. Bundle path remains only as the option default for clusters not yet moved.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
lab/machine-configs#22
No description provided.