argo-cd icon indicating copy to clipboard operation
argo-cd copied to clipboard

`undefined/undefined` is wrong...

Open jsoref opened this issue 1 year ago • 15 comments

Checklist:

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

Describe the bug

the details for a not found resource reflected undefined/undefined:

Resource not found in cluster: undefined/undefined:cert-manager-startupapicheck

To Reproduce

  1. let argocd manage a cert-manager install
  2. let argocd upgrade cert-manager install
  3. while argocd is triggering the cert-manager upgrade, a service account for cert-manager-startupapicheck will appear and can be clicked (?)
  4. click it
  5. depending on (hand waving) the cert-manager-startupapicheck will probably already be gone? so a confusing error will be rendered by argocd

note that for a while longer i could ask argocd to filter for service accounts and see it, but i couldn't click it to actually show the item... and it eventually stopped appearing...

Expected behavior

information about expect objects should be stored in the request pointer so that they can be filled in in cases when they no longer exist instead of asking the ui to imagine them after the fact

Screenshots

image

Version

{
    "Version": "v2.8.3+77556d9",
    "BuildDate": "2023-09-07T16:05:43Z",
    "GitCommit": "77556d9e64304c27c718bb0794676713628e435e",
    "GitTreeState": "clean",
    "GoVersion": "go1.20.6",
    "Compiler": "gc",
    "Platform": "linux/amd64",
    "KustomizeVersion": "v5.1.0 2023-06-19T16:58:18Z",
    "HelmVersion": "v3.12.1+gf32a527",
    "KubectlVersion": "v0.24.2",
    "JsonnetVersion": "v0.20.0"
}

Logs

Paste any relevant application logs here.

jsoref avatar Dec 18 '23 20:12 jsoref

Not sure it's related ... but as of upgrading ArgoCD (from 2.7.14 to 2.8.4), I'm seeing similar messages. For just any object, eg:

Resource not found in cluster: v1/ConfigMap:cronjob-tektonruns-garbage-collect-7h57hctc55 Please update your resource specification to use the latest Kubernetes API resources supported by the target cluster. The recommended syntax is v1/ConfigMap:cronjob-tektonruns-garbage-collect-7h57hctc55

Object is present in cluster though. Application shows healthy, it's not OutOfSync. I would just get that message when looking at individual resources "Live Manifest" in ArgoCD console.

This affects all objects in my applications: Services, ConfigMaps, NetworkPolicies ... Although I don't have that "undefined/undefined" thing ...

Still testing 2.8 / first installation I'm upgrading. I can confirm this is a not an issue, with exact same applications, running 2.7.14 Using that OpenShift GitOps operator lifecycling my ArgoCD -- ArgoCD object did not change in a while, as we did proceed with sso/dex reconfiguration when upgrading from 2.6 to 2.7.

faust64 avatar Dec 24 '23 13:12 faust64

Sorry, that's a different issue. If I were you, I'd join slack to debug and then file a ticket (feel free to reference it here so people can find it if they stumble on your note here instead of the new ticket).

jsoref avatar Dec 24 '23 13:12 jsoref

I am. Still I'm wondering: does the live manifest view works at all? You may be having two problems here.

faust64 avatar Dec 24 '23 13:12 faust64

Yes, live manifest works fine for everything else.

jsoref avatar Dec 24 '23 13:12 jsoref

I am also experiencing the same issue. My version of ArgoCD is 2.9.1. In my case, it was a pod, and I couldn't delete this pod through any method supported by ArgoCD. Note that the actual pod had already been deleted. However, removing the owner allowed me to delete this pod. 스크린샷 2024-01-09 오후 1 48 57

ku524 avatar Jan 09 '24 04:01 ku524

@jsoref: is your issue resolved? I am also facing same issue and getting error message something like "Resource not found in cluster: undefined/undefined:ly-job-a67f890-postsync-1707682950"

if you have some workaround. Please suggest.Thanks

pargupta12 avatar Feb 11 '24 20:02 pargupta12

No, it isn't resolved. I just deal with it.

jsoref avatar Feb 11 '24 20:02 jsoref

We just upgraded our ArgoCD from 2.7.6 to 2.10.1 and we are facing a similar issue

Resource not found in cluster: v1/ConfigMap:bitbucket-runner-configs-59t96976td Please update your resource specification to use the latest Kubernetes API resources supported by the target cluster. The recommended syntax is v1/ConfigMap:bitbucket-runner-configs-59t96976td

