external-attacher: Emit events on detach errors

I think kubectl describe or the new kubectl get events provide a great way to quickly see any issues with a cluster. The external-attacher errors are IMO somewhat hidden in the VA status and it would be nice to emit events on PVC’s to increase visibility. I would be happy to provide a patch if that is ok.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (9 by maintainers)

Most upvoted comments

@humblec Sorry, I kind of lost track of this. I think we came to the conclusion that the issue is somewhat misplaced here. Work to improve things should probably be done in k/k and k/website. Issues in those repos can still link back here for documentation purposes, but I think it can be closed.

nw… and thanks for revisiting this issue @avorima . If we have nt opened the trackers in k/k or k/website, I can take that up and close this issue for now.

Wouldn’t that be kind of far from the error source?

It is a generic place where all attach errors are reported and thus detach error should be there too. While we’re migrating most volume plugins to CSI, there are still some that are in-tree and may benefit from the improved error reporting.

I guess the error in the VA status could somehow be turned into an event, but would also affect other types of volumes which I can’t test or verify.

That is the goal, common place for all detach errors. We can help with in-tree error verification.

And yes, you can just improve our docs! You’re more that welcome.

I played around with it yesterday and it certainly is possible to create events for objects that don’t exist. It would provide some sort of symmetry when using kubectl get events --field-selector involvedObject.name for example.

I find it odd that attach errors are sent to pods and detach errors would be PVC… I wonder if it’s possible / common to send events to deleted Pods. The only way how to get the event would be kubect get event.