Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
42a19de
chore(ci): add NFS to nested e2e
nevermarine Mar 20, 2026
67ebf61
fix yaml
nevermarine Mar 20, 2026
afd61c3
(DROPME) changes for testing PR
nevermarine Mar 20, 2026
7f3fe5d
fix image
nevermarine Mar 20, 2026
33af312
add qemu-guest-agent
nevermarine Mar 20, 2026
0342377
fix NFS setup
nevermarine Mar 23, 2026
3e164dc
add envsubst
nevermarine Mar 23, 2026
d41c247
delete mpo
nevermarine Mar 23, 2026
6f964f7
add nfs_ready check & namespace env
nevermarine Mar 23, 2026
de249ea
remove old kubectl apply
nevermarine Mar 23, 2026
447cb79
fix path
nevermarine Mar 23, 2026
4832c3b
fix nfs label
nevermarine Mar 24, 2026
f76ff87
fix selector
nevermarine Mar 24, 2026
c285be2
change to container image
nevermarine Mar 24, 2026
d83f5b6
revertme
nevermarine Mar 25, 2026
513c6b1
disable additional disks on nfs and add storage for nfs
nevermarine Mar 26, 2026
7a2b133
add nfs condition on blockDeviceRefs
nevermarine Mar 26, 2026
4a9138b
POST_CLEANUP=no
nevermarine Mar 26, 2026
7fb0021
move post cleanup
nevermarine Mar 27, 2026
50081b7
revertme: pr2123
nevermarine Mar 27, 2026
038b8ba
fix dataexport for nfs
nevermarine Mar 31, 2026
b216627
revertme: dataexport focus
nevermarine Apr 1, 2026
de1aa47
revertme: change branch to local
nevermarine Apr 1, 2026
ed77d4a
revertme: fix
nevermarine Apr 1, 2026
3dee8a9
return publish
nevermarine Apr 1, 2026
9f2107d
revert all temporary commits
nevermarine Apr 1, 2026
3e61a4a
format yaml
nevermarine Apr 1, 2026
7a102d0
resolve comments
nevermarine Apr 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion .github/workflows/e2e-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,14 +351,39 @@ jobs:
PROD_IO_REGISTRY_DOCKER_CFG: ${{ secrets.PROD_IO_REGISTRY_DOCKER_CFG }}
BOOTSTRAP_DEV_PROXY: ${{ secrets.BOOTSTRAP_DEV_PROXY }}

e2e-nfs:
name: E2E Pipeline (NFS)
needs:
- set-vars
uses: ./.github/workflows/e2e-reusable-pipeline.yml
with:
storage_type: nfs
nested_storageclass_name: nfs
branch: main
virtualization_tag: main
deckhouse_channel: alpha
default_user: cloud
go_version: "1.24.13"
e2e_timeout: "3.5h"
date_start: ${{ needs.set-vars.outputs.date_start }}
randuuid4c: ${{ needs.set-vars.outputs.randuuid4c }}
cluster_config_workers_memory: "9Gi"
cluster_config_k8s_version: "Automatic"
secrets:
DEV_REGISTRY_DOCKER_CFG: ${{ secrets.DEV_REGISTRY_DOCKER_CFG }}
VIRT_E2E_NIGHTLY_SA_TOKEN: ${{ secrets.VIRT_E2E_NIGHTLY_SA_TOKEN }}
PROD_IO_REGISTRY_DOCKER_CFG: ${{ secrets.PROD_IO_REGISTRY_DOCKER_CFG }}
BOOTSTRAP_DEV_PROXY: ${{ secrets.BOOTSTRAP_DEV_PROXY }}

report-to-channel:
runs-on: ubuntu-latest
name: End-to-End tests report
needs:
- e2e-replicated
- e2e-nfs
if: ${{ always()}}
env:
STORAGE_TYPES: '["replicated"]'
STORAGE_TYPES: '["replicated", "nfs"]'
steps:
- uses: actions/checkout@v4

