Commit 9a76c022 authored by Daniel Smith's avatar Daniel Smith

Merge pull request #20408 from kylegordon/patch-1

Use kube account to make changes via govc
parents e6639de3 63b61a72
...@@ -188,6 +188,7 @@ function kube-up-vm { ...@@ -188,6 +188,7 @@ function kube-up-vm {
govc vm.ip "${vm_name}" > /dev/null govc vm.ip "${vm_name}" > /dev/null
govc guest.mkdir \ govc guest.mkdir \
-l "kube:kube" \
-vm="${vm_name}" \ -vm="${vm_name}" \
-p \ -p \
/home/kube/.ssh /home/kube/.ssh
...@@ -195,6 +196,7 @@ function kube-up-vm { ...@@ -195,6 +196,7 @@ function kube-up-vm {
ssh-add -L > "${KUBE_TEMP}/${vm_name}-authorized_keys" ssh-add -L > "${KUBE_TEMP}/${vm_name}-authorized_keys"
govc guest.upload \ govc guest.upload \
-l "kube:kube" \
-vm="${vm_name}" \ -vm="${vm_name}" \
-f \ -f \
"${KUBE_TEMP}/${vm_name}-authorized_keys" \ "${KUBE_TEMP}/${vm_name}-authorized_keys" \
...@@ -209,7 +211,7 @@ function kube-run { ...@@ -209,7 +211,7 @@ function kube-run {
local vm_name="$1" local vm_name="$1"
local file="$2" local file="$2"
local dst="/tmp/$(basename "${file}")" local dst="/tmp/$(basename "${file}")"
govc guest.upload -vm="${vm_name}" -f -perm=0755 "${file}" "${dst}" govc guest.upload -l "kube:kube" -vm="${vm_name}" -f -perm=0755 "${file}" "${dst}"
echo "uploaded ${file} to ${dst}" echo "uploaded ${file} to ${dst}"
local vm_ip local vm_ip
vm_ip=$(govc vm.ip "${vm_name}") vm_ip=$(govc vm.ip "${vm_name}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment