def Config.from_kubeconfig

bend-kube-runtime@0.2.0.0 · src/client.bend:628

import bend-kube-runtime@0.2.0.0/src/client.bend as Client
import Base
import bend-kube-runtime@0.2.0.0/src/json.bend as J
import bend-kube-runtime@0.2.0.0/src/config.bend as K

628# A kubeconfig (one path, or a KUBECONFIG list "a:b") at a context ("" for
629# its current one). JSON and YAML are both read natively.
630def Config.from_kubeconfig(+path: String, ctx: String) -> IO(Result<&2, &2, String, K.Config>):
631  IO.bind(Maybe<&2, J.Json>, Result<&2, &2, String, K.Config>,
632    Kc.merge(String.split(path, ':'), None{}),
633    m => IO.pure(Result<&2, &2, String, K.Config>, Config.from_kubeconfig.got(m, ctx)))

Uses (12)

Used by (2)