diff --git a/.github/actions/start-k8s-cluster/action.yaml b/.github/actions/start-k8s-cluster/action.yaml deleted file mode 100644 index 0160b2dc..00000000 --- a/.github/actions/start-k8s-cluster/action.yaml +++ /dev/null @@ -1,46 +0,0 @@ -name: start-k8s-cluster -description: Creates and configures a k8s cluster for all things TNF-related -inputs: - working_directory: - default: . - oc_kcm_timeout: - default: 5m - -runs: - using: 'composite' - steps: - - name: Run Bootstrap Cluster - run: make bootstrap-cluster - working-directory: ${{ inputs.working_directory }} - shell: bash - - - name: Run Bootstrap Docker - run: make bootstrap-docker-ubuntu-local - working-directory: ${{ inputs.working_directory }} - shell: bash - - - name: Start the cluster - run: make rebuild-cluster - working-directory: ${{ inputs.working_directory }} - shell: bash - env: - SKIP_PRELOAD_IMAGES: true - - # Wait for all pods to be ready - - name: Wait for all pods ready - run: | - echo "Waiting for kube-controller-manager... (timeout: ${{ inputs.oc_kcm_timeout }})" && \ - oc wait -n kube-system --for=condition=ready pod --all=true --timeout=${{ inputs.oc_kcm_timeout }} - shell: bash - - - name: Display kube-system pods - run: oc get pods -n kube-system -o wide - shell: bash - - - name: Display cluster nodes - run: oc get nodes - shell: bash - - - name: Display a friendly summary message - run: echo "TNF-compatible cluster is ready to go! Have fun!" - shell: bash diff --git a/.github/workflows/local-test-infra.yaml b/.github/workflows/local-test-infra.yaml index 113d0729..d98feea6 100644 --- a/.github/workflows/local-test-infra.yaml +++ b/.github/workflows/local-test-infra.yaml @@ -27,8 +27,15 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Start the k8s cluster - uses: ./.github/actions/start-k8s-cluster + - name: Setup the k8s cluster + uses: palmsoftware/quick-k8s@v0.0.21 + with: + disableDefaultCni: true + numControlPlaneNodes: 1 + numWorkerNodes: 3 + installOLM: true + removeDefaultStorageClass: true + removeControlPlaneTaint: true - name: Create `local-test-infra` OpenShift resources uses: ./.github/actions/create-local-test-infra-resources diff --git a/.github/workflows/pre-main.yml b/.github/workflows/pre-main.yml index a5958162..8301e158 100644 --- a/.github/workflows/pre-main.yml +++ b/.github/workflows/pre-main.yml @@ -50,8 +50,8 @@ jobs: level: warning braces: level: warning - smoke-tests: - name: Run Smoke Tests + smoke-tests-k8s: + name: Run Smoke Tests on k8s runs-on: ubuntu-22.04 env: SHELL: /bin/bash @@ -59,26 +59,6 @@ jobs: PFLT_DOCKERCONFIG: '/home/runner/.docker/config' steps: - # Restart docker using /mnt/docker-storage (sdb) instead of /var/lib/docker (sda). - # This step needs to be done right after the partner repo's bootstrap scripts, as they - # overwrite the docker's daemon.json. - - name: Create docker/daemon.json if it does not exist - run: | - if [ ! -f /etc/docker/daemon.json ]; then - echo '{}' | sudo tee /etc/docker/daemon.json - fi - - - name: Make docker to use /mnt (sdb) for storage - run: | - df -h - lsblk - sudo mkdir /mnt/docker-storage - sudo jq '. +={"data-root" : "/mnt/docker-storage"}' < /etc/docker/daemon.json > /tmp/docker-daemon.json - sudo cp /tmp/docker-daemon.json /etc/docker/daemon.json - cat /etc/docker/daemon.json - sudo systemctl restart docker - sudo ls -la /mnt/docker-storage - - name: Check out `certsuite-sample-workload` uses: actions/checkout@v4 with: @@ -92,14 +72,15 @@ jobs: - name: Disable default go problem matcher run: echo "::remove-matcher owner=go::" - - name: Write temporary docker file - run: | - mkdir -p /home/runner/.docker - touch ${PFLT_DOCKERCONFIG} - echo '{ "auths": {} }' >> ${PFLT_DOCKERCONFIG} - - - name: Start the k8s cluster - uses: ./.github/actions/start-k8s-cluster + - name: Setup quick-k8s cluster + uses: palmsoftware/quick-k8s@v0.0.21 + with: + disableDefaultCni: true + numControlPlaneNodes: 1 + numWorkerNodes: 3 + installOLM: true + removeDefaultStorageClass: true + removeControlPlaneTaint: true - name: Create `local-test-infra` OpenShift resources uses: ./.github/actions/create-local-test-infra-resources diff --git a/.github/workflows/preflight.yml b/.github/workflows/preflight.yml index 2ec5215e..5df9d718 100644 --- a/.github/workflows/preflight.yml +++ b/.github/workflows/preflight.yml @@ -72,9 +72,6 @@ jobs: repository: redhat-openshift-ecosystem/openshift-preflight path: openshift-preflight - # - name: Setup tmate session - # uses: mxschmitt/action-tmate@v3 - - name: Run preflight working-directory: openshift-preflight run: | diff --git a/Makefile b/Makefile index bf5fbdb9..4f7cfd70 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,6 @@ install: ./scripts/deploy-pod-disruption-budget.sh ./scripts/deploy-special-resources.sh ./scripts/deploy-test-crds.sh - ./scripts/install-olm.sh ./scripts/manage-service.sh deploy ./scripts/deploy-network-policies.sh ./scripts/delete-standard-storageclass.sh @@ -31,7 +30,6 @@ install-for-qe: sed --version >/dev/null 2>&1 || { printf >&2 'Install GNU sed.\n'; exit 1; } ./scripts/fix-node-labels.sh ./scripts/deploy-multus-network.sh - ./scripts/install-olm.sh ./scripts/delete-standard-storageclass.sh ./scripts/deploy-cr-scale-operator.sh