From bef3e8450c476f794cea819a8c729b27e97c0cdf Mon Sep 17 00:00:00 2001 From: robert-sanfeliu Date: Mon, 7 Oct 2024 10:03:35 +0200 Subject: [PATCH 1/2] Update MASTER_START_SCRIPT.sh Added echo KUBECONFIG env variable for user 'ubuntu' --- installation-scripts-onm/MASTER_START_SCRIPT.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/installation-scripts-onm/MASTER_START_SCRIPT.sh b/installation-scripts-onm/MASTER_START_SCRIPT.sh index 830eb15..923df78 100644 --- a/installation-scripts-onm/MASTER_START_SCRIPT.sh +++ b/installation-scripts-onm/MASTER_START_SCRIPT.sh @@ -1,6 +1,9 @@ #!/bin/bash echo "Master start script" +echo 'export KUBECONFIG=/etc/rancher/k3s/k3s.yaml' >> /home/ubuntu/.profile +source /home/ubuntu/.profile + echo "Installing Vela CLI" sudo -H -u ubuntu bash -c 'curl -fsSl https://kubevela.io/script/install.sh | bash' echo "Configuration complete." From aa1f93406de8055fa0852cbf5222f7d3b3b832d4 Mon Sep 17 00:00:00 2001 From: robert-sanfeliu Date: Mon, 7 Oct 2024 15:32:33 +0200 Subject: [PATCH 2/2] Update MASTER_START_SCRIPT.sh Set KUBECONFIG env var for the script execution but don't store it in ubuntu profile --- installation-scripts-onm/MASTER_START_SCRIPT.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/installation-scripts-onm/MASTER_START_SCRIPT.sh b/installation-scripts-onm/MASTER_START_SCRIPT.sh index 923df78..8236f50 100644 --- a/installation-scripts-onm/MASTER_START_SCRIPT.sh +++ b/installation-scripts-onm/MASTER_START_SCRIPT.sh @@ -1,8 +1,7 @@ #!/bin/bash echo "Master start script" -echo 'export KUBECONFIG=/etc/rancher/k3s/k3s.yaml' >> /home/ubuntu/.profile -source /home/ubuntu/.profile +export KUBECONFIG=/etc/rancher/k3s/k3s.yaml echo "Installing Vela CLI" sudo -H -u ubuntu bash -c 'curl -fsSl https://kubevela.io/script/install.sh | bash'