From 47bdd6bcb83d5d70bc2ae7f7b34465d31d7f5963 Mon Sep 17 00:00:00 2001 From: dilverse <109769432+dilverse@users.noreply.github.com> Date: Mon, 26 Sep 2022 15:57:14 -0700 Subject: [PATCH 1/6] Add new job to test Kubernetes 1.20 Adding new job to test for the last supported version of kubernetes --- .github/workflows/helm.yaml | 25 +++++++++++++++++++++++++ testing/common.sh | 6 +++++- testing/kind-config-floor.yaml | 14 ++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 testing/kind-config-floor.yaml diff --git a/.github/workflows/helm.yaml b/.github/workflows/helm.yaml index d89f2a00659..a1ba63b0ae9 100644 --- a/.github/workflows/helm.yaml +++ b/.github/workflows/helm.yaml @@ -40,3 +40,28 @@ jobs: chmod +x kubectl mv kubectl /usr/local/bin "${GITHUB_WORKSPACE}/testing/check-helm.sh" + build-floor: + # The type of runner that the job will run on + runs-on: ${{ matrix.os }} + strategy: + matrix: + go-version: [1.18.x] + os: [ubuntu-latest] + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + # Runs a set of commands using the runners shell + - name: Deploy a MinIO Tenant on Kind + env: + TEST_FLOOR: true + run: | + curl -sLO "https://dl.k8s.io/release/v1.23.1/bin/linux/amd64/kubectl" -o kubectl + chmod +x kubectl + mv kubectl /usr/local/bin + "${GITHUB_WORKSPACE}/testing/check-helm.sh" diff --git a/testing/common.sh b/testing/common.sh index ae18e2ee52b..f1d5d865b85 100644 --- a/testing/common.sh +++ b/testing/common.sh @@ -40,7 +40,11 @@ die() { try() { "$@" || die "cannot $*"; } function setup_kind() { - try kind create cluster --config "${SCRIPT_DIR}/kind-config.yaml" + if ["$TEST_FLOOR" == "true"]; then + try kind create cluster --config "${SCRIPT_DIR}/kind-config-floor.yaml" + else + try kind create cluster --config "${SCRIPT_DIR}/kind-config.yaml" + fi echo "Kind is ready" try kubectl get nodes } diff --git a/testing/kind-config-floor.yaml b/testing/kind-config-floor.yaml new file mode 100644 index 00000000000..878eae11af0 --- /dev/null +++ b/testing/kind-config-floor.yaml @@ -0,0 +1,14 @@ +# four node (two workers) cluster config +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.20.15 + - role: worker + image: kindest/node:v1.20.15 + - role: worker + image: kindest/node:v1.20.15 + - role: worker + image: kindest/node:v1.20.15 + - role: worker + image: kindest/node:v1.20.15 From c448a07f0fc1fdd1af24014ea95e12f58786739a Mon Sep 17 00:00:00 2001 From: dilverse <109769432+dilverse@users.noreply.github.com> Date: Mon, 26 Sep 2022 16:01:22 -0700 Subject: [PATCH 2/6] Fix shell script format --- testing/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/common.sh b/testing/common.sh index f1d5d865b85..fc81a248172 100644 --- a/testing/common.sh +++ b/testing/common.sh @@ -40,7 +40,7 @@ die() { try() { "$@" || die "cannot $*"; } function setup_kind() { - if ["$TEST_FLOOR" == "true"]; then + if [ "$TEST_FLOOR" = "true" ]; then try kind create cluster --config "${SCRIPT_DIR}/kind-config-floor.yaml" else try kind create cluster --config "${SCRIPT_DIR}/kind-config.yaml" From 5c50c19e213d192911abec0c3c8ea190102526ac Mon Sep 17 00:00:00 2001 From: dilverse <109769432+dilverse@users.noreply.github.com> Date: Wed, 14 Dec 2022 10:48:59 +0530 Subject: [PATCH 3/6] Bump K8s floor to 1.21.14 --- testing/kind-config-floor.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testing/kind-config-floor.yaml b/testing/kind-config-floor.yaml index 878eae11af0..f47a644ee64 100644 --- a/testing/kind-config-floor.yaml +++ b/testing/kind-config-floor.yaml @@ -3,12 +3,12 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.20.15 + image: kindest/node:v1.21.14 - role: worker - image: kindest/node:v1.20.15 + image: kindest/node:v1.21.14 - role: worker - image: kindest/node:v1.20.15 + image: kindest/node:v1.21.14 - role: worker - image: kindest/node:v1.20.15 + image: kindest/node:v1.21.14 - role: worker - image: kindest/node:v1.20.15 + image: kindest/node:v1.21.14 From 5c5818a0b1a938c3832ca19a6a47fd2ab7468560 Mon Sep 17 00:00:00 2001 From: Allan Reid Date: Thu, 15 Dec 2022 09:44:13 -0800 Subject: [PATCH 4/6] Test floor --- .github/workflows/helm.yaml | 2 +- .github/workflows/kubernetes-tests.yml | 3 +-- .github/workflows/shellcheck.yaml | 3 +-- .github/workflows/vulncheck.yml | 7 +------ 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/helm.yaml b/.github/workflows/helm.yaml index a1ba63b0ae9..53074a6ef57 100644 --- a/.github/workflows/helm.yaml +++ b/.github/workflows/helm.yaml @@ -5,7 +5,7 @@ name: Add build automation for Helm Chart # Controls when the workflow will run on: # Triggers the workflow on pull request events but only for the main branch - pull_request: + [pull_request, workflow_dispatch]: branches: [ master ] # This ensures that previous jobs for the PR are canceled when the PR is diff --git a/.github/workflows/kubernetes-tests.yml b/.github/workflows/kubernetes-tests.yml index 13f7b200c84..adbda7ebc82 100644 --- a/.github/workflows/kubernetes-tests.yml +++ b/.github/workflows/kubernetes-tests.yml @@ -1,7 +1,6 @@ name: Tenant Tests On Kind on: - pull_request: - branches: [ master ] + workflow_dispatch concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} cancel-in-progress: true diff --git a/.github/workflows/shellcheck.yaml b/.github/workflows/shellcheck.yaml index 1d36c630100..62f3533fe3d 100644 --- a/.github/workflows/shellcheck.yaml +++ b/.github/workflows/shellcheck.yaml @@ -1,8 +1,7 @@ # Controls when the workflow will run on: # Triggers the workflow on pull request events but only for the main branch - pull_request: - branches: [ master ] + workflow_dispatch name: 'Trigger: Push action' diff --git a/.github/workflows/vulncheck.yml b/.github/workflows/vulncheck.yml index 94bd14a45b1..8869f8d1230 100644 --- a/.github/workflows/vulncheck.yml +++ b/.github/workflows/vulncheck.yml @@ -1,11 +1,6 @@ name: VulnCheck on: - pull_request: - branches: - - master - push: - branches: - - master + workflow_dispatch jobs: vulncheck: name: Analysis From f1db55316124765bab45bc4fcdfd8c9beaa5772b Mon Sep 17 00:00:00 2001 From: Allan Reid Date: Thu, 15 Dec 2022 09:44:59 -0800 Subject: [PATCH 5/6] Test floor --- .github/workflows/helm.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/helm.yaml b/.github/workflows/helm.yaml index 53074a6ef57..3b5eb5ed89e 100644 --- a/.github/workflows/helm.yaml +++ b/.github/workflows/helm.yaml @@ -5,8 +5,9 @@ name: Add build automation for Helm Chart # Controls when the workflow will run on: # Triggers the workflow on pull request events but only for the main branch - [pull_request, workflow_dispatch]: + pull_request: branches: [ master ] + workflow_dispatch # This ensures that previous jobs for the PR are canceled when the PR is # updated. From 027485ded44d9eef44f299b5713fff9137b6cd14 Mon Sep 17 00:00:00 2001 From: Allan Reid Date: Thu, 15 Dec 2022 09:46:06 -0800 Subject: [PATCH 6/6] Test floor --- .github/workflows/helm.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/helm.yaml b/.github/workflows/helm.yaml index 3b5eb5ed89e..d93c0ffc468 100644 --- a/.github/workflows/helm.yaml +++ b/.github/workflows/helm.yaml @@ -5,8 +5,6 @@ name: Add build automation for Helm Chart # Controls when the workflow will run on: # Triggers the workflow on pull request events but only for the main branch - pull_request: - branches: [ master ] workflow_dispatch # This ensures that previous jobs for the PR are canceled when the PR is