Skip to content

Resource health missing in api/v1/applications .status.resources (3.0) #22921

@xunleii

Description

@xunleii

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

I think I've identified a regression in ArgoCD 3.x regarding the status fields in both Application and ApplicationSet CRDs (and inside the ArgoCD API). When deploying to an empty cluster, certain status information is no longer present:

  1. For Application CRDs: The resource health field is missing in the status
  2. For ApplicationSet CRDs: The resources field is missing in the status

This regression appears to be specific to fresh installations of ArgoCD 3.x, as upgrades from 2.x to 3.x don't exhibit this behavior.

To Reproduce

Note

I'm going to try to detail the steps as best as possible, but it may not reproduce exactly.

1. Regression on Application CRD

With ArgoCD 2.7.1

# Setup of the environment
kind create cluster --name argocd-regression
helm upgrade --install argocd argo/argo-cd \
    --version 7.9.1 \
    --namespace argocd --create-namespace \
    --values https://raw.githubusercontent.com/chezmoi-sh/argocd-extension-application-map/refs/heads/f83290d51207e76e072acaf5e2c8f4c9b17dae8a/examples/argocd-dev.helmvalues.yaml \
    --set server.volumes=null \
    --set server.volumeMounts=null

# Port forward
kubectl port-forward service/argocd-server -n argocd 8080:443

