Skip to content

Commit

Permalink
chore: move csi tests as go test
Browse files Browse the repository at this point in the history
Move rook-ceph CSI tests as go tests.
This allows us to add more CSI tests in the future.

Fixes: #9135

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed Aug 26, 2024
1 parent e4f8cb8 commit 8fe39ea
Show file tree
Hide file tree
Showing 25 changed files with 850 additions and 65 deletions.
9 changes: 9 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@
],
"versioningTemplate": "{{#if versioning}}{{versioning}}{{else}}semver{{/if}}"
},
{
"fileMatch": [
"internal/integration/k8s/constants.go"
],
"matchStrings": [
"\\/\\/\\s+renovate: datasource=(?<datasource>.*?)(?:\\s+extractVersion=(?<extractVersion>.+?))?(?:\\s+versioning=(?<versioning>.+?))?\\s+depName=(?<depName>.+?)?(?:\\s+registryUrl=(?<registryUrl>.+?))?\\s.*Version\\s+=\\s+\\\"(?<currentValue>.+?)\\\""
],
"versioningTemplate": "{{#if versioning}}{{versioning}}{{else}}semver{{/if}}"
},
{
"fileMatch": [
"Dockerfile"
Expand Down
136 changes: 125 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-08-14T14:49:10Z by kres 7be2a05.
# Generated on 2024-08-24T17:38:15Z by kres 8e4bbb4.

name: default
concurrency:
Expand Down Expand Up @@ -994,7 +994,7 @@ jobs:
IMAGE_REGISTRY: registry.dev.siderolabs.io
QEMU_WORKERS: "2"
SHORT_INTEGRATION_TEST: "yes"
WITH_CONFIG_PATCH: '[{"op": "add", "path": "/cluster/network", "value": {"cni": {"name": "none"}}}]'
WITH_CONFIG_PATCH: '@hack/test/patches/cilium-no-kubeproxy.yaml'
WITH_CUSTOM_CNI: cilium
WITH_FIREWALL: accept
WITH_SKIP_K8S_NODE_READINESS_CHECK: "yes"
Expand All @@ -1006,7 +1006,7 @@ jobs:
IMAGE_REGISTRY: registry.dev.siderolabs.io
QEMU_WORKERS: "2"
SHORT_INTEGRATION_TEST: "yes"
WITH_CONFIG_PATCH: '[{"op": "add", "path": "/cluster/network", "value": {"cni": {"name": "none"}}}, {"op": "add", "path": "/cluster/proxy", "value": {"disabled": true}}]'
WITH_CONFIG_PATCH: '@hack/test/patches/cilium-kubeproxy.yaml'
WITH_CUSTOM_CNI: cilium
WITH_FIREWALL: accept
WITH_SKIP_K8S_NODE_READINESS_CHECK: "yes"
Expand All @@ -1018,7 +1018,7 @@ jobs:
IMAGE_REGISTRY: registry.dev.siderolabs.io
QEMU_WORKERS: "2"
SHORT_INTEGRATION_TEST: "yes"
WITH_CONFIG_PATCH: '[{"op": "add", "path": "/cluster/network", "value": {"cni": {"name": "none"}}}, {"op": "add", "path": "/cluster/proxy", "value": {"disabled": true}}]'
WITH_CONFIG_PATCH: '@hack/test/patches/cilium-kubeproxy.yaml'
WITH_CUSTOM_CNI: cilium
WITH_FIREWALL: accept
WITH_KUBESPAN: "true"
Expand Down Expand Up @@ -1428,7 +1428,7 @@ jobs:
QEMU_EXTRA_DISKS: "3"
QEMU_MEMORY_WORKERS: "4096"
SHORT_INTEGRATION_TEST: "yes"
WITH_CONFIG_PATCH_WORKER: '@_out/extensions-patch.yaml'
WITH_CONFIG_PATCH_WORKER: '@_out/installer-extensions-patch.yaml:@hack/test/patches/extensions.yaml'
run: |
sudo -E make e2e-qemu
- name: save artifacts
Expand Down Expand Up @@ -1989,7 +1989,7 @@ jobs:
env:
IMAGE_REGISTRY: registry.dev.siderolabs.io
SHORT_INTEGRATION_TEST: "yes"
WITH_CONFIG_PATCH: '[{"op": "add", "path": "/machine/install/extraKernelArgs/-", "value": "talos.unified_cgroup_hierarchy=0"}]'
WITH_CONFIG_PATCH: '@hack/test/patches/cgroupsv1.yaml'
WITH_UEFI: "false"
run: |
sudo -E make e2e-qemu
Expand Down Expand Up @@ -2562,7 +2562,7 @@ jobs:
~/.talos/clusters/**/*.log
!~/.talos/clusters/**/swtpm.log
retention-days: "5"
integration-qemu-csi:
integration-qemu-csi-longhorn:
permissions:
actions: read
contents: write
Expand All @@ -2572,7 +2572,7 @@ jobs:
runs-on:
- self-hosted
- talos
if: contains(fromJSON(needs.default.outputs.labels), 'integration/qemu-csi')
if: contains(fromJSON(needs.default.outputs.labels), 'integration/qemu-csi') || contains(fromJSON(needs.default.outputs.labels), 'integration/qemu-csi-longhorn')
needs:
- default
steps:
Expand Down Expand Up @@ -2635,23 +2635,137 @@ jobs:
if: github.event_name == 'schedule'
run: |
make talosctl-cni-bundle
- name: e2e-qemu-csi
- name: checkout extensions
uses: actions/checkout@v4
with:
path: _out/extensions
ref: main
repository: siderolabs/extensions
- name: set variables
run: |
cat _out/talos-metadata >> "$GITHUB_ENV"
- name: build extensions
env:
PLATFORM: linux/amd64
PUSH: "true"
REGISTRY: registry.dev.siderolabs.io
run: |
make iscsi-tools util-linux-tools extensions-metadata -C _out/extensions
- name: installer extensions
env:
EXTENSIONS_FILTER_COMMAND: grep -E 'iscsi-tools|util-linux-tools'
IMAGE_REGISTRY: registry.dev.siderolabs.io
run: |
make installer-with-extensions
- name: e2e-qemu-csi-longhorn
env:
EXTRA_TEST_ARGS: -talos.csi=longhorn
IMAGE_REGISTRY: registry.dev.siderolabs.io
QEMU_WORKERS: "3"
SHORT_INTEGRATION_TEST: "yes"
WITH_CONFIG_PATCH: '@_out/installer-extensions-patch.yaml:@hack/test/patches/longhorn.yaml'
run: |
sudo -E make e2e-qemu
- name: save artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: talos-logs-integration-qemu-csi-longhorn
path: |-
~/.talos/clusters/**/*.log
!~/.talos/clusters/**/swtpm.log
retention-days: "5"
integration-qemu-csi-rook-ceph:
permissions:
actions: read
contents: write
issues: read
packages: write
pull-requests: read
runs-on:
- self-hosted
- talos
if: contains(fromJSON(needs.default.outputs.labels), 'integration/qemu-csi') || contains(fromJSON(needs.default.outputs.labels), 'integration/qemu-csi-rook-ceph')
needs:
- default
steps:
- name: gather-system-info
id: system-info
uses: kenchan0130/actions-system-info@v1.3.0
continue-on-error: true
- name: print-system-info
run: |
MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024))
OUTPUTS=(
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}"
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}"
"Hostname: ${{ steps.system-info.outputs.hostname }}"
"NodeName: ${NODE_NAME}"
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}"
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}"
"Name: ${{ steps.system-info.outputs.name }}"
"Platform: ${{ steps.system-info.outputs.platform }}"
"Release: ${{ steps.system-info.outputs.release }}"
"Total memory: ${MEMORY_GB} GB"
)
for OUTPUT in "${OUTPUTS[@]}";do
echo "${OUTPUT}"
done
continue-on-error: true
- name: checkout
uses: actions/checkout@v4
- name: Unshallow
run: |
git fetch --prune --unshallow
- name: Set up Docker Buildx
id: setup-buildx
uses: docker/setup-buildx-action@v3
with:
driver: remote
endpoint: tcp://buildkit-amd64.ci.svc.cluster.local:1234
timeout-minutes: 10
- name: Download artifacts
if: github.event_name != 'schedule'
uses: actions/download-artifact@v4
with:
name: talos-artifacts
path: _out
- name: Fix artifact permissions
if: github.event_name != 'schedule'
run: |
xargs -a _out/executable-artifacts -I {} chmod +x {}
- name: build
if: github.event_name == 'schedule'
env:
IMAGE_REGISTRY: registry.dev.siderolabs.io
PLATFORM: linux/amd64
PUSH: "true"
run: |
make talosctl-linux-amd64 kernel sd-boot sd-stub initramfs installer imager talos _out/integration-test-linux-amd64
- name: talosctl-cni-bundle
if: github.event_name == 'schedule'
run: |
make talosctl-cni-bundle
- name: e2e-qemu-csi-rook-ceph
env:
EXTRA_TEST_ARGS: -talos.csi=rook-ceph
IMAGE_REGISTRY: registry.dev.siderolabs.io
QEMU_CPUS_WORKERS: "4"
QEMU_EXTRA_DISKS: "1"
QEMU_EXTRA_DISKS_SIZE: "12288"
QEMU_MEMORY_WORKERS: "5120"
QEMU_WORKERS: "3"
SHORT_INTEGRATION_TEST: "yes"
WITH_TEST: run_csi_tests
WITH_CONFIG_PATCH: '@hack/test/patches/rook-ceph.yaml'
run: |
sudo -E make e2e-qemu
- name: save artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: talos-logs-integration-qemu-csi
name: talos-logs-integration-qemu-csi-rook-ceph
path: |-
~/.talos/clusters/**/*.log
!~/.talos/clusters/**/swtpm.log
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/integration-cilium-cron.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-05-27T16:20:10Z by kres bcb280a.
# Generated on 2024-08-24T17:38:15Z by kres 8e4bbb4.