bofaalsarah avatar Feb 27 '24 14:02 bofaalsarah

Sorry, that's a different issue. If I were you, I'd join slack to debug and then file a ticket (feel free to reference it here so people can find it if they stumble on your note here instead of the new ticket).

jsoref avatar Feb 27 '24 14:02 jsoref

I think it's still related because when I look into the live manifest tab of the pod, I am getting

Resource not found in cluster: undefined/undefined:bitbucket-runner-7c87665b77-m886p

bofaalsarah avatar Feb 27 '24 14:02 bofaalsarah

Oh, sorry, I didn't see that in what you pasted earlier. Yes, that's this problem :).

jsoref avatar Feb 27 '24 15:02 jsoref

Fwiw, this is more about error reporting than fixing the underlying problem causing any given error.

jsoref avatar Feb 27 '24 16:02 jsoref

Fwiw, this appears to have been introduced by @ashutosh16 in #13031 -- it's odd, because there are screenshots of it working there, so, presumably the feature works some of the time.

The relevant code is: https://github.com/argoproj/argo-cd/blob/891d08930470675c8851909254b0b5bd45eb79f0/ui/src/app/applications/components/application-node-info/application-node-info.tsx#L240-L241

jsoref avatar Feb 27 '24 16:02 jsoref

Are you missing the cluster rbac for the server component?

LS80 avatar Mar 06 '24 09:03 LS80

I had the same issues myself after install ArgoCD v2.10.1. I've followed the official install instructions (https://argo-cd.readthedocs.io/en/stable/getting_started/, with the only difference that I've use a custom namespace for installation (argocd-test)

kubectl create ns argocd-test
kubectl apply -n argocd-test -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/core-install.yaml

Errors:

  1. Issue 1: live manifest was showing errors for all resources, even tough the resources were deployed successfuly. In example, the errors for a configMap:
Resource not found in cluster: v1/ConfigMap:public-ingress-controller-test 
Please update your resource specification to use the latest Kubernetes API resources supported by the target cluster. 
The recommended syntax is v1/ConfigMap:public-ingress-controller-test
  1. Issue 2: I was not able to delete resources from ArgoCD GUI - in example, while trying to delete a confgiMap, I got the following error:
Unable to delete resource: error deleting resource: configmaps "public-ingress-controller-test" is forbidden: 
User "system:serviceaccount:argocd-test:argocd-server" cannot delete resource "configmaps" in API group "" in the namespace "lu-ingress-controller"

Resolution:

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  labels:
    app.kubernetes.io/component: server
    app.kubernetes.io/name: argocd-server
    app.kubernetes.io/part-of: argocd
  name: argocd-server
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: argocd-server
subjects:
- kind: ServiceAccount
  name: argocd-server
  namespace: argocd

The solution in my case was to adapt the argocd-server ClusterRoleBinding to also include the argocd-server serviceAccount from my custom namespace argocd-test. Basically, under subjects I've added the following 2 lines:

subjects:
- kind: ServiceAccount
  name: argocd-server
  namespace: argocd-test

cmarasescu avatar Mar 07 '24 15:03 cmarasescu

i'm facing the same issue. I've deployed argocd 2.10.2 in cluster setup with the applications in any namespace, i've made the proper configuration and deployed https://github.com/argoproj/argo-cd/tree/master/manifests/cluster-rbac too.

But my application keeps syncing Screenshot 2024-03-15 at 07 08 10

Actually the deployment/ingres/networkpolicy are deployed and healthy but argo does not seems to detect them.

Any idea what am i missing here?

ppodevlabs avatar Mar 15 '24 21:03 ppodevlabs

I was having this issue in our helm values file we had some custom config for server.clusterRoleRules.rules and had server.clusterRoleRules.enabled: true that was overriding default config notice:

{{- if .Values.createClusterRoles }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: {{ include "argo-cd.server.fullname" . }}
  labels:
    {{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
rules:
  {{- if .Values.server.clusterRoleRules.enabled }}
    {{- toYaml .Values.server.clusterRoleRules.rules | nindent 2 }}
  {{- else }}
  - apiGroups:
      - '*'

had to remove the custom rules and server.clusterRoleRules.enabled: false same as in default argocd values file. and now I can see all resources just fine

cooervo avatar Jul 10 '24 13:07 cooervo