diff --git a/k8s-agent-debug-cluster-config/launchSettings.template.json b/k8s-agent-debug-cluster-config/launchSettings.template.json index 45b765225..83853191c 100644 --- a/k8s-agent-debug-cluster-config/launchSettings.template.json +++ b/k8s-agent-debug-cluster-config/launchSettings.template.json @@ -20,7 +20,7 @@ "OCTOPUS__K8STENTACLE__PERSISTENTVOLUMESIZE": "10Gi", "KUBECONFIG": "", "DefaultLogDirectory": "/tmp/k8s-agent-debug-vol/logs", - "BOOTSTRAPRUNNEREXECUTABLEPATH": "/tmp/k8s-agent-debug-vol/bootstrapRunner", + "BOOTSTRAPRUNNEREXECUTABLEDIRECTORY": "/tmp/k8s-agent-debug-vol", "OCTOPUS__K8STENTACLE__PODRESOURCEJSON": "{\"requests\":{\"cpu\":\"25m\",\"memory\":\"100Mi\"}}" } } diff --git a/setup-k8s-agent-for-local-debug.sh b/setup-k8s-agent-for-local-debug.sh index 4bded7714..8c2c08e55 100755 --- a/setup-k8s-agent-for-local-debug.sh +++ b/setup-k8s-agent-for-local-debug.sh @@ -43,7 +43,15 @@ if [ $? -ne 0 ]; then fi echo "🏗️ - Building bootstrap runner" -env GOOS=linux go build -C docker/kubernetes-agent-tentacle/bootstrapRunner -ldflags "-s -w" -o "/tmp/k8s-agent-debug-vol/bootstrapRunner" +case "$(uname -m)" in + x86_64) GOARCH="amd64" ;; + aarch64|arm64) GOARCH="arm64" ;; + *) + echo "❗ - Unsupported architecture: $(uname -m). Aborting." + exit 1 + ;; +esac +env GOOS=linux go build -C docker/kubernetes-agent-tentacle/bootstrapRunner -ldflags "-s -w" -o "/tmp/k8s-agent-debug-vol/bootstrapRunner-linux-${GOARCH}" if [ $? -ne 0 ]; then echo "" @@ -52,6 +60,9 @@ if [ $? -ne 0 ]; then exit -1 fi +echo "🏗️ - Coping bootstrap runner executor" +cp docker/kubernetes-agent-tentacle/bootstrapRunner/execute-bootstrapRunner.sh /tmp/k8s-agent-debug-vol + echo "" echo "" echo "The cluster is ready! 👌"