name: integration-cilium-cron
concurrency:
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
IMAGE_REGISTRY: registry.dev.siderolabs.io
QEMU_WORKERS: "2"
SHORT_INTEGRATION_TEST: "yes"
WITH_CONFIG_PATCH: '[{"op": "add", "path": "/cluster/network", "value": {"cni": {"name": "none"}}}]'
WITH_CONFIG_PATCH: '@hack/test/patches/cilium-no-kubeproxy.yaml'
WITH_CUSTOM_CNI: cilium
WITH_FIREWALL: accept
WITH_SKIP_K8S_NODE_READINESS_CHECK: "yes"
Expand All @@ -91,7 +91,7 @@ jobs:
IMAGE_REGISTRY: registry.dev.siderolabs.io
QEMU_WORKERS: "2"
SHORT_INTEGRATION_TEST: "yes"
WITH_CONFIG_PATCH: '[{"op": "add", "path": "/cluster/network", "value": {"cni": {"name": "none"}}}, {"op": "add", "path": "/cluster/proxy", "value": {"disabled": true}}]'
WITH_CONFIG_PATCH: '@hack/test/patches/cilium-kubeproxy.yaml'
WITH_CUSTOM_CNI: cilium
WITH_FIREWALL: accept
WITH_SKIP_K8S_NODE_READINESS_CHECK: "yes"
Expand All @@ -103,7 +103,7 @@ jobs:
IMAGE_REGISTRY: registry.dev.siderolabs.io
QEMU_WORKERS: "2"
SHORT_INTEGRATION_TEST: "yes"
WITH_CONFIG_PATCH: '[{"op": "add", "path": "/cluster/network", "value": {"cni": {"name": "none"}}}, {"op": "add", "path": "/cluster/proxy", "value": {"disabled": true}}]'
WITH_CONFIG_PATCH: '@hack/test/patches/cilium-kubeproxy.yaml'
WITH_CUSTOM_CNI: cilium
WITH_FIREWALL: accept
WITH_KUBESPAN: "true"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration-extensions-cron.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-05-27T16:20:10Z by kres bcb280a.
# Generated on 2024-08-24T17:38:15Z by kres 8e4bbb4.

