From cde00352502b6a8ec173f4c3dbca5fd5ec4eb893 Mon Sep 17 00:00:00 2001 From: Caner Derici Date: Thu, 28 Sep 2023 18:46:39 -0600 Subject: [PATCH] Add debug logs in k8s tunnel script --- .github/workflows/k8s_tunnel.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/k8s_tunnel.yml b/.github/workflows/k8s_tunnel.yml index 6cd41b3d..c1e132c7 100644 --- a/.github/workflows/k8s_tunnel.yml +++ b/.github/workflows/k8s_tunnel.yml @@ -73,13 +73,9 @@ jobs: echo "EOF" >> $GITHUB_ENV - run: go mod download - run: | - - # Make sure we have sufficient permissions to access microk8s - sudo usermod -a -G microk8s runner - sudo chown -R runner ~/.kube - # enable ingress and metallb to sudo microk8s enable ingress + echo "Ingress enabled." # determine a subnet for metallb subnet="$(ip route get 1 | head -n 1 | awk '{print $7}' | awk -F. '{print $1 "." $2 "." $3 ".240/24"}')"; echo "$subnet" @@ -87,8 +83,13 @@ jobs: # enable metallb sudo microk8s enable metallb:$subnet - # get the service layout (for debugging purposes) - microk8s.kubectl get services -n controller-$CONTROLLER controller-service + # Make sure we have sufficient permissions to access microk8s + echo "Adding runner user microk8s group" + sudo usermod -a -G microk8s runner + sudo chown -R runner ~/.kube + + echo "Services layout:" + sudo microk8s.kubectl get services -n controller-$CONTROLLER controller-service # bring up the load balancer service sudo microk8s.kubectl apply -f - <