def Kube.token.exec

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

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

168# A plugin runs under `env`, which sets the plugin's env entries (and
169# KUBERNETES_EXEC_INFO, as client-go does) on top of our environment.
170def Kube.token.exec(c: J.Json, env: List<&2, String>, args: List<&2, String>) -> Src:
171  match c:
172    case J.JStr{cmd}:
173      FromExec{"env", List.append(&2, String, env,
174        ("KUBERNETES_EXEC_INFO={\"apiVersion\":\"client.authentication.k8s.io/v1\",\"kind\":\"ExecCredential\",\"spec\":{\"interactive\":false}}")
175          <> cmd <> args)}
176    case _:
177      NoSrc{}

Uses (5)

Used by (1)