Compare commits

...

2 Commits

Author SHA1 Message Date
375ae575e5
Added ssh hostname to starship config
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2022-08-06 21:56:42 +01:00
88474c7831
Updated kube-ssh to use alpine
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2022-07-15 08:00:35 +01:00
2 changed files with 7 additions and 23 deletions

View File

@ -66,29 +66,7 @@ if [[ "$NODE" == "" ]]; then
fi
fi
NODE_NAME=$(kubectl get node $NODE -o template --template='{{index .metadata.labels "kubernetes.io/hostname"}}')
NODE_SELECTOR='"nodeSelector": { "kubernetes.io/hostname": "'${NODE_NAME}'" },'
kubectl run --namespace ${NAMESPACE} $POD --restart=Never -it --rm --image overriden --overrides '
{
"spec": {
"hostPID": true,
"hostNetwork": true,
'"${NODE_SELECTOR}"'
"tolerations": [{
"operator": "Exists"
}],
"containers": [
{
"name": "kube-ssh",
"image": "averagemarcus/kube-ssh:latest",
"stdin": true,
"tty": true,
"securityContext": {
"privileged": true
}
}
]
}
}' --attach
kubectl run --namespace ${NAMESPACE} $POD --rm -it --image alpine --privileged --overrides '{"spec":{'"${NODE_SELECTOR}"'"hostPID": true}}' --command nsenter -- --mount=/proc/1/ns/mnt -- /bin/bash

View File

@ -1,6 +1,7 @@
format = """\
$status\
$cmd_duration\
$hostname\
$directory\
$git_branch\
$git_commit\
@ -22,6 +23,11 @@ format = """\
command_timeout = 1000
add_newline = true
[hostname]
ssh_only = true
format = "🌐 [$hostname](bold dimmed blue) \n"
disabled = false
[directory]
format = "┏  [$path]($style)[$read_only]($read_only_style) "