Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing on the reconciliation: " Failed to watch *v1.ConfigMap: unknown (get configmaps)`" #22

Open
ximena9201 opened this issue Jan 9, 2025 · 3 comments

Comments

@ximena9201
Copy link

Describe the bug

I deployed the ArgoCD RBAC Operator using the Helm chart in local Minikube version 1.34.0. While the operator deploys successfully, when I try to apply the ArgoCDRole and ArgoCDBinding manifests results in the following error:

E0108 22:55:14.417632 1 reflector.go:150] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:232: Failed to watch *v1.ConfigMap: unknown (get configmaps)

This might not be a bug, but I'm trying to understand what I'm doing wrong here.

Attaching the complete log for reference:

2025-01-08T22:54:56Z    INFO    setup    starting manager
2025-01-08T22:54:56Z    INFO    starting server    {"name": "health probe", "addr": ":8081"}
I0108 22:54:56.489824       1 leaderelection.go:250] attempting to acquire leader lease argocd/8becd400.my.domain...
I0108 22:55:14.305585       1 leaderelection.go:260] successfully acquired lease argocd/8becd400.my.domain
2025-01-08T22:55:14Z    DEBUG    events    argocd-controller-manager-66fbbf6845-tm7j8_adf2b708-8658-461e-8ac5-e70909685db4 became leader    {"type": "Normal", "object": {"kind":"Lease","namespace":"argocd","name":"8becd400.my.domain","uid":"2f82ee3a-18bd-413c-86bd-034882b53846","apiVersion":"coordination.k8s.io/v1","resourceVersion":"4510"}, "reason": "LeaderElection"}
2025-01-08T22:55:14Z    INFO    Starting EventSource    {"controller": "argocdrole", "controllerGroup": "rbac-operator.argoproj-labs.io", "controllerKind": "ArgoCDRole", "source": "kind source: *v1alpha1.ArgoCDRole"}
2025-01-08T22:55:14Z    INFO    Starting EventSource    {"controller": "argocdrolebinding", "controllerGroup": "rbac-operator.argoproj-labs.io", "controllerKind": "ArgoCDRoleBinding", "source": "kind source: *v1alpha1.ArgoCDRoleBinding"}
2025-01-08T22:55:14Z    INFO    Starting Controller    {"controller": "argocdrole", "controllerGroup": "rbac-operator.argoproj-labs.io", "controllerKind": "ArgoCDRole"}
2025-01-08T22:55:14Z    INFO    Starting Controller    {"controller": "argocdrolebinding", "controllerGroup": "rbac-operator.argoproj-labs.io", "controllerKind": "ArgoCDRoleBinding"}
2025-01-08T22:55:14Z    INFO    Starting workers    {"controller": "argocdrolebinding", "controllerGroup": "rbac-operator.argoproj-labs.io", "controllerKind": "ArgoCDRoleBinding", "worker count": 1}
2025-01-08T22:55:14Z    INFO    Starting workers    {"controller": "argocdrole", "controllerGroup": "rbac-operator.argoproj-labs.io", "controllerKind": "ArgoCDRole", "worker count": 1}
E0108 22:55:14.417632       1 reflector.go:150] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:232: Failed to watch *v1.ConfigMap: unknown (get configmaps)
2025-01-08T22:55:14Z    INFO    Observed a panic in reconciler: assignment to entry in nil map    {"controller": "argocdrole", "controllerGroup": "rbac-operator.argoproj-labs.io", "controllerKind": "ArgoCDRole", "ArgoCDRole": {"name":"test-role","namespace":"argocd"}, "namespace": "argocd", "name": "test-role", "reconcileID": "9cb91116-cb1d-495e-92cc-842e9cf70e48"}
panic: assignment to entry in nil map [recovered]
    panic: assignment to entry in nil map

To Reproduce

  • Deploy the ArgoCD RBAC Operator using the Helm chart.
  • Create the ArgoCDRole and ArgoCDBinding manifests in the same namespace (argocd).

Expected behavior

ConfigMap argocd-rbac-cm created after the ArgoCDRole and ArgoCDRoleBinding has been reconciled

Additional context

  • The argocd namespace exists and the Crs are created in the same namespace
  • Image tag v0.1.6

Thanks for the help!

@ximena9201 ximena9201 changed the title Failing on the reconciliation Failing on the reconciliation: " Failed to watch *v1.ConfigMap: unknown (get configmaps)`" Jan 9, 2025
@ggkhrmv
Copy link
Collaborator

ggkhrmv commented Jan 9, 2025

Hi @ximena9201, thank you for reaching out. Try to create the argocd-rbac-cm first, before applying the manifests. The operator doesn't create the RBAC-CM, since it's a responsibility of Argo CD.

@ximena9201
Copy link
Author

Yes I forgot to mention it, I previously deployed an Argo instance so the ConfigMap is already in place. I assume the operator should overwrite - but is not doing it

@ggkhrmv
Copy link
Collaborator

ggkhrmv commented Jan 9, 2025

ah alright, i'll look into it :)

the operator is not overwritting the CM, to ensure compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants