Skip to content

Namespace scoped Argo instance does not create errors if cluster --use-argocd-api=false in my setup #325

@rklonner

Description

@rklonner

I upgraded and the weird thing is that it works, no matter if i have --use-argocd-api=true or false

I checked that there are not left overs in the cluster regarding clusterroles that would allow that.
I also did the counter test and reverted back to v1.20 with --create-cluster=false and get

Mon, 26 Jan 2026 07:55:08 UTC ERR ❌ Application failed with error: Failed to load live state: namespace "xxx" for Pod "xxx" is not managed (App: "xxx [applicationset-qss.yaml]")

which is correct.

The only flag I use on top of the defaults is --create-cluster=false.

When I browse through the docs it says I need to explicitly turn --use-argocd-api=true for 'lockdown mode'.

@dag-andersen : Do you have an idea what could be the issue?I quickly browsed through the implementation PR but did not find a hint that --use-argocd-apiis maybe alwaystrue`.


@rklonner

argocd-diff-preview:0.1.22 --create-cluster=false --use-argocd-api=false with a cluster with createClusterRoles: false should only fails if the actual rendered applications contains resource outside the argocd/argocd-diff-preview namespace.

Are you sure your test included changes in non-argocd-diff-preview-installed namespace?


@dag-andersen : yes it failed for all target namespaces of the applicationset I deployed in this case, and I get the same error message with 1.20 as I described back then for the Openshift setup in the Background information docs so I am sure that I do have a namespace scoped instance.

I do not use createClusterRoles: false as I install the argocd-diff-preview ArgoCD instance with the ArgoCD Operator - I dont know if this makes a difference.

The strange thing is, if I leave my test setup with the PR the same, also the settings --create-cluster=false and --use-argocd-api=false (for 1.22) and just switch between argocd-diff-preview version 1.20 and 1.22, I receive for 1.20 the error

Application failed with error: Failed to load live state: namespace "xxx" for Pod "xxx" is not managed (App: "xxx [applicationset-qss.yaml]")

and for

1.22 it works. I would assume to get the same error for 1.22 as for 1.20.

I am happy with the result but I would just like to know why it works with 1.22 no matter to what value --use-argocd-api=false is set.

I am missing ideas what to try next, not sure if I should start to debug from the NewOperations function here or if I miss something basic...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions