Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix ci permission issue with minikube start #328

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/cluster-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,19 @@ 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: print k8s cluster status
shell: bash --noprofile --norc -eo pipefail -x {0}
run: |
minikube status
kubectl get nodes
kubectl cluster-info
kubectl get pods -n kube-system

- 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
Loading