diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a2a88dc..5c9dc2c2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -110,11 +110,6 @@ jobs: cni: calico start-args: '--install-addons=false' - - name: Set up Helm - uses: azure/setup-helm@v4 - with: - version: v3.14.3 - - name: Build images locally run: make lvm-driver-image || exit 1; diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index dc48ddd9..981ea740 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -114,11 +114,6 @@ jobs: kubernetes-version: ${{ matrix.kubernetes }} cni: calico start-args: '--install-addons=false' - - - name: Set up Helm - uses: azure/setup-helm@v4 - with: - version: v3.14.3 - name: Build images locally run: make lvm-driver-image || exit 1; diff --git a/ci/ci-test.sh b/ci/ci-test.sh index 36abb1a5..5e9c8b21 100755 --- a/ci/ci-test.sh +++ b/ci/ci-test.sh @@ -16,12 +16,12 @@ set -e -LVM_CHART=deploy/helm/charts +LVM_OPERATOR="$(realpath deploy/lvm-operator.yaml)" SNAP_CLASS="$(realpath deploy/sample/lvmsnapclass.yaml)" -export OPENEBS_NAMESPACE="openebs" -export LVM_NAMESPACE="openebs" +export LVM_NAMESPACE="openebs" export TEST_DIR="tests" +export NAMESPACE="kube-system" # allow override if [ -z "${KUBECONFIG}" ] @@ -70,7 +70,7 @@ cleanup() { kubectl delete pvc -n openebs lvmpv-pvc kubectl delete -f "${SNAP_CLASS}" - helm uninstall openebs-lvmlocalpv -n "$OPENEBS_NAMESPACE" + kubectl delete -f "${LVM_OPERATOR}" # always return true return 0 @@ -99,29 +99,29 @@ sudo modprobe dm_thin_pool # Prepare env for running BDD tests # Minikube is already running -helm install openebs-lvmlocalpv "$LVM_CHART" -n "$OPENEBS_NAMESPACE" --create-namespace --dependency-update --set analytics.enabled=false +kubectl apply -f "${LVM_OPERATOR}" kubectl apply -f "${SNAP_CLASS}" dumpAgentLogs() { NR=$1 - AgentPOD=$(kubectl get pods -l app=openebs-lvm-node -o jsonpath='{.items[0].metadata.name}' -n "$OPENEBS_NAMESPACE") - kubectl describe po "$AgentPOD" -n "$OPENEBS_NAMESPACE" + AgentPOD=$(kubectl get pods -l app=openebs-lvm-node -o jsonpath='{.items[0].metadata.name}' -n "$NAMESPACE") + kubectl describe po "$AgentPOD" -n "$NAMESPACE" printf "\n\n" - kubectl logs --tail="${NR}" "$AgentPOD" -n "$OPENEBS_NAMESPACE" -c openebs-lvm-plugin + kubectl logs --tail="${NR}" "$AgentPOD" -n "$NAMESPACE" -c openebs-lvm-plugin printf "\n\n" } dumpControllerLogs() { NR=$1 - ControllerPOD=$(kubectl get pods -l app=openebs-lvm-controller -o jsonpath='{.items[0].metadata.name}' -n "$OPENEBS_NAMESPACE") - kubectl describe po "$ControllerPOD" -n "$OPENEBS_NAMESPACE" + ControllerPOD=$(kubectl get pods -l app=openebs-lvm-controller -o jsonpath='{.items[0].metadata.name}' -n "$NAMESPACE") + kubectl describe po "$ControllerPOD" -n "$NAMESPACE" printf "\n\n" - kubectl logs --tail="${NR}" "$ControllerPOD" -n "$OPENEBS_NAMESPACE" -c openebs-lvm-plugin + kubectl logs --tail="${NR}" "$ControllerPOD" -n "$NAMESPACE" -c openebs-lvm-plugin printf "\n\n" } isPodReady(){ - [ "$(kubectl get po "$1" -o 'jsonpath={.status.conditions[?(@.type=="Ready")].status}' -n "$OPENEBS_NAMESPACE")" = 'True' ] + [ "$(kubectl get po "$1" -o 'jsonpath={.status.conditions[?(@.type=="Ready")].status}' -n "$NAMESPACE")" = 'True' ] } isDriverReady(){ @@ -136,7 +136,7 @@ waitForLVMDriver() { i=0 while [ "$i" -le "$period" ]; do - lvmDriver="$(kubectl get pods -l role=openebs-lvm -o 'jsonpath={.items[*].metadata.name}' -n "$OPENEBS_NAMESPACE")" + lvmDriver="$(kubectl get pods -l role=openebs-lvm -o 'jsonpath={.items[*].metadata.name}' -n "$NAMESPACE")" if isDriverReady "$lvmDriver"; then return 0 fi @@ -155,7 +155,7 @@ waitForLVMDriver cd $TEST_DIR -kubectl get po -n "$OPENEBS_NAMESPACE" +kubectl get po -n "$NAMESPACE" set +e @@ -186,10 +186,10 @@ echo "get sc details" kubectl get sc --all-namespaces -oyaml echo "get lvm volume details" -kubectl get lvmvolumes.local.openebs.io -n "$OPENEBS_NAMESPACE" -oyaml +kubectl get lvmvolumes.local.openebs.io -n openebs -oyaml echo "get lvm snapshot details" -kubectl get lvmsnapshots.local.openebs.io -n "$OPENEBS_NAMESPACE" -oyaml +kubectl get lvmsnapshots.local.openebs.io -n openebs -oyaml exit 1 fi @@ -197,4 +197,4 @@ fi printf "\n\n######### All test cases passed #########\n\n" # last statement formatted to always return true -[ -z "${CLEANUP}" ] || cleanup 2>/dev/null +[ -z "${CLEANUP}" ] || cleanup 2>/dev/null \ No newline at end of file