name: integration-extensions-cron
concurrency:
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
QEMU_EXTRA_DISKS: "3"
QEMU_MEMORY_WORKERS: "4096"
SHORT_INTEGRATION_TEST: "yes"
WITH_CONFIG_PATCH_WORKER: '@_out/extensions-patch.yaml'
WITH_CONFIG_PATCH_WORKER: '@_out/installer-extensions-patch.yaml:@hack/test/patches/extensions.yaml'
run: |
sudo -E make e2e-qemu
- name: save artifacts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration-misc-2-cron.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-05-27T16:20:10Z by kres bcb280a.
# Generated on 2024-08-24T17:38:15Z by kres 8e4bbb4.

name: integration-misc-2-cron
concurrency:
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
env:
IMAGE_REGISTRY: registry.dev.siderolabs.io
SHORT_INTEGRATION_TEST: "yes"
WITH_CONFIG_PATCH: '[{"op": "add", "path": "/machine/install/extraKernelArgs/-", "value": "talos.unified_cgroup_hierarchy=0"}]'
WITH_CONFIG_PATCH: '@hack/test/patches/cgroupsv1.yaml'
WITH_UEFI: "false"
run: |
sudo -E make e2e-qemu
Expand Down
Loading

0 comments on commit 8fe39ea

Please sign in to comment.