Skip to content

Take fider out of ArgoCD - #74

Draft
jacksonloper wants to merge 1 commit into
mainfrom
JacksonLoper/fider-leave-argocd
Draft

jacksonloper wants to merge 1 commit into
mainfrom
JacksonLoper/fider-leave-argocd

Conversation

@jacksonloper

Copy link
Copy Markdown
Collaborator

Draft on purpose. Do not merge until #73 and #52 are in.

Hands fider and fider-db to Flux by taking them out of the ApplicationSet. Removing the config.json files removes the Applications; removing the values.yaml files leaves nothing dead behind, since the Flux manifests in #52 carry their own copies.

Why this must wait for #73

Without preserveResourcesOnDeletion, merging this destroys the fider database:

Application fider-db  ->  owns postgresql.cnpg.io/Cluster/fider-db
Cluster fider-db      ->  ownerReference on PVC fider-db-1 (controller: true)
PVC fider-db-1        ->  PV pvc-df9a66c8, reclaim policy Delete

resources-finalizer deletes the Cluster, the garbage collector reaps the PVC, the PV reclaims. #73 turns that into an orphan instead.

Why it must wait for #52

#52 has to be on main before flux bootstrap can reconcile it. If this merges first, nothing manages fider at all — it keeps running, but drift and restarts stop being reconciled by anything.

Sequencing

Step Change Where
1 preserveResourcesOnDeletion: true #73
2 Flux scaffold, suspended #52
3 flux bootstrap command
4 Helm-adoption stamping commands
5 this PR
6 flux resume kustomization apps command

Step 4 matters and is easy to skip: ArgoCD renders charts and applies manifests, so no Helm release exists in the cluster. Flux's helm-controller would try a fresh install of fider-db and collide. The objects need Helm ownership metadata stamped on them first — flux/README.md has the commands.

Step 6 stays separate so the two controllers never both manage these objects. Between 5 and 6 fider is unmanaged, which is fine and brief.

Not in scope

secrets/ is untouched. fider (JWT_SECRET, EMAIL_SMTP_PASSWORD) and fider-db-creds come from the standalone bootstrap-secrets app, which is not part of this ApplicationSet. Flux consumes those Secrets rather than managing them. Moving them to Flux SOPS needs Azure Key Vault workload identity for kustomize-controller and is a separate piece of work.

Rollback

Revert this PR. ArgoCD regenerates both Applications and re-adopts the resources. Suspend Flux first so they do not fight:

flux suspend kustomization apps

🤖 Generated with Claude Code

https://claude.ai/code/session_01MeFy2jujRA8ScQqRAshc1f

Hands fider and fider-db to Flux. Removing the config.json files takes both
Applications out of the ApplicationSet; removing the values.yaml files leaves
nothing dead behind, since the Flux manifests carry their own copies.

DO NOT MERGE until #73 has landed. Without preserveResourcesOnDeletion, this
commit deletes the fider database: the Application owns the CNPG Cluster, the
Cluster owns the PVC through an ownerReference, and that PV reclaims with
Delete.

Nothing in secrets/ changes. The `fider` and `fider-db-creds` Secrets come from
the standalone bootstrap-secrets app, which is not part of this ApplicationSet
and is unaffected. Flux consumes those Secrets rather than managing them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MeFy2jujRA8ScQqRAshc1f
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant