Put fider under Flux, alongside ArgoCD - #52
jacksonloper wants to merge 6 commits into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Puts one app under Flux so the migration mechanics can be exercised on
something whose failure costs nothing. fider is served publicly but is not
reachable from the product -- the bettervoting frontend and backend contain no
reference to it -- so it is the one app where getting this wrong is free.
Purely additive and inert. ArgoCD cannot see flux/: the ApplicationSet
generator globs applications/**/config.json and bootstrap-cluster syncs
path: applications. Nothing here activates until someone runs flux bootstrap,
and this does not remove the fider config.json files -- that is the cutover,
and it is a separate change.
Chart versions are pinned to the revisions ArgoCD runs today, and the
HelmRelease values parse identically to applications/fider{,-db}/values.yaml,
so adoption should produce a no-op helm upgrade. The values comments recording
the lingua-go memory measurements and the single-instance PDB/drain problem are
carried over verbatim.
flux/README.md documents the cutover, and flags that removing any app from the
ApplicationSet currently cascade-deletes its data: preserveResourcesOnDeletion
is unset, both Applications carry resources-finalizer, and the live fider PV
reclaim policy is Delete. The Retain applied after the August CNPG incident
covers the previous volume, not the one in use since the 08-29 rebuild.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MeFy2jujRA8ScQqRAshc1f
Verified by fetching a token from gitlab.com/jwt/auth with no credentials, listing all tags, and pulling the manifests for both 0.11.0 (fider) and 0.8.2 (star-server, alaska-rcv, discord-bot). No imagePullSecret is needed, so the HelmRepository no longer references one. Correspondingly, README no longer treats registry access as the prerequisite most likely to block the migration. The real exposure is continuity rather than access: the chart is a generic in-house app wrapper shared by four apps, and be16440 records it has already been relocated once, "migrated from the now-deprecated dedevsecops org". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MeFy2jujRA8ScQqRAshc1f
The Flux path no longer pulls a third-party application chart. flux/base/app is the four objects devopscoop/charts/app renders -- ServiceAccount, Service, Deployment, Ingress -- as plain manifests, with flux/apps/fider as the overlay. More idiomatic under Flux, which is kustomize-native, and self-contained. Verified with `kubectl kustomize flux/apps/fider` against the live cluster. The Deployment selector, container name, image, serviceAccountName, env, resources and ports; the Service selector and ports; and the entire Ingress spec all render identical to what is running. Keeping the label app.kubernetes.io/name: app is deliberate -- it is half of the live Deployment's immutable selector. The overlay adds app.kubernetes.io/instance: fider via `labels` with includeSelectors: true, reproducing the selector exactly rather than forcing a delete/recreate. Adoption will cause one pod rollout: the rendered template drops three Helm bookkeeping labels (helm.sh/chart, app.kubernetes.io/managed-by, app.kubernetes.io/version), changing the pod-template hash. Documented so it is expected rather than debugged. fider-db stays a HelmRelease on the upstream CloudNativePG chart -- a real upstream rather than an in-house wrapper, and it preserves the Helm-adoption rehearsal that postgresql and keycloak will need. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MeFy2jujRA8ScQqRAshc1f
main bumped both charts since this branch was cut: app 0.11.0 -> 0.11.1 and cnpg cluster 0.7.0 -> 0.8.1. The HelmRelease pinned 0.7.0, which would no longer have been a no-op adoption. fider also re-synced on 2026-09-09 under chart 0.11.1, so the earlier "verified against live" claim needed redoing. Re-rendered with `kubectl kustomize flux/apps/fider` against the current cluster: Deployment selector, container name, image, serviceAccountName, env, resources and ports; Service selector and ports; and the whole Ingress spec still match what is running. The 0.11.1 patch did not change the rendered output for these values, so flux/base/app is unaffected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MeFy2jujRA8ScQqRAshc1f
53c6fe1 to
7b16372
Compare
Without this, `flux bootstrap` immediately starts reconciling fider while ArgoCD still owns those objects -- the exact overlap this README says never to allow. Suspended, bootstrapping is safe on its own and validates the Flux resources against a real Flux without touching anything. Resuming becomes the cutover, taken only after the ArgoCD Applications are gone, and reversible with `flux suspend`. README now carries the full six-step chain and the ordering constraints. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MeFy2jujRA8ScQqRAshc1f
Records the ordering constraints explicitly: the deletion-safety PR must land before any config.json is removed, this scaffold must be on main before bootstrap can reconcile it, and ArgoCD must be detached before Flux resumes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MeFy2jujRA8ScQqRAshc1f
|
So, yeah, after discussing with Claude, I'm still of the opinion that flux is the end goal, but it's by a pretty paper thin margin. I don't want to install flux and argocd in the same cluster - that will be too resource intensive and potentially dangerous if they both try to manage the same objects. I think we should close this PR, and we should come up with a plan to build a new cluster with flux at some point in the future. If you want to put a deadline on that, we can discuss it at the next meeting. |
Puts one app under Flux, next to the ArgoCD config it would eventually replace.
Merging this changes nothing
ArgoCD cannot see
flux/:applicationsApplicationSet generator globsapplications/**/config.jsonbootstrap-clusterApplication syncspath: applicationsBoth are scoped to
applications/, so this directory is invisible to it. Nothing activates until someone runsflux bootstrap. This PR also does not removeapplications/fider/config.jsonorapplications/fider-db/config.json— that is the cutover, and it is deliberately a separate change.Why fider
It is served publicly at
feedback.prod.equal.vote(returns 200) but is not reachable from the product —grep -rn 'fider\|feedback\.prod' packages/frontend/src packages/backend/srcin the bettervoting repo returns nothing. It is the one app where a migration mistake costs nothing.Which is an argument for using it to rehearse the hard path rather than dodge it. It happens to exercise three of the four blockers in
bvflux/MIGRATION.md:postgresql,keycloakargocd-controllerThe third blocker — the
devopscoopchart — is gone from this path entirely. See below.What's in it
No third-party app chart
flux/base/appreplacesdevopscoop/charts/app— the same four objects (ServiceAccount, Service, Deployment, Ingress) as a kustomize base, withflux/apps/fideras the overlay. Kustomize-native is the idiomatic shape under Flux anyway, and it makes this path self-contained.Verified with
kubectl kustomize flux/apps/fideragainst the live cluster (re-run 2026-09-10, after fider re-synced under chart 0.11.1). The Deployment selector, container name, image,serviceAccountName,env,resourcesandports; the Service selector and ports; and the entire Ingress spec all render identical to what is running.Two design notes:
app.kubernetes.io/name: appis kept on purpose. It's half of the live Deployment's selector, and selectors are immutable — dropping it would force a delete/recreate. The overlay addsapp.kubernetes.io/instance: fiderthroughlabelswithincludeSelectors: true, reproducing{app.kubernetes.io/name: app, app.kubernetes.io/instance: fider}exactly.helm.sh/chart,app.kubernetes.io/managed-by,app.kubernetes.io/version), which changes the pod-template hash. Harmless for fider; flagged so it's expected rather than debugged.fider-dbstays a HelmRelease on the upstream CloudNativePG chart — a real upstream rather than an in-house wrapper, and keeping it preserves the Helm-adoption rehearsalpostgresqlandkeycloakwill need.Chart revisions match
config.jsonexactly (cluster0.8.1), and the HelmReleasespec.valuesparse identically toapplications/fider/values.yamlandapplications/fider-db/values.yaml— asserted in a YAML round-trip while authoring. So adoption should produce a no-ophelm upgrade.The values comments came across verbatim, including the lingua-go measurements (~356MB steady state, the 200Mi OOMKill that read as a hung submit) and the single-instance
enablePDB: falsenote about drains stalling AKS upgrades. Those are incident knowledge and shouldn't be lost in a translation.This is true today, for every app, and has nothing to do with Flux:
Deleting a
config.jsondeletes the Application, the finalizer cascades, ArgoCD deletes the workloads including the CNPG Cluster and PVC, and the PV reclaims. TheRetainapplied after the August CNPG wedge protects the previous volume, not the one in use since the 08-29 rebuild.Worth fixing on its own merits, ahead of any migration —
preserveResourcesOnDeletion: trueon the ApplicationSet covers every app at once.starvote/postgresqlis the one that matters.Deliberately not done
fiderandfider-db-credscome from the standalonebootstrap-secretsapp, which is outside the ApplicationSet and unaffected. Moving them to Flux SOPS needs Azure Key Vault workload identity forkustomize-controller— not doable in git alone.cnpg-operatorstays with ArgoCD. Flux can'tdependsOnan ArgoCD Application. The operator is already running; documented gap, not an ordering bug.Not verified
The kustomize overlay is rendered and diffed against the live cluster (
kubectl kustomizehas kustomize built in), re-verified 2026-09-10. What is not verified: the FluxKustomization/HelmRelease/HelmRepositoryresources themselves, which need a running Flux to validate —flux build kustomization apps --path ./flux/appsonce bootstrapped.Nor is the cnpg
cluster0.7.0 -> 0.8.1 values schema checked by anything here. The values are byte-identical toapplications/fider-db/values.yaml, which ArgoCD renders successfully at 0.8.1 today, so this is low risk — but it is inference, not a render.On devopscoop
I asserted twice while drafting this that
registry.gitlab.com/devopscoop/chartswas a private blocker needing credentials. It isn't — a token fromgitlab.com/jwt/authwith no credentials lists every tag and pulls both0.11.0and0.8.2. So access was never the issue; the chart is a generic in-house wrapper shared by four apps, and nothing about fider required it.The remaining exposure is continuity:
be16440records the chart has already been relocated once, "migrated from the now-deprecated dedevsecops org", and version drift is live (fider0.11.0, the other three0.8.2).flux/base/appremoves it from the Flux path.star-server,alaska-rcvanddiscord-botstill use it under ArgoCD and are untouched — but the base is written to be reusable, so a second overlay supplying its own name, image, env and ingress should be most of what another app needs.Open question for review
Should this live here, or in
jacksonloper/bvflux? Argument for here:.sops.yamlandsecrets/already exist, one deploy key, and each app handover becomes a single atomic PR that removesconfig.jsonand adds Flux manifests together. Argument against: the repo is namedargocd. That's agh repo renameaway — GitHub redirects git operations, so thevaluesURLin all 14config.jsonfiles keeps working and can be updated at leisure.🤖 Generated with Claude Code
https://claude.ai/code/session_01MeFy2jujRA8ScQqRAshc1f