From ff6beeaa7d0c4c12b7f675376b3c21dcdd00f5ad Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Thu, 27 Jun 2024 15:38:57 +0300 Subject: [PATCH 1/8] Try TopoLVM setup --- .github/workflows/kindIntegTest.yml | 443 +++++++++++++++------------- 1 file changed, 234 insertions(+), 209 deletions(-) diff --git a/.github/workflows/kindIntegTest.yml b/.github/workflows/kindIntegTest.yml index fe79dd35..0fd5b14c 100644 --- a/.github/workflows/kindIntegTest.yml +++ b/.github/workflows/kindIntegTest.yml @@ -3,7 +3,6 @@ on: push: branches: - master - - 1.10.x pull_request: branches: [master] jobs: @@ -54,217 +53,243 @@ jobs: name: system-logger path: /tmp/k8ssandra-system-logger.tar # This job is only for tests that don't run or don't pass against 4.0 yet - kind_311_tests: - needs: build_docker_images - strategy: - matrix: - integration_test: - - additional_seeds #TODO: Fails against C* 4.0, fix in https://github.com/k8ssandra/cass-operator/issues/459 - - scale_down_unbalanced_racks #TODO: Fails against C* 4.0 and DSE 6.8, fix in https://github.com/k8ssandra/cass-operator/issues/459 - runs-on: ubuntu-latest - env: - CGO_ENABLED: 0 - M_INTEG_DIR: ${{ matrix.integration_test }} - M_SERVER_VERSION: 3.11.17 - M_SERVER_TYPE: cassandra - steps: - - uses: actions/checkout@v4 - if: github.event_name == 'pull_request' - with: - ref: ${{ github.event.pull_request.head.sha }} - - uses: actions/checkout@v4 - if: github.event_name != 'pull_request' - - uses: ./.github/actions/run-integ-test - with: - integration_test: ${{ matrix.integration_test }} - - name: Archive k8s logs - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: k8s-logs-${{ matrix.integration_test }} - path: ./build/kubectl_dump - # This job is only for tests that don't run or don't pass against 4.1 yet - kind_40_tests: - needs: build_docker_images - strategy: - matrix: - version: - - "4.0.12" - integration_test: - - cdc_successful # OSS only - - config_fql - runs-on: ubuntu-latest - env: - CGO_ENABLED: 0 - M_INTEG_DIR: ${{ matrix.integration_test }} - steps: - - uses: actions/checkout@v4 - if: github.event_name == 'pull_request' - with: - ref: ${{ github.event.pull_request.head.sha }} - - uses: actions/checkout@v4 - if: github.event_name != 'pull_request' - - uses: ./.github/actions/run-integ-test - with: - integration_test: ${{ matrix.integration_test }} - - name: Archive k8s logs - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: k8s-logs-${{ matrix.integration_test }} - path: ./build/kubectl_dump - kind_dse_tests: - needs: build_docker_images - strategy: - matrix: - version: - - "6.8.46" - integration_test: - - cdc_successful - include: - - version: 6.8.46 - serverImage: datastax/dse-mgmtapi-6_8:6.8.46-ubi8 # DSE 6.8.46 - serverType: dse - integration_test: "cdc_successful" - fail-fast: true - runs-on: ubuntu-latest - env: - CGO_ENABLED: 0 - M_INTEG_DIR: ${{ matrix.integration_test }} - M_SERVER_VERSION: ${{ matrix.version }} - M_SERVER_IMAGE: ${{ matrix.serverImage }} - M_SERVER_TYPE: ${{ matrix.serverType }} - steps: - - uses: actions/checkout@v4 - if: github.event_name == 'pull_request' - with: - ref: ${{ github.event.pull_request.head.sha }} - - uses: actions/checkout@v4 - if: github.event_name != 'pull_request' - - uses: ./.github/actions/run-integ-test - with: - integration_test: ${{ matrix.integration_test }} - - name: Archive k8s logs - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: k8s-logs-smoke_test-${{ matrix.version }} - path: ./build/kubectl_dump + # kind_311_tests: + # needs: build_docker_images + # strategy: + # matrix: + # integration_test: + # - additional_seeds #TODO: Fails against C* 4.0, fix in https://github.com/k8ssandra/cass-operator/issues/459 + # - scale_down_unbalanced_racks #TODO: Fails against C* 4.0 and DSE 6.8, fix in https://github.com/k8ssandra/cass-operator/issues/459 + # runs-on: ubuntu-latest + # env: + # CGO_ENABLED: 0 + # M_INTEG_DIR: ${{ matrix.integration_test }} + # M_SERVER_VERSION: 3.11.17 + # M_SERVER_TYPE: cassandra + # steps: + # - uses: actions/checkout@v4 + # if: github.event_name == 'pull_request' + # with: + # ref: ${{ github.event.pull_request.head.sha }} + # - uses: actions/checkout@v4 + # if: github.event_name != 'pull_request' + # - uses: ./.github/actions/run-integ-test + # with: + # integration_test: ${{ matrix.integration_test }} + # - name: Archive k8s logs + # if: ${{ failure() }} + # uses: actions/upload-artifact@v4 + # with: + # name: k8s-logs-${{ matrix.integration_test }} + # path: ./build/kubectl_dump + # # This job is only for tests that don't run or don't pass against 4.1 yet + # kind_40_tests: + # needs: build_docker_images + # strategy: + # matrix: + # version: + # - "4.0.12" + # integration_test: + # - cdc_successful # OSS only + # - config_fql + # runs-on: ubuntu-latest + # env: + # CGO_ENABLED: 0 + # M_INTEG_DIR: ${{ matrix.integration_test }} + # steps: + # - uses: actions/checkout@v4 + # if: github.event_name == 'pull_request' + # with: + # ref: ${{ github.event.pull_request.head.sha }} + # - uses: actions/checkout@v4 + # if: github.event_name != 'pull_request' + # - uses: ./.github/actions/run-integ-test + # with: + # integration_test: ${{ matrix.integration_test }} + # - name: Archive k8s logs + # if: ${{ failure() }} + # uses: actions/upload-artifact@v4 + # with: + # name: k8s-logs-${{ matrix.integration_test }} + # path: ./build/kubectl_dump + # kind_dse_tests: + # needs: build_docker_images + # strategy: + # matrix: + # version: + # - "6.8.46" + # integration_test: + # - cdc_successful + # include: + # - version: 6.8.46 + # serverImage: datastax/dse-mgmtapi-6_8:6.8.46-ubi8 # DSE 6.8.46 + # serverType: dse + # integration_test: "cdc_successful" + # fail-fast: true + # runs-on: ubuntu-latest + # env: + # CGO_ENABLED: 0 + # M_INTEG_DIR: ${{ matrix.integration_test }} + # M_SERVER_VERSION: ${{ matrix.version }} + # M_SERVER_IMAGE: ${{ matrix.serverImage }} + # M_SERVER_TYPE: ${{ matrix.serverType }} + # steps: + # - uses: actions/checkout@v4 + # if: github.event_name == 'pull_request' + # with: + # ref: ${{ github.event.pull_request.head.sha }} + # - uses: actions/checkout@v4 + # if: github.event_name != 'pull_request' + # - uses: ./.github/actions/run-integ-test + # with: + # integration_test: ${{ matrix.integration_test }} + # - name: Archive k8s logs + # if: ${{ failure() }} + # uses: actions/upload-artifact@v4 + # with: + # name: k8s-logs-smoke_test-${{ matrix.version }} + # path: ./build/kubectl_dump - kind_int_tests: - needs: build_docker_images - strategy: - matrix: - version: - - "4.1.4" - integration_test: - # Single worker tests: - - additional_serviceoptions - - additional_volumes - # - delete_node_terminated_container # This does not test any operator behavior - - podspec_simple - # - smoke_test_oss # Converted to test_all_the_things, see below job - # - smoke_test_dse # Converted to test_all_the_things, see below job - # - terminate - # - timeout_prestop_termination - # - upgrade_operator # See kind_311_tests job, Only works for 3.11 right now - - webhook_validation - # Three worker tests: - - canary_upgrade - # - config_change_condition # config_change takes care of testing the same - #- cdc_successful # OSS only - # - delete_node_lost_readiness # DSE specific behavior - - host_network - - internode-encryption-generated - #- no_infinite_reconcile # smoke_test_* should take care of this - - node_replace - - nodeport_service - - rolling_restart - - rolling_restart_with_override - # - stop_resume - - superuser-secret-generated - - superuser-secret-provided - - test_bad_config_and_fix - - test_mtls_mgmt_api - - upgrade_operator - # More than 3 workers tests: - - add_racks - #- additional_seeds #TODO: Fails against C* 4.0, fix in https://github.com/k8ssandra/cass-operator/issues/459 - - cluster_wide_install - - config_change - - config_secret - # - multi_cluster_management - #- oss_test_all_the_things # This is now the smoke test, see kind_smoke_tests job - - scale_down - # - scale_down_not_enough_space # Not enough stable test - #- scale_down_unbalanced_racks #TODO: Fails against C* 4.0 and DSE, fix in https://github.com/k8ssandra/cass-operator/issues/459 - - scale_up - - scale_up_stop_resume - - seed_selection - #- config_fql # OSS only - - decommission_dc - # - stop_resume_scale_up # Odd insufficient CPU issues in kind+GHA - # let other tests continue to run - # even if one fails - fail-fast: false - runs-on: ubuntu-latest - env: - CGO_ENABLED: 0 - M_INTEG_DIR: ${{ matrix.integration_test }} - M_SERVER_VERSION: ${{ matrix.version }} - steps: - - uses: actions/checkout@v4 - if: github.event_name == 'pull_request' - with: - ref: ${{ github.event.pull_request.head.sha }} - - uses: actions/checkout@v4 - if: github.event_name != 'pull_request' - - uses: ./.github/actions/run-integ-test - with: - integration_test: ${{ matrix.integration_test }} - - name: Archive k8s logs - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: k8s-logs-${{ matrix.integration_test }}-${{ matrix.version }} - path: ./build/kubectl_dump - kind_smoke_tests: - needs: build_docker_images - strategy: - matrix: - version: - - "3.11.17" - - "4.0.12" - - "4.1.4" - - "6.8.46" - integration_test: - - test_all_the_things - include: - - version: 6.8.46 - serverImage: datastax/dse-mgmtapi-6_8:6.8.46-ubi8 # DSE 6.8.46 - serverType: dse - integration_test: "test_all_the_things" - fail-fast: true + # kind_int_tests: + # needs: build_docker_images + # strategy: + # matrix: + # version: + # - "4.1.4" + # integration_test: + # # Single worker tests: + # - additional_serviceoptions + # - additional_volumes + # # - delete_node_terminated_container # This does not test any operator behavior + # - podspec_simple + # # - smoke_test_oss # Converted to test_all_the_things, see below job + # # - smoke_test_dse # Converted to test_all_the_things, see below job + # # - terminate + # # - timeout_prestop_termination + # # - upgrade_operator # See kind_311_tests job, Only works for 3.11 right now + # - webhook_validation + # # Three worker tests: + # - canary_upgrade + # # - config_change_condition # config_change takes care of testing the same + # #- cdc_successful # OSS only + # # - delete_node_lost_readiness # DSE specific behavior + # - host_network + # - internode-encryption-generated + # #- no_infinite_reconcile # smoke_test_* should take care of this + # - node_replace + # - nodeport_service + # - rolling_restart + # - rolling_restart_with_override + # # - stop_resume + # - superuser-secret-generated + # - superuser-secret-provided + # - test_bad_config_and_fix + # - test_mtls_mgmt_api + # - upgrade_operator + # # More than 3 workers tests: + # - add_racks + # #- additional_seeds #TODO: Fails against C* 4.0, fix in https://github.com/k8ssandra/cass-operator/issues/459 + # - cluster_wide_install + # - config_change + # - config_secret + # # - multi_cluster_management + # #- oss_test_all_the_things # This is now the smoke test, see kind_smoke_tests job + # - scale_down + # # - scale_down_not_enough_space # Not enough stable test + # #- scale_down_unbalanced_racks #TODO: Fails against C* 4.0 and DSE, fix in https://github.com/k8ssandra/cass-operator/issues/459 + # - scale_up + # - scale_up_stop_resume + # - seed_selection + # #- config_fql # OSS only + # - decommission_dc + # # - stop_resume_scale_up # Odd insufficient CPU issues in kind+GHA + # # let other tests continue to run + # # even if one fails + # fail-fast: false + # runs-on: ubuntu-latest + # env: + # CGO_ENABLED: 0 + # M_INTEG_DIR: ${{ matrix.integration_test }} + # M_SERVER_VERSION: ${{ matrix.version }} + # steps: + # - uses: actions/checkout@v4 + # if: github.event_name == 'pull_request' + # with: + # ref: ${{ github.event.pull_request.head.sha }} + # - uses: actions/checkout@v4 + # if: github.event_name != 'pull_request' + # - uses: ./.github/actions/run-integ-test + # with: + # integration_test: ${{ matrix.integration_test }} + # - name: Archive k8s logs + # if: ${{ failure() }} + # uses: actions/upload-artifact@v4 + # with: + # name: k8s-logs-${{ matrix.integration_test }}-${{ matrix.version }} + # path: ./build/kubectl_dump + # kind_smoke_tests: + # needs: build_docker_images + # strategy: + # matrix: + # version: + # - "3.11.17" + # - "4.0.12" + # - "4.1.4" + # - "6.8.46" + # integration_test: + # - test_all_the_things + # include: + # - version: 6.8.46 + # serverImage: datastax/dse-mgmtapi-6_8:6.8.46-ubi8 # DSE 6.8.46 + # serverType: dse + # integration_test: "test_all_the_things" + # fail-fast: true + # runs-on: ubuntu-latest + # env: + # CGO_ENABLED: 0 + # M_INTEG_DIR: ${{ matrix.integration_test }} + # M_SERVER_VERSION: ${{ matrix.version }} + # M_SERVER_IMAGE: ${{ matrix.serverImage }} + # M_SERVER_TYPE: ${{ matrix.serverType }} + # steps: + # - uses: actions/checkout@v4 + # if: github.event_name == 'pull_request' + # with: + # ref: ${{ github.event.pull_request.head.sha }} + # - uses: actions/checkout@v4 + # if: github.event_name != 'pull_request' + # - uses: ./.github/actions/run-integ-test + # with: + # integration_test: ${{ matrix.integration_test }} + # - name: Archive k8s logs + # if: ${{ failure() }} + # uses: actions/upload-artifact@v4 + # with: + # name: k8s-logs-smoke_test-${{ matrix.version }} + # path: ./build/kubectl_dump + check_topolvm: + name: Try TopoLVM kind installation runs-on: ubuntu-latest - env: - CGO_ENABLED: 0 - M_INTEG_DIR: ${{ matrix.integration_test }} - M_SERVER_VERSION: ${{ matrix.version }} - M_SERVER_IMAGE: ${{ matrix.serverImage }} - M_SERVER_TYPE: ${{ matrix.serverType }} steps: - - uses: actions/checkout@v4 - if: github.event_name == 'pull_request' + - name: Check out code into the Go module directory + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - - uses: actions/checkout@v4 - if: github.event_name != 'pull_request' - - uses: ./.github/actions/run-integ-test - with: - integration_test: ${{ matrix.integration_test }} - - name: Archive k8s logs - if: ${{ failure() }} - uses: actions/upload-artifact@v4 + - name: Check out code into the Go module directory + uses: actions/checkout@v4 with: - name: k8s-logs-smoke_test-${{ matrix.version }} - path: ./build/kubectl_dump + repository: topolvm/topolvm + path: topolvm + ref: topolvm-chart-v15.0.0 + - name: Create kind cluster from TopoLVM example + run: | + cd topolvm/example + make setup + make run + - name: Verify the output + run: | + kubectl get pvc + kubectl get pv + kubectl get storageclass + sudo lvscan + From 06b1eb93e5b56c5a5df2792ceaa92e066f6f3f10 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Thu, 27 Jun 2024 15:50:13 +0300 Subject: [PATCH 2/8] More hack --- .github/workflows/kindIntegTest.yml | 51 +++++++++++++++++++++++++++++ hack/topolvm-cluster.yaml | 46 ++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 hack/topolvm-cluster.yaml diff --git a/.github/workflows/kindIntegTest.yml b/.github/workflows/kindIntegTest.yml index 0fd5b14c..a5757afc 100644 --- a/.github/workflows/kindIntegTest.yml +++ b/.github/workflows/kindIntegTest.yml @@ -269,7 +269,19 @@ jobs: # path: ./build/kubectl_dump check_topolvm: name: Try TopoLVM kind installation + needs: build_docker_images + strategy: + matrix: + version: + - "4.1.4" + integration_test: + - test_all_the_things + fail-fast: true runs-on: ubuntu-latest + env: + CGO_ENABLED: 0 + M_INTEG_DIR: ${{ matrix.integration_test }} + M_SERVER_VERSION: ${{ matrix.version }} steps: - name: Check out code into the Go module directory uses: actions/checkout@v4 @@ -283,13 +295,52 @@ jobs: ref: topolvm-chart-v15.0.0 - name: Create kind cluster from TopoLVM example run: | + cp hack/topolvm-cluster.yaml topolvm/example/kind/topolvm-cluster.yaml cd topolvm/example make setup make run - name: Verify the output run: | + kubectl get nodes kubectl get pvc kubectl get pv kubectl get storageclass sudo lvscan + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + cache: true + # The runners already have the latest versions of tools, no need to reinstall them + - name: Link tools + shell: bash + run: | + mkdir bin + ln -s /usr/local/bin/kustomize bin/kustomize + - name: Download cass-operator image + uses: actions/download-artifact@v4 + with: + name: cass-operator + path: /tmp + - name: Download system-logger image + uses: actions/download-artifact@v4 + with: + name: system-logger + path: /tmp + - name: Load Docker images + shell: bash + id: load + run: | + echo "operator_img=$(docker load --input /tmp/k8ssandra-cass-operator.tar | cut -f 3 -d' ')" >> $GITHUB_OUTPUT + echo "logger_img=$(docker load --input /tmp/k8ssandra-system-logger.tar | cut -f 3 -d' ')" >> $GITHUB_OUTPUT + - name: Load image on the nodes of the cluster + shell: bash + run: | + kind load docker-image --name=kind ${{ steps.load.outputs.operator_img }} + kind load docker-image --name=kind ${{ steps.load.outputs.logger_img }} + - name: Run integration test + shell: bash + run: | + IMG=${{ steps.load.outputs.operator_img }} LOG_IMG=${{ steps.load.outputs.logger_img }} make integ-test + diff --git a/hack/topolvm-cluster.yaml b/hack/topolvm-cluster.yaml new file mode 100644 index 00000000..a6f5acfc --- /dev/null +++ b/hack/topolvm-cluster.yaml @@ -0,0 +1,46 @@ +apiVersion: kind.x-k8s.io/v1alpha4 +kind: Cluster +# patch the generated kubeadm config with some extra settings +kubeadmConfigPatches: +- | + apiVersion: kubeadm.k8s.io/v1beta3 + kind: ClusterConfiguration + metadata: + name: config + kubernetesVersion: "v@KUBERNETES_VERSION@" + networking: + serviceSubnet: 10.0.0.0/16 +nodes: +- role: control-plane + extraMounts: + - containerPath: /var/lib/kubelet + hostPath: "@TMPDIR@/controller" + propagation: Bidirectional +- role: worker + extraMounts: + - containerPath: /run/topolvm + hostPath: "@TMPDIR@/lvmd" + - containerPath: /var/lib/kubelet + hostPath: "@TMPDIR@/worker" + propagation: Bidirectional +- role: worker + extraMounts: + - containerPath: /run/topolvm + hostPath: "@TMPDIR@/lvmd" + - containerPath: /var/lib/kubelet + hostPath: "@TMPDIR@/worker" + propagation: Bidirectional +- role: worker + extraMounts: + - containerPath: /run/topolvm + hostPath: "@TMPDIR@/lvmd" + - containerPath: /var/lib/kubelet + hostPath: "@TMPDIR@/worker" + propagation: Bidirectional +- role: worker + extraMounts: + - containerPath: /run/topolvm + hostPath: "@TMPDIR@/lvmd" + - containerPath: /var/lib/kubelet + hostPath: "@TMPDIR@/worker" + propagation: Bidirectional From 255c2c02490306676733beb5519ae345172be620 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Thu, 27 Jun 2024 16:03:05 +0300 Subject: [PATCH 3/8] Try faster test --- .github/workflows/kindIntegTest.yml | 13 ++++++------- tests/testdata/oss-one-node-dc-without-mtls.yaml | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/kindIntegTest.yml b/.github/workflows/kindIntegTest.yml index a5757afc..672d44bd 100644 --- a/.github/workflows/kindIntegTest.yml +++ b/.github/workflows/kindIntegTest.yml @@ -280,7 +280,7 @@ jobs: runs-on: ubuntu-latest env: CGO_ENABLED: 0 - M_INTEG_DIR: ${{ matrix.integration_test }} + M_INTEG_DIR: terminate M_SERVER_VERSION: ${{ matrix.version }} steps: - name: Check out code into the Go module directory @@ -295,7 +295,6 @@ jobs: ref: topolvm-chart-v15.0.0 - name: Create kind cluster from TopoLVM example run: | - cp hack/topolvm-cluster.yaml topolvm/example/kind/topolvm-cluster.yaml cd topolvm/example make setup make run @@ -306,11 +305,11 @@ jobs: kubectl get pv kubectl get storageclass sudo lvscan - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: 'go.mod' - cache: true + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + cache: true # The runners already have the latest versions of tools, no need to reinstall them - name: Link tools shell: bash diff --git a/tests/testdata/oss-one-node-dc-without-mtls.yaml b/tests/testdata/oss-one-node-dc-without-mtls.yaml index 63174db0..32f9649e 100644 --- a/tests/testdata/oss-one-node-dc-without-mtls.yaml +++ b/tests/testdata/oss-one-node-dc-without-mtls.yaml @@ -11,7 +11,7 @@ spec: size: 1 storageConfig: cassandraDataVolumeClaimSpec: - storageClassName: standard + storageClassName: topolvm-provisioner-thin accessModes: - ReadWriteOnce resources: From 74123b4a282dab0ae6cfb3e5cc7a1d6b3092beb8 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Thu, 27 Jun 2024 16:03:43 +0300 Subject: [PATCH 4/8] allowMultipleWorkers: true --- tests/testdata/oss-one-node-dc-without-mtls.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testdata/oss-one-node-dc-without-mtls.yaml b/tests/testdata/oss-one-node-dc-without-mtls.yaml index 32f9649e..aefa75e0 100644 --- a/tests/testdata/oss-one-node-dc-without-mtls.yaml +++ b/tests/testdata/oss-one-node-dc-without-mtls.yaml @@ -9,6 +9,7 @@ spec: managementApiAuth: insecure: {} size: 1 + allowMultipleNodesPerWorker: true storageConfig: cassandraDataVolumeClaimSpec: storageClassName: topolvm-provisioner-thin From c125382db2f9cf88c8f59edc921f7418bdf63440 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Thu, 27 Jun 2024 16:13:01 +0300 Subject: [PATCH 5/8] Fix kind clustername --- .github/workflows/kindIntegTest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/kindIntegTest.yml b/.github/workflows/kindIntegTest.yml index 672d44bd..88f37a28 100644 --- a/.github/workflows/kindIntegTest.yml +++ b/.github/workflows/kindIntegTest.yml @@ -335,8 +335,8 @@ jobs: - name: Load image on the nodes of the cluster shell: bash run: | - kind load docker-image --name=kind ${{ steps.load.outputs.operator_img }} - kind load docker-image --name=kind ${{ steps.load.outputs.logger_img }} + kind load docker-image --name=topolvm-example ${{ steps.load.outputs.operator_img }} + kind load docker-image --name=topolvm-example ${{ steps.load.outputs.logger_img }} - name: Run integration test shell: bash run: | From 1d70c98ffd13bde67bfbbb0bfcb3c03dedfc1c2a Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Thu, 27 Jun 2024 16:24:43 +0300 Subject: [PATCH 6/8] Add resources restrictions --- tests/testdata/oss-one-node-dc-without-mtls.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/testdata/oss-one-node-dc-without-mtls.yaml b/tests/testdata/oss-one-node-dc-without-mtls.yaml index aefa75e0..65af6d8c 100644 --- a/tests/testdata/oss-one-node-dc-without-mtls.yaml +++ b/tests/testdata/oss-one-node-dc-without-mtls.yaml @@ -18,6 +18,10 @@ spec: resources: requests: storage: 1Gi + resources: + requests: + memory: 1Gi + cpu: 1000m racks: - name: r1 config: From c427c56aeed2746d8c393abbc56c0c4dba68fda2 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Thu, 27 Jun 2024 16:32:43 +0300 Subject: [PATCH 7/8] And limits.. --- tests/testdata/oss-one-node-dc-without-mtls.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/testdata/oss-one-node-dc-without-mtls.yaml b/tests/testdata/oss-one-node-dc-without-mtls.yaml index 65af6d8c..3b15f8c1 100644 --- a/tests/testdata/oss-one-node-dc-without-mtls.yaml +++ b/tests/testdata/oss-one-node-dc-without-mtls.yaml @@ -22,6 +22,9 @@ spec: requests: memory: 1Gi cpu: 1000m + limits: + memory: 2Gi + cpu: 2000m racks: - name: r1 config: From f0dabdfad3f87f1bc63d7f130758215538fa2ba9 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Thu, 27 Jun 2024 16:52:17 +0300 Subject: [PATCH 8/8] Add log processing in failures --- .github/workflows/kindIntegTest.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/kindIntegTest.yml b/.github/workflows/kindIntegTest.yml index 88f37a28..a45e6160 100644 --- a/.github/workflows/kindIntegTest.yml +++ b/.github/workflows/kindIntegTest.yml @@ -341,5 +341,11 @@ jobs: shell: bash run: | IMG=${{ steps.load.outputs.operator_img }} LOG_IMG=${{ steps.load.outputs.logger_img }} make integ-test + - name: Archive k8s logs + if: ${{ failure() }} + uses: actions/upload-artifact@v4 + with: + name: k8s-logs-topolvm-test-${{ matrix.version }} + path: ./build/kubectl_dump