Expand All @@ -380,6 +405,9 @@ jobs:
"replicated")
echo "replicated.csi.storage.deckhouse.io"
;;
"nfs")
echo "nfs.csi.storage.deckhouse.io"
;;
*)
echo "$storage_type"
;;
Expand Down
96 changes: 80 additions & 16 deletions .github/workflows/e2e-reusable-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -531,15 +531,15 @@ jobs:
sds_replicated_ready() {
local count=60
for i in $(seq 1 $count); do

sds_replicated_volume_status=$(kubectl get ns d8-sds-replicated-volume -o jsonpath='{.status.phase}' || echo "False")

if [[ "${sds_replicated_volume_status}" = "Active" ]]; then
echo "[SUCCESS] Namespaces sds-replicated-volume are Active"
kubectl get ns d8-sds-replicated-volume
return 0
fi

echo "[INFO] Waiting 10s for sds-replicated-volume namespace to be ready (attempt ${i}/${count})"
if (( i % 5 == 0 )); then
echo "[INFO] Show namespaces sds-replicated-volume"
Expand Down Expand Up @@ -582,7 +582,7 @@ jobs:
echo "[SUCCESS] sds-replicated-volume is ready"
return 0
fi

echo "[WARNING] Not all pods are ready, linstor_node=${linstor_node}, csi_node=${csi_node}"
echo "[INFO] Waiting 10s for pods to be ready (attempt ${i}/${count})"
if (( i % 5 == 0 )); then
Expand Down Expand Up @@ -615,12 +615,12 @@ jobs:
local count=60
workers=$(kubectl get nodes -o name | grep worker | wc -l)
workers=$((workers))

if [[ $workers -eq 0 ]]; then
echo "[ERROR] No worker nodes found"
exit 1
fi

for i in $(seq 1 $count); do
blockdevices=$(kubectl get blockdevice -o name | wc -l || true)
if [ $blockdevices -ge $workers ]; then
Expand Down Expand Up @@ -686,6 +686,70 @@ jobs:
echo "[SUCCESS] Done"
fi

- name: Configure NFS storage
if: ${{ inputs.storage_type == 'nfs' }}
id: storage-nfs-setup
working-directory: ${{ env.SETUP_CLUSTER_TYPE_PATH }}/storage/nfs
env:
NAMESPACE: ${{ needs.bootstrap.outputs.namespace }}
run: |
nfs_ready() {
local count=90
local controller
local csi_controller
local csi_node_desired
local csi_node_ready

for i in $(seq 1 $count); do
echo "[INFO] Check d8-csi-nfs pods (attempt ${i}/${count})"
controller=$(kubectl -n d8-csi-nfs get deploy controller -o jsonpath='{.status.readyReplicas}' 2>/dev/null || echo "0")
csi_controller=$(kubectl -n d8-csi-nfs get deploy csi-controller -o jsonpath='{.status.readyReplicas}' 2>/dev/null || echo "0")
csi_node_desired=$(kubectl -n d8-csi-nfs get ds csi-node -o jsonpath='{.status.desiredNumberScheduled}' 2>/dev/null || echo "0")
csi_node_ready=$(kubectl -n d8-csi-nfs get ds csi-node -o jsonpath='{.status.numberReady}' 2>/dev/null || echo "0")

if [[ "$controller" -ge 1 && "$csi_controller" -ge 1 && "$csi_node_desired" -gt 0 && "$csi_node_ready" -eq "$csi_node_desired" ]]; then
echo "[SUCCESS] NFS CSI is ready (controller=${controller}, csi-controller=${csi_controller}, csi-node=${csi_node_ready}/${csi_node_desired})"
return 0
fi

echo "[WARNING] NFS CSI not ready: controller=${controller}, csi-controller=${csi_controller}, csi-node=${csi_node_ready}/${csi_node_desired}"
if (( i % 5 == 0 )); then
echo "[DEBUG] Pods in d8-csi-nfs:"
kubectl -n d8-csi-nfs get pods || echo "[WARNING] Failed to retrieve pods"
echo "[DEBUG] Deployments in d8-csi-nfs:"
kubectl -n d8-csi-nfs get deploy || echo "[WARNING] Failed to retrieve deployments"
echo "[DEBUG] DaemonSets in d8-csi-nfs:"
kubectl -n d8-csi-nfs get ds || echo "[WARNING] Failed to retrieve daemonsets"
echo "[DEBUG] csi-nfs module status:"
kubectl get modules csi-nfs -o wide || echo "[WARNING] Failed to retrieve module"
fi
sleep 10
done

echo "[ERROR] NFS CSI did not become ready in time"
kubectl -n d8-csi-nfs get pods || true
exit 1
}

echo "[INFO] Apply csi-nfs ModuleConfig, ModulePullOverride, snapshot-controller"
kubectl apply -f mc.yaml

echo "[INFO] Wait for csi-nfs module to be ready"
kubectl wait --for=jsonpath='{.status.phase}'=Ready modules csi-nfs --timeout=300s

echo "[INFO] Wait for csi-nfs pods to be ready"
nfs_ready

echo "[INFO] Apply NFSStorageClass"
envsubst < storageclass.yaml | kubectl apply -f -

echo "[INFO] Configure default storage class"
./default-sc-configure.sh


echo "[INFO] Show existing storageclasses"
kubectl get storageclass

configure-virtualization:
name: Configure Virtualization
runs-on: ubuntu-latest
Expand Down Expand Up @@ -822,7 +886,7 @@ jobs:
kubectl describe node $node
echo "::endgroup::"
done

echo "[DEBUG] Show queue (first 25 lines)"
d8 s queue list | head -n 25 || echo "[WARNING] Failed to retrieve list queue"
echo "[DEBUG] Show deckhouse logs"
Expand All @@ -848,7 +912,7 @@ jobs:
d8 s queue list | head -n25 || echo "[WARNING] Failed to retrieve list queue"
echo " "
fi

if (( i % 10 == 0 )); then
echo "[INFO] deckhouse logs"
echo "::group::📝 deckhouse logs"
Expand All @@ -873,9 +937,9 @@ jobs:
kubectl get vmclass || echo "[WARNING] no vmclasses found"
return 0
fi

echo "[INFO] Waiting 10s for Virtualization module to be ready (attempt $i/$count)"

if (( i % 5 == 0 )); then
echo " "
echo "[DEBUG] Show additional info"
Expand All @@ -887,7 +951,7 @@ jobs:
fi
sleep 10
done

debug_output
exit 1
}
Expand All @@ -897,9 +961,9 @@ jobs:
local virt_handler_ready
local workers
local time_wait=10

