Skip to content

Commit

Permalink
Return rest of the tests and code back to normal
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Sep 18, 2024
1 parent 1b4da6a commit 0df62f5
Show file tree
Hide file tree
Showing 2 changed files with 270 additions and 31 deletions.
272 changes: 270 additions & 2 deletions .github/workflows/kindIntegTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

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
29 changes: 0 additions & 29 deletions pkg/reconciliation/construct_podtemplatespec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0df62f5

Please sign in to comment.