The Dry-Struct -mapped K8s::Config is replaced with an unvalidated and unstructured hash. Validating kubeconfig -files is not in the scope of k8s-client. In the future, this can lead to dropping the dry-dependencies, making the client easier to use in projects that have dry-dependecies of their own, which seem to generate a lot of dependency issues.
Instead of RecursiveOpenStruct, the config uses a simple selfmade hash-extension that pretty much works the same. Later the dependency can be dropped and api-responses returned as these dot-notated hashes.
Tries the /etc/kubernetes/admin.conf and /etc/kubernetes/kubelet.conf when autoconfiguring, making k8s-client work with zero config when running on kube nodes.
Some of the config code was copied and adapted from Pharos::Kube::Config which handles pretty much the same task with considerably less code than k8s before this pr.
Specs pass but still needs some cleanup and yardoc fixes.
Addresses parts of #121
K8s::Config
is replaced with an unvalidated and unstructured hash. Validating kubeconfig -files is not in the scope ofk8s-client
. In the future, this can lead to dropping the dry-dependencies, making the client easier to use in projects that have dry-dependecies of their own, which seem to generate a lot of dependency issues.RecursiveOpenStruct
, the config uses a simple selfmade hash-extension that pretty much works the same. Later the dependency can be dropped and api-responses returned as these dot-notated hashes./etc/kubernetes/admin.conf
and/etc/kubernetes/kubelet.conf
when autoconfiguring, making k8s-client work with zero config when running on kube nodes.Pharos::Kube::Config
which handles pretty much the same task with considerably less code than k8s before this pr.Specs pass but still needs some cleanup and yardoc fixes.