From 56cebfb4857a77fe77ed06cd84d4cf5689428f89 Mon Sep 17 00:00:00 2001 From: Wainer dos Santos Moschetta Date: Wed, 9 Aug 2023 18:18:10 -0300 Subject: [PATCH] ci: k8s: add deploy-kata-kcli() to gh-run.sh The cleanup-kcli() behaves like other deploy kata for bare-metal (e.g. sev, tdx...etc) except that KUBECONFIG should be exported. Fixes #7620 Signed-off-by: Wainer dos Santos Moschetta (cherry picked from commit c2ef1f0fb089c5cce3e2c126b6c544e7e8166a58) --- tests/integration/kubernetes/gha-run.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/integration/kubernetes/gha-run.sh b/tests/integration/kubernetes/gha-run.sh index cf17fa6397..8835c23ea3 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -95,7 +95,10 @@ function deploy_kata() { platform="${1}" ensure_yq - # Emsure we're in the default namespace + [ "$platform" = "kcli" ] && \ + export KUBECONFIG="$HOME/.kcli/clusters/${CLUSTER_NAME:-kata-k8s}/auth/kubeconfig" + + # Ensure we're in the default namespace kubectl config set-context --current --namespace=default sed -i -e "s|quay.io/kata-containers/kata-deploy:latest|${DOCKER_REGISTRY}/${DOCKER_REPO}:${DOCKER_TAG}|g" "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" @@ -217,6 +220,7 @@ function main() { install-kubectl) install_kubectl ;; get-cluster-credentials) get_cluster_credentials ;; deploy-kata-aks) deploy_kata "aks" ;; + deploy-kata-kcli) deploy_kata "kcli" ;; deploy-kata-sev) deploy_kata "sev" ;; deploy-kata-snp) deploy_kata "snp" ;; deploy-kata-tdx) deploy_kata "tdx" ;;