Skip to content

Commit

Permalink
ci: fix ci permission issue with minikube start
Browse files Browse the repository at this point in the history
this commit upgrade the minikube, k8s, crictl versions
in CI and also fix permission error in the github runner.

Signed-off-by: subhamkrai <srai@redhat.com>
  • Loading branch information
subhamkrai committed Sep 23, 2024
1 parent c5e7d60 commit efb25c5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/cluster-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ runs:
- name: Setup Minikube
shell: bash --noprofile --norc -eo pipefail -x {0}
run: |
tests/github-action-helper.sh install_minikube_with_none_driver v1.30.2
tests/github-action-helper.sh install_minikube_with_none_driver v1.31.0
- name: use local disk
shell: bash --noprofile --norc -eo pipefail -x {0}
run: tests/github-action-helper.sh use_local_disk

- name: print k8s cluster status
shell: bash --noprofile --norc -eo pipefail -x {0}
run: |
minikube status
kubectl get nodes
- name: use local disk
shell: bash --noprofile --norc -eo pipefail -x {0}
run: tests/github-action-helper.sh use_local_disk

- name: deploy rook cluster
shell: bash --noprofile --norc -eo pipefail -x {0}
if: inputs.op-ns == 'rook-ceph' || inputs.cluster-ns == 'rook-ceph'
Expand Down
16 changes: 8 additions & 8 deletions tests/github-action-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ deploy_rook_in_custom_namespace() {
deploy_csi_driver_custom_ns "$OPERATOR_NS" "$CLUSTER_NS"
}

create_sc_with_retain_policy(){
create_sc_with_retain_policy() {
export OPERATOR_NS=$1
export CLUSTER_NS=$2

Expand Down Expand Up @@ -209,25 +209,25 @@ timeout_command_exit_code() {
}

install_minikube_with_none_driver() {
CRICTL_VERSION="v1.28.0"
MINIKUBE_VERSION="v1.33.1"
CRICTL_VERSION="v1.31.1"
MINIKUBE_VERSION="v1.34.0"

sudo apt update
sudo apt install -y conntrack socat
curl -LO https://storage.googleapis.com/minikube/releases/$MINIKUBE_VERSION/minikube_latest_amd64.deb
sudo dpkg -i minikube_latest_amd64.deb
rm -f minikube_latest_amd64.deb

curl -LO https://github.com/Mirantis/cri-dockerd/releases/download/v0.3.4/cri-dockerd_0.3.4.3-0.ubuntu-focal_amd64.deb
sudo dpkg -i cri-dockerd_0.3.4.3-0.ubuntu-focal_amd64.deb
rm -f cri-dockerd_0.3.4.3-0.ubuntu-focal_amd64.deb
curl -LO https://github.com/Mirantis/cri-dockerd/releases/download/v0.3.15/cri-dockerd_0.3.15.3-0.ubuntu-focal_amd64.deb
sudo dpkg -i cri-dockerd_0.3.15.3-0.ubuntu-focal_amd64.deb
rm -f cri-dockerd_0.3.15.3-0.ubuntu-focal_amd64.deb

wget https://github.com/kubernetes-sigs/cri-tools/releases/download/$CRICTL_VERSION/crictl-$CRICTL_VERSION-linux-amd64.tar.gz
sudo tar zxvf crictl-$CRICTL_VERSION-linux-amd64.tar.gz -C /usr/local/bin
rm -f crictl-$CRICTL_VERSION-linux-amd64.tar.gz
sudo sysctl fs.protected_regular=0

CNI_PLUGIN_VERSION="v1.3.0"
CNI_PLUGIN_VERSION="v1.5.1"
CNI_PLUGIN_TAR="cni-plugins-linux-amd64-$CNI_PLUGIN_VERSION.tgz" # change arch if not on amd64
CNI_PLUGIN_INSTALL_DIR="/opt/cni/bin"

Expand All @@ -237,7 +237,7 @@ install_minikube_with_none_driver() {
rm "$CNI_PLUGIN_TAR"

export MINIKUBE_HOME=$HOME CHANGE_MINIKUBE_NONE_USER=true KUBECONFIG=$HOME/.kube/config
sudo -E minikube start --kubernetes-version="$1" --driver=none --memory 6g --cpus=2 --addons ingress --cni=calico
minikube start --kubernetes-version="$1" --driver=none --memory 6g --cpus=2 --addons ingress --cni=calico
}

install_external_snapshotter() {
Expand Down

0 comments on commit efb25c5

Please sign in to comment.