argocd-apps CRD sequence ordering results in failed deployment
Summary
Defining any argocd-apps.applications in the package values breaks fresh installs of the argocd package. The bundled argocd-apps subchart renders Application CRs into the same Helm release that installs the Argo CD CRDs, and the upstream argo-cd chart ships its CRDs as templates (templates/crds/), not in a crds/ directory. Helm validates the entire release manifest against API discovery before applying anything, so the install fails before a single resource (including the CRDs) is created:
Helm install failed for release argocd/argocd-argocd with chart argocd@9.5.15-bb.0:
unable to build kubernetes objects from release manifest: resource mapping not found
for name: "podinfo" namespace: "argocd" from "": no matches for kind "Application"
in version "argoproj.io/v1alpha1"
ensure CRDs are installed firstSteps to reproduce
-
Fresh cluster (no argoproj CRDs present).
-
Deploy Big Bang with the argocd addon enabled and at least one application defined:
addons: argocd: enabled: true values: argocd-apps: applications: podinfo: namespace: argocd project: default destination: namespace: podinfo server: https://kubernetes.default.svc sources: - repoURL: https://github.com/stefanprodan/podinfo.git path: charts/podinfo targetRevision: 6.12.0 -
The argocd HelmRelease fails with the error above; the argocd namespace stays empty.
helm template renders fine (client-side rendering does no API discovery), so this is not caught by template/lint checks.
Root cause
Known upstream limitation, deliberately unresolved:
- argo-helm PR #1342 intentionally moved the CRDs from
crds/intotemplates/crds/so CRDs upgrade with the chart (Helm never touchescrds/after first install). - argo-helm issue #1447 — "Can't use argocd chart as a dependency with application resources in a single run" — is this exact failure mode. A PR to move CRDs back to
crds/was declined;crds.annotations: {helm.sh/hook: pre-install}was suggested and confirmed not to work (validation happens before hooks run). The issue was closed by the stale-bot with no fix. - argo-helm issue #550 proposed a separate CRDs-only chart; closed as on-hold.
Upstream treats argocd-apps as a separate release installed after argo-cd. Bundling it as a dependency of this package inherits the limitation whenever applications/applicationsets are defined.
Workaround (tested)
Annotating the Application as a Helm hook removes it from the upfront manifest validation:
argocd-apps:
applications:
podinfo:
additionalAnnotations:
helm.sh/hook: post-install,post-upgrade