Skip to content

Add ArgoCD Application objects for opscenter-features charts#1229

Draft
tamalsaha wants to merge 2 commits intomasterfrom
fargocd2
Draft

Add ArgoCD Application objects for opscenter-features charts#1229
tamalsaha wants to merge 2 commits intomasterfrom
fargocd2

Conversation

@tamalsaha
Copy link
Copy Markdown
Member

@tamalsaha tamalsaha commented Mar 28, 2026

Summary

  • Generated 87 ArgoCD Application objects for all helm charts referenced by opscenter-features
  • Added argocd-gen tool that uses Helm Go SDK to detect changing fields and generate ignoreDifferences
  • Mirrors the featureset directory structure from charts/opscenter-features/templates/featuresets/

Changes

argocd/ (87 ArgoCD Application objects)

  • 18 featureset subdirectories matching opscenter-features templates
  • Each Application includes:
    • Proper helm values (ace-user-roles, platform config, monitoring settings)
    • ignoreDifferences for fields that change between helm template runs:
      • Secret /data (certificate data)
      • WebhookConfiguration caBundle
      • Deployment/StatefulSet reload/checksum annotations
      • APIService caBundle
      • CRD spec/annotations

cmd/argocd-gen/ (Helm Go SDK tool)

  • Standalone tool that generates ArgoCD Applications with correct ignoreDifferences
  • Uses Helm Go SDK directly (pkg/action, pkg/registry, pkg/chart/loader)
  • Pulls from OCI registries, renders in dry-run mode with memory storage driver
  • Compares multiple renders to find changing fields
  • Comprehensive test suite covering unit, integration, and E2E scenarios

Testing

  • Unit tests: diffResources logic, ArgoCD structure validation
  • Integration tests: kubedb (19 rules), kubevault (7 rules), kubestash (3 rules), voyager (4 rules)
  • E2E test: all 87 charts from opscenter-features verified

Verified

  • All changing fields between renders are covered by ignoreDifferences
  • Charts without changes (keda, cert-manager, etc.) correctly have no ignoreDifferences

@tamalsaha tamalsaha marked this pull request as draft March 28, 2026 11:44
Generated 87 ArgoCD Application objects mirroring the featureset
directory structure from charts/opscenter-features/templates/featuresets/.

Each Application includes:
- Proper helm values (ace-user-roles, platform config, monitoring)
- ignoreDifferences for fields that change between helm template runs:
  - Secret /data (certificate data)
  - WebhookConfiguration caBundle
  - Deployment/StatefulSet reload/checksum annotations
  - APIService caBundle
  - CRD spec/annotations

Charts are organized into 18 featureset directories:
- capi-capa, capi-capg, capi-core, crossplane
- ocm-hub, ocm-spoke
- opscenter-backup, opscenter-core, opscenter-cost
- opscenter-datastore, opscenter-networking, opscenter-observability
- opscenter-policy-management, opscenter-secret-management
- opscenter-security, opscenter-storage, opscenter-tools
- saas-core
A standalone Go tool that generates ArgoCD Application objects for helm
charts by rendering each chart multiple times using the Helm Go SDK.

Key features:
- Uses Helm Go SDK directly (no shell-out to helm CLI)
- Pulls charts from OCI registries via registry.Client
- Renders with action.NewInstall in dry-run mode (kubeVersion v1.31.0)
- Memory storage driver - no kube cluster needed
- Detects fields that change between renders and generates ignoreDifferences

Detected change patterns:
- Secret /data (certificate fields ca.crt, tls.crt, tls.key)
- WebhookConfiguration caBundle (via jqPathExpressions)
- APIService caBundle
- Deployment/StatefulSet annotations (reload, checksum~1apiregistration.yaml)

Includes comprehensive test suite:
- TestDiffResourcesUnit: unit tests for diff logic
- TestArgoCDAppStructure: validates generated Application structure
- TestSpecificCharts: integration tests for kubedb, kubevault, kubestash, voyager
- TestAllOpscenterCharts: E2E test over all 87 opscenter-features charts

Usage:
  cd cmd/argocd-gen
  go run . --chart kubedb --version v2026.2.26 --namespace kubedb

Signed-off-by: Tamal Saha <tamal@appscode.com>
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