add k8s context env
This commit is contained in:
parent
d7f9b3092b
commit
29ad28627c
1 changed files with 2 additions and 1 deletions
|
@ -43,6 +43,7 @@ fun Prov.installKubectl(): ProvResult = def {
|
||||||
if(!fileExists(kubeConfigFile)) {
|
if(!fileExists(kubeConfigFile)) {
|
||||||
aptInstall("kubectl")
|
aptInstall("kubectl")
|
||||||
cmd("kubectl completion bash >> /etc/bash_completion.d/kubernetes", sudo = true)
|
cmd("kubectl completion bash >> /etc/bash_completion.d/kubernetes", sudo = true)
|
||||||
|
// TODO: externalize to file - trippeld escaping is realy ugly & does not work
|
||||||
var kubeConfig = """
|
var kubeConfig = """
|
||||||
# Set the default kube context if present
|
# Set the default kube context if present
|
||||||
DEFAULT_KUBE_CONTEXTS="$HOME/.kube/config"
|
DEFAULT_KUBE_CONTEXTS="$HOME/.kube/config"
|
||||||
|
@ -78,7 +79,7 @@ fun Prov.installKubectl(): ProvResult = def {
|
||||||
|
|
||||||
val k8sContextFile = "/usr/local/bin/k8s-create-context.sh"
|
val k8sContextFile = "/usr/local/bin/k8s-create-context.sh"
|
||||||
if(!fileExists(k8sContextFile)) {
|
if(!fileExists(k8sContextFile)) {
|
||||||
// TODO: externalize to file - trippeld escaping is realy ugly
|
// TODO: externalize to file - trippeld escaping is realy ugly & does not work
|
||||||
var k8sContext = """
|
var k8sContext = """
|
||||||
function main() {
|
function main() {
|
||||||
local cluster_name="${1}"; shift
|
local cluster_name="${1}"; shift
|
||||||
|
|
Loading…
Reference in a new issue