# Test of the regression
kubectl apply -f https://raw.githubusercontent.com/chezmoi-sh/argocd-extension-application-map/refs/heads/f83290d51207e76e072acaf5e2c8f4c9b17dae8a/examples/applications-maze/seed.yaml
export ARGOCD_TOKEN=$(curl -k -H 'content-type: application/json' https://localhost:8080/api/v1/session  -d '{"username":"admin","password":"admin"}' | jq '.token' --raw-output)
curl -k -H 'content-type: application/json' -H "Authorization: Bearer $ARGOCD_TOKEN" https://localhost:8080/api/v1/applications | jq '.items[].status.resources[] | select(.kind == "ApplicationSet")'

You should see a result similar to this:

{
  "group": "argoproj.io",
  "version": "v1alpha1",
  "kind": "ApplicationSet",
  "namespace": "argocd",
  "name": "appset-01",
  "status": "Synced",
  "health": {
    "status": "Healthy",
    "message": "ApplicationSet up to date"
  }
}
{
  "group": "argoproj.io",
  "version": "v1alpha1",
  "kind": "ApplicationSet",
  "namespace": "argocd",
  "name": "appset-02",
  "status": "Synced",
  "health": {
    "status": "Healthy",
    "message": "ApplicationSet up to date"
  }
}
{
  "group": "argoproj.io",
  "version": "v1alpha1",
  "kind": "ApplicationSet",
  "namespace": "argocd",
  "name": "appset-03",
  "status": "Synced",
  "health": {
    "status": "Healthy",
    "message": "ApplicationSet up to date"
  }
}

We can see that all 3 ApplicationSet have the health field in their status.

With ArgoCD 3.x

The upgrade from 2.x to 3.x goes smoothly. It is necessary to start from an empty cluster to see the regression.

# Remove the previous installation
kind delete cluster --name argocd-regression

# Recreate the environment
kind create cluster --name argocd-regression
helm upgrade --install argocd argo/argo-cd \
    --version 8.0.0 \
    --namespace argocd --create-namespace \
    --values https://raw.githubusercontent.com/chezmoi-sh/argocd-extension-application-map/refs/heads/f83290d51207e76e072acaf5e2c8f4c9b17dae8a/examples/argocd-dev.helmvalues.yaml \
    --set server.volumes=null \
    --set server.volumeMounts=null

# Port forward
kubectl port-forward service/argocd-server -n argocd 8080:443

# Test of the regression
kubectl apply -f https://raw.githubusercontent.com/chezmoi-sh/argocd-extension-application-map/refs/heads/f83290d51207e76e072acaf5e2c8f4c9b17dae8a/examples/applications-maze/seed.yaml
export ARGOCD_TOKEN=$(curl -k -H 'content-type: application/json' https://localhost:8080/api/v1/session  -d '{"username":"admin","password":"admin"}' | jq '.token' --raw-output)
curl -k -H 'content-type: application/json' -H "Authorization: Bearer $ARGOCD_TOKEN" https://localhost:8080/api/v1/applications | jq '.items[].status.resources[] | select(.kind == "ApplicationSet")'

You should see a result similar to this:

{
  "group": "argoproj.io",
  "version": "v1alpha1",
  "kind": "ApplicationSet",
  "namespace": "argocd",
  "name": "appset-01",
  "status": "Synced"
}
{
  "group": "argoproj.io",
  "version": "v1alpha1",
  "kind": "ApplicationSet",
  "namespace": "argocd",
  "name": "appset-02",
  "status": "Synced"
}
{
  "group": "argoproj.io",
  "version": "v1alpha1",
  "kind": "ApplicationSet",
  "namespace": "argocd",
  "name": "appset-03",
  "status": "Synced"
}

We can see that the health field is missing in the resources.

2. Regression on ApplicationSet CRD

With ArgoCD 2.7.1

# Setup of the environment
kind create cluster --name argocd-regression
helm upgrade --install argocd argo/argo-cd \
    --version 7.9.1 \
    --namespace argocd --create-namespace \
    --values https://raw.githubusercontent.com/chezmoi-sh/argocd-extension-application-map/refs/heads/f83290d51207e76e072acaf5e2c8f4c9b17dae8a/examples/argocd-dev.helmvalues.yaml \
    --set server.volumes=null \
    --set server.volumeMounts=null

# Port forward
kubectl port-forward svc/argocd-server -n argocd 8080:443

# Test of the regression
kubectl apply -f https://raw.githubusercontent.com/chezmoi-sh/argocd-extension-application-map/refs/heads/f83290d51207e76e072acaf5e2c8f4c9b17dae8a/examples/applications-maze/seed.yaml
export ARGOCD_TOKEN=$(curl -k -H 'content-type: application/json' https://localhost:8080/api/v1/session  -d '{"username":"admin","password":"admin"}' | jq '.token' --raw-output)
curl -k -H 'content-type: application/json' -H "Authorization: Bearer $ARGOCD_TOKEN" https://localhost:8080/api/v1/applicationsets | jq '.items[].status.resources'

You should see a result similar to this:

[{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"app-of-apps-02","health":{}},{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"guestbook-app-02","health":{}},{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"guestbook-app-03","health":{}}]
[{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"guestbook","health":{}},{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"helm-hooks","health":{}},{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"jsonnet-guestbook","health":{}},{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"jsonnet-guestbook-tla","health":{}},{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"kustomize-guestbook","health":{}},{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"pre-post-sync","health":{}},{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"sock-shop","health":{}},{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"sync-waves","health":{}}]
[{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"guestbook-app-04","health":{}}]

We can see that all ApplicationSet have the resources in their status.

With ArgoCD 3.x

# Remove the previous installation
kind delete cluster --name argocd-regression

# Recreate the environment
kind create cluster --name argocd-regression
helm upgrade --install argocd argo/argo-cd \
    --version 8.0.0 \
    --namespace argocd --create-namespace \
    --values https://raw.githubusercontent.com/chezmoi-sh/argocd-extension-application-map/refs/heads/f83290d51207e76e072acaf5e2c8f4c9b17dae8a/examples/argocd-dev.helmvalues.yaml \
    --set server.volumes=null \
    --set server.volumeMounts=null

# Port forward
kubectl port-forward svc/argocd-server -n argocd 8080:443

# Test of the regression
kubectl apply -f https://raw.githubusercontent.com/chezmoi-sh/argocd-extension-application-map/refs/heads/f83290d51207e76e072acaf5e2c8f4c9b17dae8a/examples/applications-maze/seed.yaml
export ARGOCD_TOKEN=$(curl -k -H 'content-type: application/json' https://localhost:8080/api/v1/session  -d '{"username":"admin","password":"admin"}' | jq '.token' --raw-output)
curl -k -H 'content-type: application/json' -H "Authorization: Bearer $ARGOCD_TOKEN" https://localhost:8080/api/v1/applicationsets | jq '.items[].status.resources | length'

You should see a result similar to this:

null
[{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"guestbook","status":"Synced","health":{"status":"Healthy","lastTransitionTime":"2025-05-11T06:40:01Z"}},{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"helm-hooks","status":"Synced","health":{"status":"Healthy","lastTransitionTime":"2025-05-11T06:41:29Z"}},{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"jsonnet-guestbook","status":"Synced","health":{"status":"Progressing","lastTransitionTime":"2025-05-11T06:39:47Z"}},{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"jsonnet-guestbook-tla","status":"Synced","health":{"status":"Progressing","lastTransitionTime":"2025-05-11T06:39:47Z"}},{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"kustomize-guestbook","status":"Synced","health":{"status":"Healthy","lastTransitionTime":"2025-05-11T06:40:06Z"}},{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"pre-post-sync","status":"Synced","health":{"status":"Healthy","lastTransitionTime":"2025-05-11T06:41:19Z"}},{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"sock-shop","status":"Synced","health":{"status":"Progressing","lastTransitionTime":"2025-05-11T06:39:48Z"}},{"group":"argoproj.io","version":"v1alpha1","kind":"Application","namespace":"argocd","name":"sync-waves","status":"Synced","health":{"status":"Healthy","lastTransitionTime":"2025-05-11T06:41:36Z"}}]
null

We can see that some ApplicationSet have no resources in their status while they have resources created (visible in the ArgoCD UI).

Expected behavior

The health field should be always present in the status of the ApplicationSet CRD.
The resources field should be always present in the status of the ApplicationSet CRD.
Version

argocd: v3.0.0+e98f483
  BuildDate: 2025-05-06T11:25:45Z
  GitCommit: e98f483bfd5781df2592fef1aeed1148f150d9c9
  GitTreeState: clean
  GoVersion: go1.24.1
  Compiler: gc
  Platform: linux/arm64

Note

I used the official chart to install ArgoCD 3.x via the version 8.0.0.

Logs

I didn't see anything particular in the logs.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingregressionBug is a regression, should be handled with high priority

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions