From 559a80ce71510d061abe37615240b3bdc7858736 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Wed, 18 Sep 2024 13:54:19 +0300 Subject: [PATCH 1/8] Run only DSE read_only_fs tests --- .github/workflows/kindIntegTest.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/kindIntegTest.yml b/.github/workflows/kindIntegTest.yml index 8595edaa..73017912 100644 --- a/.github/workflows/kindIntegTest.yml +++ b/.github/workflows/kindIntegTest.yml @@ -150,7 +150,7 @@ jobs: name: k8s-logs-smoke_test-${{ matrix.version }} path: ./build/kubectl_dump - kind_int_tests: + # kind_int_tests: needs: build_docker_images strategy: matrix: @@ -231,14 +231,9 @@ jobs: strategy: matrix: version: - - "3.11.17" - - "4.0.13" - - "4.1.6" - "6.8.50" - "6.9.2" - - "1.0.0" integration_test: - - test_all_the_things - smoke_test_read_only_fs include: - version: 6.8.50 @@ -274,12 +269,11 @@ jobs: 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_topolvm_tests: + # kind_topolvm_tests: name: TopoLVM kind installation with volumeExpansion needs: build_docker_images strategy: From b967a1f3b7338a564b4cea5a728f2bf5079c8783 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Wed, 18 Sep 2024 14:00:45 +0300 Subject: [PATCH 2/8] . --- .github/workflows/kindIntegTest.yml | 342 ++++++++++++++-------------- 1 file changed, 171 insertions(+), 171 deletions(-) diff --git a/.github/workflows/kindIntegTest.yml b/.github/workflows/kindIntegTest.yml index 73017912..0a54d27c 100644 --- a/.github/workflows/kindIntegTest.yml +++ b/.github/workflows/kindIntegTest.yml @@ -53,179 +53,179 @@ 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.13" - 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.49" - integration_test: - - cdc_successful - include: - - version: 6.8.49 - serverImage: datastax/dse-mgmtapi-6_8:6.8.49-ubi8 # DSE 6.8.49 - 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.13" + # 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.49" + # integration_test: + # - cdc_successful + # include: + # - version: 6.8.49 + # serverImage: datastax/dse-mgmtapi-6_8:6.8.49-ubi8 # DSE 6.8.49 + # 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.6" - integration_test: - # Single worker tests: - - additional_serviceoptions - - additional_volumes - # - delete_node_terminated_container # This does not test any operator behavior - - podspec_simple - # - 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 - # - smoke_test_read_only_fs - #- 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 + # needs: build_docker_images + # strategy: + # matrix: + # version: + # - "4.1.6" + # integration_test: + # # Single worker tests: + # - additional_serviceoptions + # - additional_volumes + # # - delete_node_terminated_container # This does not test any operator behavior + # - podspec_simple + # # - 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 + # # - smoke_test_read_only_fs + # #- 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: From e4afb4e99d1a73905480e40e82e86e1abeb70466 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Wed, 18 Sep 2024 14:16:26 +0300 Subject: [PATCH 3/8] .. --- .github/workflows/kindIntegTest.yml | 176 +--------------------------- 1 file changed, 1 insertion(+), 175 deletions(-) diff --git a/.github/workflows/kindIntegTest.yml b/.github/workflows/kindIntegTest.yml index 0a54d27c..f30bd291 100644 --- a/.github/workflows/kindIntegTest.yml +++ b/.github/workflows/kindIntegTest.yml @@ -52,180 +52,6 @@ jobs: with: 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.13" - # 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.49" - # integration_test: - # - cdc_successful - # include: - # - version: 6.8.49 - # serverImage: datastax/dse-mgmtapi-6_8:6.8.49-ubi8 # DSE 6.8.49 - # 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.6" - # integration_test: - # # Single worker tests: - # - additional_serviceoptions - # - additional_volumes - # # - delete_node_terminated_container # This does not test any operator behavior - # - podspec_simple - # # - 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 - # # - smoke_test_read_only_fs - # #- 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: @@ -273,7 +99,7 @@ jobs: with: name: k8s-logs-smoke_test-${{ matrix.version }} path: ./build/kubectl_dump - # kind_topolvm_tests: + name: TopoLVM kind installation with volumeExpansion needs: build_docker_images strategy: From a34eb8fd3c6441abe15e813a492daac6930670d1 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Wed, 18 Sep 2024 14:20:24 +0300 Subject: [PATCH 4/8] ... --- .github/workflows/kindIntegTest.yml | 91 +---------------------------- 1 file changed, 1 insertion(+), 90 deletions(-) diff --git a/.github/workflows/kindIntegTest.yml b/.github/workflows/kindIntegTest.yml index f30bd291..1ae917a3 100644 --- a/.github/workflows/kindIntegTest.yml +++ b/.github/workflows/kindIntegTest.yml @@ -99,93 +99,4 @@ jobs: with: name: k8s-logs-smoke_test-${{ matrix.version }} path: ./build/kubectl_dump - - name: TopoLVM kind installation with volumeExpansion - needs: build_docker_images - strategy: - matrix: - version: - - "4.1.6" - integration_test: - - pvc_expansion - fail-fast: true - runs-on: ubuntu-latest - env: - CGO_ENABLED: 0 - M_INTEG_DIR: ${{ matrix.integration_test }} - M_SERVER_VERSION: ${{ matrix.version }} - steps: - - name: Install necessary tools for LVM setup - run: | - sudo apt-get update - sudo apt-get install -y lvm2 xfsprogs thin-provisioning-tools - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - with: - repository: topolvm/topolvm - path: topolvm - ref: topolvm-chart-v15.2.0 - - name: Create LVM from TopoLVM's example setup - run: | - cd topolvm/example - mkdir -p build - mkdir -p bin - make start-lvmd - make KIND=$(type -a -P kind) launch-kind - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: 'go.mod' - cache: true - - name: Install TopoLVM controller - run: | - make cert-manager - helm repo add topolvm https://topolvm.github.io/topolvm - helm repo update - kubectl create namespace topolvm-system - kubectl label namespace topolvm-system topolvm.io/webhook=ignore - kubectl label namespace kube-system topolvm.io/webhook=ignore - helm install --namespace=topolvm-system topolvm topolvm/topolvm -f topolvm/example/values.yaml - kubectl wait --for=condition=available --timeout=120s -n topolvm-system deployments/topolvm-controller - kubectl wait --for=condition=ready --timeout=120s -n topolvm-system -l="app.kubernetes.io/component=controller,app.kubernetes.io/name=topolvm" pod - kubectl wait --for=condition=ready --timeout=120s -n topolvm-system certificate/topolvm-mutatingwebhook - - 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=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: | - 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 \ No newline at end of file + \ No newline at end of file From da7654fa74c5d513bebf4f18ba42dc335b5fc4e2 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Wed, 18 Sep 2024 14:34:58 +0300 Subject: [PATCH 5/8] Fix read_only_fs test --- .../smoke_test_read_only_fs/smoke_test_read_only_fs_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/smoke_test_read_only_fs/smoke_test_read_only_fs_test.go b/tests/smoke_test_read_only_fs/smoke_test_read_only_fs_test.go index c1fa3de8..2663cfb7 100644 --- a/tests/smoke_test_read_only_fs/smoke_test_read_only_fs_test.go +++ b/tests/smoke_test_read_only_fs/smoke_test_read_only_fs_test.go @@ -60,7 +60,10 @@ var _ = Describe(testName, func() { ns.WaitForOutputAndLog(step, k, "true", 360) step = "creating a datacenter resource with 1 rack/1 node" - k = kubectl.ApplyFiles(dcYaml) + + testFile, err := ginkgo_util.CreateTestFile(dcYaml) + Expect(err).ToNot(HaveOccurred()) + k = kubectl.ApplyFiles(testFile) ns.ExecAndLog(step, k) ns.WaitForDatacenterReady(dcName) From 1a908f4e13d7e36ca93c59a0a2561476152e5c4f Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Wed, 18 Sep 2024 16:12:48 +0300 Subject: [PATCH 6/8] Add workaround for cass-config-builder bug --- .github/workflows/kindIntegTest.yml | 1 + .../construct_podtemplatespec.go | 25 +++++++++++++++++++ .../construct_podtemplatespec_test.go | 11 +++++++- .../smoke_test_read_only_fs_test.go | 2 +- 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/.github/workflows/kindIntegTest.yml b/.github/workflows/kindIntegTest.yml index 1ae917a3..08d3d3f5 100644 --- a/.github/workflows/kindIntegTest.yml +++ b/.github/workflows/kindIntegTest.yml @@ -95,6 +95,7 @@ jobs: with: integration_test: ${{ matrix.integration_test }} - name: Archive k8s logs + if: always() uses: actions/upload-artifact@v4 with: name: k8s-logs-smoke_test-${{ matrix.version }} diff --git a/pkg/reconciliation/construct_podtemplatespec.go b/pkg/reconciliation/construct_podtemplatespec.go index a581d5db..61f7de22 100644 --- a/pkg/reconciliation/construct_podtemplatespec.go +++ b/pkg/reconciliation/construct_podtemplatespec.go @@ -555,6 +555,31 @@ func buildInitContainers(dc *api.CassandraDatacenter, rackName string, baseTempl } else { baseTemplate.Spec.InitContainers = append(baseTemplate.Spec.InitContainers, *configContainer) } + } else if !dc.UseClientImage() && configContainerIndex < 0 && dc.ReadOnlyFs() && dc.Spec.ServerType == "dse" { + // Workaround for cass-config-builder, copy missing files + configContainer = &corev1.Container{ + Name: ServerBaseConfigContainerName, + } + + if configContainer.Image == "" { + serverImage, err := makeImage(dc) + if err != nil { + return err + } + + configContainer.Image = serverImage + if images.GetImageConfig() != nil && images.GetImageConfig().ImagePullPolicy != "" { + configContainer.ImagePullPolicy = images.GetImageConfig().ImagePullPolicy + } + + configContainer.Command = []string{"/bin/sh"} + configContainer.Args = []string{"-c", "cp -rf /opt/dse/resources/cassandra/conf/jvm-dependent.sh /config/"} + + configContainer.VolumeMounts = combineVolumeMountSlices(configMounts, configContainer.VolumeMounts) + } + baseTemplate.Spec.InitContainers = append(baseTemplate.Spec.InitContainers, *serverCfg) + serverContainerIndex = len(baseTemplate.Spec.InitContainers) - 1 + baseTemplate.Spec.InitContainers = append(baseTemplate.Spec.InitContainers, *configContainer) } if serverContainerIndex < 0 { diff --git a/pkg/reconciliation/construct_podtemplatespec_test.go b/pkg/reconciliation/construct_podtemplatespec_test.go index 7335d675..96ec7a3c 100644 --- a/pkg/reconciliation/construct_podtemplatespec_test.go +++ b/pkg/reconciliation/construct_podtemplatespec_test.go @@ -2145,8 +2145,9 @@ func TestReadOnlyRootFilesystemVolumeChangesDSE(t *testing.T) { assert.NotNil(initContainers, "No init containers were found") assert.NoError(err, "Unexpected error encountered") - assert.Len(initContainers, 1, "Unexpected number of init containers returned") + assert.Len(initContainers, 2, "Unexpected number of init containers returned") assert.Equal(ServerConfigContainerName, initContainers[0].Name) + assert.Equal(ServerBaseConfigContainerName, initContainers[1].Name) assert.True(reflect.DeepEqual(initContainers[0].VolumeMounts, []corev1.VolumeMount{ @@ -2156,6 +2157,14 @@ func TestReadOnlyRootFilesystemVolumeChangesDSE(t *testing.T) { }, }), fmt.Sprintf("Unexpected volume mounts for the base config container: %v", initContainers[0].VolumeMounts)) + assert.True(reflect.DeepEqual(initContainers[1].VolumeMounts, + []corev1.VolumeMount{ + { + Name: "server-config", + MountPath: "/config", + }, + }), fmt.Sprintf("Unexpected volume mounts for the base config container: %v", initContainers[0].VolumeMounts)) + containers := podTemplateSpec.Spec.Containers assert.NotNil(containers, "No containers were found") assert.NoError(err, "Unexpected error encountered") diff --git a/tests/smoke_test_read_only_fs/smoke_test_read_only_fs_test.go b/tests/smoke_test_read_only_fs/smoke_test_read_only_fs_test.go index 2663cfb7..65482264 100644 --- a/tests/smoke_test_read_only_fs/smoke_test_read_only_fs_test.go +++ b/tests/smoke_test_read_only_fs/smoke_test_read_only_fs_test.go @@ -66,7 +66,7 @@ var _ = Describe(testName, func() { k = kubectl.ApplyFiles(testFile) ns.ExecAndLog(step, k) - ns.WaitForDatacenterReady(dcName) + ns.WaitForDatacenterReadyWithTimeouts(dcName, 360, 360) ns.ExpectDoneReconciling(dcName) step = "deleting the dc" From 1b4da6adadce4d71fca5cbdb9bd45f75831dd087 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Wed, 18 Sep 2024 16:40:37 +0300 Subject: [PATCH 7/8] Workaround cass-config-builder bug #2 --- .../construct_podtemplatespec.go | 80 +++++++++++++------ .../construct_podtemplatespec_test.go | 4 +- 2 files changed, 57 insertions(+), 27 deletions(-) diff --git a/pkg/reconciliation/construct_podtemplatespec.go b/pkg/reconciliation/construct_podtemplatespec.go index 61f7de22..70610011 100644 --- a/pkg/reconciliation/construct_podtemplatespec.go +++ b/pkg/reconciliation/construct_podtemplatespec.go @@ -512,6 +512,29 @@ func buildInitContainers(dc *api.CassandraDatacenter, rackName string, baseTempl } configContainer.VolumeMounts = []corev1.VolumeMount{configBaseMount} + } else if !dc.UseClientImage() && dc.ReadOnlyFs() && dc.Spec.ServerType == "dse" { + // Similar to k8ssandra 1.x, use config-container if we use k8ssandra-client to build configs + if configContainerIndex < 0 { + configContainer = &corev1.Container{ + Name: ServerBaseConfigContainerName, + } + } + + if configContainer.Image == "" { + serverImage, err := makeImage(dc) + if err != nil { + return err + } + + configContainer.Image = serverImage + if images.GetImageConfig() != nil && images.GetImageConfig().ImagePullPolicy != "" { + configContainer.ImagePullPolicy = images.GetImageConfig().ImagePullPolicy + } + + configContainer.Command = []string{"/bin/sh"} + configContainer.Args = []string{"-c", "cp -rf /opt/dse/resources/cassandra/conf/* /config/"} + } + configContainer.VolumeMounts = combineVolumeMountSlices(configMounts, configContainer.VolumeMounts) } serverCfg.VolumeMounts = combineVolumeMountSlices(configMounts, serverCfg.VolumeMounts) @@ -556,31 +579,38 @@ func buildInitContainers(dc *api.CassandraDatacenter, rackName string, baseTempl baseTemplate.Spec.InitContainers = append(baseTemplate.Spec.InitContainers, *configContainer) } } else if !dc.UseClientImage() && configContainerIndex < 0 && dc.ReadOnlyFs() && dc.Spec.ServerType == "dse" { - // Workaround for cass-config-builder, copy missing files - configContainer = &corev1.Container{ - Name: ServerBaseConfigContainerName, - } - - if configContainer.Image == "" { - serverImage, err := makeImage(dc) - if err != nil { - return err - } - - configContainer.Image = serverImage - if images.GetImageConfig() != nil && images.GetImageConfig().ImagePullPolicy != "" { - configContainer.ImagePullPolicy = images.GetImageConfig().ImagePullPolicy - } - - configContainer.Command = []string{"/bin/sh"} - configContainer.Args = []string{"-c", "cp -rf /opt/dse/resources/cassandra/conf/jvm-dependent.sh /config/"} - - configContainer.VolumeMounts = combineVolumeMountSlices(configMounts, configContainer.VolumeMounts) - } - baseTemplate.Spec.InitContainers = append(baseTemplate.Spec.InitContainers, *serverCfg) - serverContainerIndex = len(baseTemplate.Spec.InitContainers) - 1 - baseTemplate.Spec.InitContainers = append(baseTemplate.Spec.InitContainers, *configContainer) - } + // Workaround for cass-config-builder, copy missing files before cass-config-builder processes anything + baseTemplate.Spec.InitContainers = append([]corev1.Container{*configContainer}, baseTemplate.Spec.InitContainers...) + } + // } else if !dc.UseClientImage() && configContainerIndex < 0 && dc.ReadOnlyFs() && dc.Spec.ServerType == "dse" { + // // Workaround for cass-config-builder, copy missing files + // configContainer = &corev1.Container{ + // Name: ServerBaseConfigContainerName, + // } + + // if configContainer.Image == "" { + // serverImage, err := makeImage(dc) + // if err != nil { + // return err + // } + + // configContainer.Image = serverImage + // if images.GetImageConfig() != nil && images.GetImageConfig().ImagePullPolicy != "" { + // configContainer.ImagePullPolicy = images.GetImageConfig().ImagePullPolicy + // } + + // configContainer.Command = []string{"/bin/sh"} + + // // TODO Or should we copy everything from cassandra/conf ? Same for dse/conf, since cass-config-builder does not understand immutable filesystem + + // configContainer.Args = []string{"-c", "cp -rf /opt/dse/resources/cassandra/conf/jvm-dependent.sh /config/", "&&", "cp -rf /opt/dse/resources/cassandra/conf/jvm.options /config/"} + + // configContainer.VolumeMounts = combineVolumeMountSlices(configMounts, configContainer.VolumeMounts) + // } + // baseTemplate.Spec.InitContainers = append(baseTemplate.Spec.InitContainers, *serverCfg) + // serverContainerIndex = len(baseTemplate.Spec.InitContainers) - 1 + // baseTemplate.Spec.InitContainers = append(baseTemplate.Spec.InitContainers, *configContainer) + // } if serverContainerIndex < 0 { baseTemplate.Spec.InitContainers = append(baseTemplate.Spec.InitContainers, *serverCfg) diff --git a/pkg/reconciliation/construct_podtemplatespec_test.go b/pkg/reconciliation/construct_podtemplatespec_test.go index 96ec7a3c..293a26c5 100644 --- a/pkg/reconciliation/construct_podtemplatespec_test.go +++ b/pkg/reconciliation/construct_podtemplatespec_test.go @@ -2146,8 +2146,8 @@ func TestReadOnlyRootFilesystemVolumeChangesDSE(t *testing.T) { assert.NoError(err, "Unexpected error encountered") assert.Len(initContainers, 2, "Unexpected number of init containers returned") - assert.Equal(ServerConfigContainerName, initContainers[0].Name) - assert.Equal(ServerBaseConfigContainerName, initContainers[1].Name) + assert.Equal(ServerBaseConfigContainerName, initContainers[0].Name) + assert.Equal(ServerConfigContainerName, initContainers[1].Name) assert.True(reflect.DeepEqual(initContainers[0].VolumeMounts, []corev1.VolumeMount{ From 0df62f571758f32ae23ffa95ce6d251d46d58465 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Wed, 18 Sep 2024 17:32:52 +0300 Subject: [PATCH 8/8] Return rest of the tests and code back to normal --- .github/workflows/kindIntegTest.yml | 272 +++++++++++++++++- .../construct_podtemplatespec.go | 29 -- 2 files changed, 270 insertions(+), 31 deletions(-) diff --git a/.github/workflows/kindIntegTest.yml b/.github/workflows/kindIntegTest.yml index 08d3d3f5..8595edaa 100644 --- a/.github/workflows/kindIntegTest.yml +++ b/.github/workflows/kindIntegTest.yml @@ -52,14 +52,193 @@ jobs: with: 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.13" + 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.49" + integration_test: + - cdc_successful + include: + - version: 6.8.49 + serverImage: datastax/dse-mgmtapi-6_8:6.8.49-ubi8 # DSE 6.8.49 + 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.6" + integration_test: + # Single worker tests: + - additional_serviceoptions + - additional_volumes + # - delete_node_terminated_container # This does not test any operator behavior + - podspec_simple + # - 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 + # - smoke_test_read_only_fs + #- 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.13" + - "4.1.6" - "6.8.50" - "6.9.2" + - "1.0.0" integration_test: + - test_all_the_things - smoke_test_read_only_fs include: - version: 6.8.50 @@ -95,9 +274,98 @@ jobs: with: integration_test: ${{ matrix.integration_test }} - name: Archive k8s logs - if: always() + if: ${{ failure() }} uses: actions/upload-artifact@v4 with: name: k8s-logs-smoke_test-${{ matrix.version }} path: ./build/kubectl_dump - \ No newline at end of file + kind_topolvm_tests: + name: TopoLVM kind installation with volumeExpansion + needs: build_docker_images + strategy: + matrix: + version: + - "4.1.6" + integration_test: + - pvc_expansion + fail-fast: true + runs-on: ubuntu-latest + env: + CGO_ENABLED: 0 + M_INTEG_DIR: ${{ matrix.integration_test }} + M_SERVER_VERSION: ${{ matrix.version }} + steps: + - name: Install necessary tools for LVM setup + run: | + sudo apt-get update + sudo apt-get install -y lvm2 xfsprogs thin-provisioning-tools + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + with: + repository: topolvm/topolvm + path: topolvm + ref: topolvm-chart-v15.2.0 + - name: Create LVM from TopoLVM's example setup + run: | + cd topolvm/example + mkdir -p build + mkdir -p bin + make start-lvmd + make KIND=$(type -a -P kind) launch-kind + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + cache: true + - name: Install TopoLVM controller + run: | + make cert-manager + helm repo add topolvm https://topolvm.github.io/topolvm + helm repo update + kubectl create namespace topolvm-system + kubectl label namespace topolvm-system topolvm.io/webhook=ignore + kubectl label namespace kube-system topolvm.io/webhook=ignore + helm install --namespace=topolvm-system topolvm topolvm/topolvm -f topolvm/example/values.yaml + kubectl wait --for=condition=available --timeout=120s -n topolvm-system deployments/topolvm-controller + kubectl wait --for=condition=ready --timeout=120s -n topolvm-system -l="app.kubernetes.io/component=controller,app.kubernetes.io/name=topolvm" pod + kubectl wait --for=condition=ready --timeout=120s -n topolvm-system certificate/topolvm-mutatingwebhook + - 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=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: | + 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 \ No newline at end of file diff --git a/pkg/reconciliation/construct_podtemplatespec.go b/pkg/reconciliation/construct_podtemplatespec.go index 70610011..17934205 100644 --- a/pkg/reconciliation/construct_podtemplatespec.go +++ b/pkg/reconciliation/construct_podtemplatespec.go @@ -582,35 +582,6 @@ func buildInitContainers(dc *api.CassandraDatacenter, rackName string, baseTempl // Workaround for cass-config-builder, copy missing files before cass-config-builder processes anything baseTemplate.Spec.InitContainers = append([]corev1.Container{*configContainer}, baseTemplate.Spec.InitContainers...) } - // } else if !dc.UseClientImage() && configContainerIndex < 0 && dc.ReadOnlyFs() && dc.Spec.ServerType == "dse" { - // // Workaround for cass-config-builder, copy missing files - // configContainer = &corev1.Container{ - // Name: ServerBaseConfigContainerName, - // } - - // if configContainer.Image == "" { - // serverImage, err := makeImage(dc) - // if err != nil { - // return err - // } - - // configContainer.Image = serverImage - // if images.GetImageConfig() != nil && images.GetImageConfig().ImagePullPolicy != "" { - // configContainer.ImagePullPolicy = images.GetImageConfig().ImagePullPolicy - // } - - // configContainer.Command = []string{"/bin/sh"} - - // // TODO Or should we copy everything from cassandra/conf ? Same for dse/conf, since cass-config-builder does not understand immutable filesystem - - // configContainer.Args = []string{"-c", "cp -rf /opt/dse/resources/cassandra/conf/jvm-dependent.sh /config/", "&&", "cp -rf /opt/dse/resources/cassandra/conf/jvm.options /config/"} - - // configContainer.VolumeMounts = combineVolumeMountSlices(configMounts, configContainer.VolumeMounts) - // } - // baseTemplate.Spec.InitContainers = append(baseTemplate.Spec.InitContainers, *serverCfg) - // serverContainerIndex = len(baseTemplate.Spec.InitContainers) - 1 - // baseTemplate.Spec.InitContainers = append(baseTemplate.Spec.InitContainers, *configContainer) - // } if serverContainerIndex < 0 { baseTemplate.Spec.InitContainers = append(baseTemplate.Spec.InitContainers, *serverCfg)