workers=$(kubectl get nodes -o name | grep worker | wc -l || true)
workers=$((workers))
workers=$((workers))

for i in $(seq 1 $count); do
virt_handler_ready=$(kubectl -n d8-virtualization get pods | grep "virt-handler.*Running" | wc -l || true)
Expand Down Expand Up @@ -1145,7 +1209,7 @@ jobs:
# Format: https://github.com/{owner}/{repo}/actions/runs/{run_id}
# The job name will be visible in the workflow run view
local link="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"

jq -n \
--arg csi "$csi" \
--arg date "$date" \
Expand Down Expand Up @@ -1188,11 +1252,11 @@ jobs:
local status_msg="$3"
local job_name="$4"
local is_e2e_test="${5:-false}"

if [ "$result_value" != "success" ]; then
FAILED_STAGE="$stage_name"
FAILED_JOB_NAME="$job_name (${{ inputs.storage_type }})"

if [ -z "$REPORT_JSON" ] || [ "$REPORT_JSON" == "" ]; then
REPORT_JSON=$(create_failure_summary "$stage_name" "$status_msg" "$FAILED_JOB_NAME")
elif [ "$is_e2e_test" == "true" ]; then
Expand Down
4 changes: 4 additions & 0 deletions test/dvp-static-cluster/charts/infra/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ spec:
blockDeviceRefs:
- kind: VirtualDisk
name: {{ include "infra.vd-root-name" $name }}
{{- if ne $ctx.Values.storageType "nfs" }}
{{- range $i, $v := $cfg.additionalDisks }}
- kind: VirtualDisk
name: {{ printf "%s-%d" $name $i }}
{{- end }}
{{- end }}
bootloader: {{ $ctx.Values.image.bootloader }}
liveMigrationPolicy: PreferForced
Expand Down Expand Up @@ -90,6 +92,7 @@ spec:
storageClassName: {{ $ctx.Values.storageClass }}
{{- end }}

{{ if ne $ctx.Values.storageType "nfs" }}
{{range $i, $v := $cfg.additionalDisks }}
---
apiVersion: virtualization.deckhouse.io/v1alpha2
Expand All @@ -105,3 +108,4 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
21 changes: 21 additions & 0 deletions test/dvp-static-cluster/charts/infra/templates/nfs/svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{ if eq .Values.storageType "nfs" }}
---
apiVersion: v1
kind: Service
metadata:
name: nfs-server
namespace: {{ .Values.namespace }}
labels:
app: nfs
spec:
type: ClusterIP
selector:
app: nfs
ports:
- name: tcp-2049
port: 2049
protocol: TCP
- name: udp-111
port: 111
protocol: UDP
{{ end }}
Loading
Loading