vmware-archive / kubecfg

A tool for managing complex enterprise Kubernetes environments as code.
Apache License 2.0
727 stars 62 forks source link

Garbage collecting a CRD causes spurious "not found" error #250

Open anguslees opened 5 years ago

anguslees commented 5 years ago

I decided to remove my Argo install, and hit this:

...
INFO  Garbage collecting clusterroles argo-ui-cluster-role (rbac.authorization.k8s.io/v1beta1)
INFO  Garbage collecting customresourcedefinitions workflows.argoproj.io (apiextensions.k8s.io/v1beta1)
ERROR the server could not find the requested resource (get workflows.argoproj.io)

(The CRD was deleted, and then gc tried to fetch instances of that custom resource)

kubecfg should ignore all variants of "not found" when walking the resources for garbage collection.