suspicious-pods
suspicious-pods copied to clipboard
Consider support multiple kubeconfigs
If we set multiple KUBECONFIG in our $KUBECONFIG
env flag, suspicious-pods
could not understand and throws an exception:
$ export KUBECONFIG=$KUBECONFIG:$HOME/.kube/config:$HOME/.kube/config-foo:$HOME/.kube/config-bar
$ suspicious-pods
Error: Kubeconfig(ConfigInferenceExhausted { cluster_env: Kubeconfig(MissingInClusterVariables { hostenv: "KUBERNETES_SERVICE_HOST", portenv: "KUBERNETES_SERVICE_PORT" }), kubeconfig: Kubeconfig(ReadFile { path: ":/Users/furkan/.kube/config:/Users/furkan/.kube/config-foo:/Users/furkan/.kube/config-bar", source: Os { code: 2, kind: NotFound, message: "No such file or directory" } }) })
I think it should recognize that if given input is multiple files.
Looks like the underlying library doesn't really support it. Although they have a workaround listed using kubectl
to flatten the configs into a tmp config....
clux/kube-rs#132
We should have it supported in the next release. https://github.com/clux/kube-rs/pull/411