nginxinc / nginx-supportpkg-for-k8s

NGINX Support Package Tool For Kubernetes
Apache License 2.0
0 stars 2 forks source link

Program terminates with stacktrace if clients fail to initialize #26

Closed dareste closed 3 months ago

dareste commented 4 months ago

Describe the bug The program ends with a nil reference error if any of the clients in the initialization data collector section. We need to verify the errors the client constructors might return.

To Reproduce Steps to reproduce the behavior:

  1. Create a wrong .kube/config data.
  2. Run the plugin

Expected behavior Program should gracefully fail and indicate the error reason.

mrajagopal commented 4 months ago

I am unable to reproduce this. I cloned a working .kube/config and deleted an item e.g.: client-certificate-data:

kic-0: namespaces "kic-0" is forbidden: User "system:anonymous" cannot get resource "namespaces" in API group "" in the namespace "kic-0"

or certificate-authority-data::

kic-0: Get "https://10.146.180.184:443/api/v1/namespaces/kic-0": tls: failed to verify certificate: x509: “kube-apiserver” certificate is not trusted
 Error: Some namespaces do not exist

Perhaps a copy of the .kube/config may be handy to repro.

dareste commented 3 months ago

Closed as non-reproducible.