From 31f8ba74d8013876b24e9f115e7db31b85c65bba Mon Sep 17 00:00:00 2001 From: Kaiwalya Joshi Date: Mon, 8 Jan 2024 22:38:19 -0600 Subject: [PATCH] fix: revert to older version of minikube & k8s --- .github/workflows/ci.yaml | 98 +++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 17e6c2ad..c7162286 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,9 +14,9 @@ on: types: - created -env: - KUBERNETES_VERSION: v1.27.6 - CHANGE_MINIKUBE_NONE_USER: true +# env: +# KUBERNETES_VERSION: v1.27.6 +# CHANGE_MINIKUBE_NONE_USER: true # jobs to run jobs: @@ -52,56 +52,56 @@ jobs: sudo apt-get install -y build-essential conntrack - name: make all (crds, manifests, checks, binary, images) run: make all - - name: install kubectl - uses: azure/setup-kubectl@v3 - with: - version: '${{ env.KUBERNETES_VERSION }}' - - name: minikube setup - uses: medyagh/setup-minikube@latest - with: - driver: none - container-runtime: docker - kubernetes-version: ${{ env.KUBERNETES_VERSION }} - wait: all - - name: verify minikube - run: | - which minikube - minikube version - minikube update-context - minikube profile list - kubectl get pods -A -o wide - - name: setup e2e environment - run: | - kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default - kubectl create secret docker-registry regcred --docker-server=https://index.docker.io/v1/ --docker-username="testanisha" --docker-password="123456789" --docker-email=testimage456@gmail.com + # - name: install kubectl + # uses: azure/setup-kubectl@v3 + # with: + # version: '${{ env.KUBERNETES_VERSION }}' + # - name: minikube setup + # uses: medyagh/setup-minikube@latest + # with: + # driver: none + # container-runtime: docker + # kubernetes-version: ${{ env.KUBERNETES_VERSION }} + # wait: all + # - name: verify minikube + # run: | + # which minikube + # minikube version + # minikube update-context + # minikube profile list + # kubectl get pods -A -o wide + # - name: setup e2e environment + # run: | + # kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default + # kubectl create secret docker-registry regcred --docker-server=https://index.docker.io/v1/ --docker-username="testanisha" --docker-password="123456789" --docker-email=testimage456@gmail.com # - uses: docker/setup-buildx-action@v3 # - name: Codecov # uses: codecov/codecov-action@v1.0.12 - # - name: Set env - # run: | - # echo "KUBERNETES_VERSION=v1.23.1" >> $GITHUB_ENV - # echo "MINIKUBE_VERSION=v1.25.2" >> $GITHUB_ENV - # echo "KUBERNETES_CONFIG_FILE=$HOME/.kube/config" >> $GITHUB_ENV - # echo "CHANGE_MINIKUBE_NONE_USER=true" >> $GITHUB_ENV - # - name: minikube setup - # run: | - # curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBERNETES_VERSION/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/ - # curl -Lo minikube https://storage.googleapis.com/minikube/releases/$MINIKUBE_VERSION/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ - # CHANGE_MINIKUBE_NONE_USER=true - # export KUBERNETES_CONFIG_FILE=$HOME/.kube/config - # export KUBERNETES_CONFIG_FILE=$HOME/.kube/config;export CHANGE_MINIKUBE_NONE_USER=true;sudo minikube start --vm-driver=none --bootstrapper=kubeadm --kubernetes-version=$KUBERNETES_VERSION - # echo "minikube started, updating context" - # export KUBERNETES_CONFIG_FILE=$HOME/.kube/config;export CHANGE_MINIKUBE_NONE_USER=true; sudo minikube update-context - # echo "context is updated" - # #JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1; done - # sleep 60 - # sudo kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default - # echo "created cluster role" - # sudo kubectl cluster-info - # echo "cluster info" - # sudo kubectl -n kube-system get pod -o wide - # sudo kubectl create secret docker-registry regcred --docker-server=https://index.docker.io/v1/ --docker-username="testanisha" --docker-password="123456789" --docker-email=testimage456@gmail.com + - name: Set env + run: | + echo "KUBERNETES_VERSION=v1.23.1" >> $GITHUB_ENV + echo "MINIKUBE_VERSION=v1.25.2" >> $GITHUB_ENV + echo "KUBERNETES_CONFIG_FILE=$HOME/.kube/config" >> $GITHUB_ENV + echo "CHANGE_MINIKUBE_NONE_USER=true" >> $GITHUB_ENV + - name: minikube setup + run: | + curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBERNETES_VERSION/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/ + curl -Lo minikube https://storage.googleapis.com/minikube/releases/$MINIKUBE_VERSION/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ + CHANGE_MINIKUBE_NONE_USER=true + export KUBERNETES_CONFIG_FILE=$HOME/.kube/config + export KUBERNETES_CONFIG_FILE=$HOME/.kube/config;export CHANGE_MINIKUBE_NONE_USER=true;sudo minikube start --vm-driver=none --bootstrapper=kubeadm --kubernetes-version=$KUBERNETES_VERSION + echo "minikube started, updating context" + export KUBERNETES_CONFIG_FILE=$HOME/.kube/config;export CHANGE_MINIKUBE_NONE_USER=true; sudo minikube update-context + echo "context is updated" + #JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1; done + sleep 60 + sudo kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default + echo "created cluster role" + sudo kubectl cluster-info + echo "cluster info" + sudo kubectl -n kube-system get pod -o wide + sudo kubectl create secret docker-registry regcred --docker-server=https://index.docker.io/v1/ --docker-username="testanisha" --docker-password="123456789" --docker-email=testimage456@gmail.com - name: E2E run: make test-e2e publish: