Skip to content

feat(mongodb): render k8s-operator CRDs for Argo CD - #3

Open
adrien-barret wants to merge 1 commit into
argocdfrom
feat/argocd-mongodb
Open

adrien-barret wants to merge 1 commit into
argocdfrom
feat/argocd-mongodb

Conversation

@adrien-barret

Copy link
Copy Markdown

What

mongodb/1.4.1: new argocd.enabled / argocd.org values (default false). When enabled, the chart renders k8s-operator CRDs (cpln.io/v1, in the release namespace) instead of cpln helm manifests, so Argo CD can apply it. Same approach as postgres/3.4.1 and pgvector/1.0.0.

  • identity, policy, volumeset, workload (mongodb), workload (backup): original wrapped in if not argocd.enabled, plus sibling argocd-*.yaml.
  • volumeset carries cpln.io/resource-policy: keep so Argo prune cannot delete the data.
  • secret-config (backup bucket/region) becomes a native Secret (type: Dictionary, base64 data, cpln.io/org annotation, managed-by label).
  • No randomness in the base chart; credentials still come from the prerequisite config.credentialsSecretName secret.

Verification

  • helm lint passes with argocd.enabled true and false.
  • Default render is identical (diff -w -B) to the original chart for 3 configs: defaults, backup aws + autoscaling + direct LB + workload-list, backup gcp.
  • Argo render parses with yaml.safe_load_all; every resource has apiVersion and namespace; resource count matches default mode (4 / 6 / 6). Missing argocd.org fails with a clear message.

Not converted / risks

  • Nothing skipped: every CPLN resource in this chart has an operator CRD.
  • The backup workload now sets gvc: in Argo mode (the original relies on the cpln helm --gvc context and has no gvc:); the existing postgres/pgvector Argo backup workloads omit it, which looks like a gap there.
  • The Secret type is Dictionary (operator lowercases it); the credentials secret must still be created beforehand and, in Argo mode, be reachable by the operator's org.
  • argocd.org and the release namespace must match the operator setup.

Not validated against a live cluster.

🤖 Generated with Claude Code

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