Skip to content

ArgoCD shows error if it can't get description of a CRD irrelevant to application. #22603

@utkarsh-opsmx

Description

@utkarsh-opsmx

Checklist:

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

Describe the bug

While comparing app state ArgoCD tries to get all kubernetes resources (getApiResources() in sync() under cluster.go in gitops-engine) and iterate on it one by one. In our setup there is some CRD (from a third party vendor) that is present in the list of resources but when we get its description we get an error.
Although that CRD is not managed by/a dependency of the app whose state is being compared by ArgoCD, the CompareAppState() in state.go errors out. So just for a CRD that is corrupted sync for every app dependent or independent of the CRD errors out with the same error message.

Expected behavior

To compare app state ArgoCD should only list resources managed by app and iterate on it. Thus sync operation of the apps managing the CRD should error out and all.

Screenshots

The attached screenshot is of cluster sync but I get the same error while getting app state.

Image

Version

2.13.0

Error Message

Failed to load live state: failed to get cluster info for " --------....(----): failed to load initial state of resource NodePool.karpenter.sh: conversion webhook for karpenter.sh/v1beta1, Kind=NodePool failed: Post "https://karpenter.kube-system.svc:8443/conversion/karpenter.sh?timeout=30s":

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions