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:
improves error handling in genie-controller's getPodAnnotationsForCNI to always log underlying error for getK8sPodAnnotations call
removes logging underlying error for one case where it was already covered, not to log same error twice
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:
getK8sPodAnnotations
call