def Kube.config.build

bend-kube-runtime@0.2.0.0 · src/config.bend:225

import bend-kube-runtime@0.2.0.0/src/config.bend as Config
import Base
import bend-kube-runtime@0.2.0.0/src/json.bend as J

225def Kube.config.build(+cl: J.Json, +u: J.Json, ns: String, name: String, missing: Bool) ->
226  Result<&2, &2, String, Config>:
227  match missing:
228    case True{}:
229      Fail{"kubeconfig: no context named " ++ name}
230    case False{}:
231      Kube.config.server(J.Json.get(cl, "server"), Kube.src(cl, "certificate-authority"),
232        Kube.src(u, "client-certificate"), Kube.src(u, "client-key"), Kube.token(u), ns)

Uses (10)

Used by (1)