cni-genie / CNI-Genie

CNI-Genie for choosing pod network of your choice during deployment time. Supported pod networks - Calico, Flannel, Romana, Weave
https://github.com/cni-genie/CNI-Genie/
Apache License 2.0
535 stars 121 forks source link

Log error getting annotations in genie-controller.go #234

Open stevo-f3 opened 7 months ago

stevo-f3 commented 7 months ago

When getting pod annotations for CNI, Genie controller would swallow underlying error in case of len(k8sArgs.K8S_ANNOT) == 0 which can happen for many reasons.

In an incident, all new Pods were failing to be created, genie was erroring CNI Genie Add IP internal error: Error getting annotations for pod (foo:bar): No pod or env var found, result: %!!(MISSING)s(<nil>) Missing underlying error made debugging hard.

This PR:

stevo-f3 commented 7 months ago

@m1093782566 @sushanthakumar @kevin-wangzefeng @vinaykul can you please take a look?