File tree Expand file tree Collapse file tree 9 files changed +41
-28
lines changed
Expand file tree Collapse file tree 9 files changed +41
-28
lines changed Original file line number Diff line number Diff line change 7979 version : " latest"
8080
8181 - name : Setup d8
82- uses :
werf/trdl/actions/[email protected] 83- with :
84- repo : d8
85- url : https://deckhouse.ru/downloads/deckhouse-cli-trdl/
86- root-version : 1
87- root-sha512 : 343bd5f0d8811254e5f0b6fe292372a7b7eda08d276ff255229200f84e58a8151ab2729df3515cb11372dc3899c70df172a4e54c8a596a73d67ae790466a0491
88- group : 0
89- channel : stable
82+ uses : ./.github/actions/install-d8
9083
9184 - name : Install yq
9285 run : |
@@ -147,7 +140,7 @@ jobs:
147140 env :
148141 GO_VERSION : " 1.24.6"
149142 TIMEOUT : 4h
150- RUN_ID : nightly-nested-e2e- ${{ matrix.storage_name }}-${{ github.run_number }}
143+ RUN_ID : ${{ needs.setup.outputs.run_id }}
151144 steps :
152145 - uses : actions/checkout@v4
153146
@@ -167,15 +160,8 @@ jobs:
167160 with :
168161 version : " latest"
169162
170- - name : Setup d8 CLI
171- uses :
werf/trdl/actions/[email protected] 172- with :
173- repo : d8
174- url : https://deckhouse.ru/downloads/deckhouse-cli-trdl/
175- root-version : 1
176- root-sha512 : 343bd5f0d8811254e5f0b6fe2923729df3515cb11372dc3899c70df172a4e54c8a596a73d67ae790466a0491
177- group : 0
178- channel : stable
163+ - name : Setup d8
164+ uses : ./.github/actions/install-d8
179165
180166 - name : Install ginkgo
181167 working-directory : test/e2e
@@ -191,7 +177,7 @@ jobs:
191177 uses : actions/download-artifact@v4
192178 with :
193179 name : nested-run-${{ env.RUN_ID }}
194- path : ci/dvp-e2e/tmp/runs
180+ path : .
195181
196182 - name : Configure kubeconfig env
197183 run : |
Original file line number Diff line number Diff line change @@ -535,16 +535,21 @@ tasks:
535535 echo "[CLEANUP] Prefix='{{ .PREFIX }}'"
536536 ns_list=$(kubectl get ns -o json | jq -r --arg p '{{ .PREFIX }}' '.items[].metadata.name | select(startswith($p))')
537537 if [ -z "${ns_list}" ]; then
538- echo "[INFO] No namespaces to delete"; exit 0
538+ echo "[INFO] No namespaces to delete"
539+ else
540+ for ns in $ns_list; do
541+ echo "[CLEANUP] Deleting namespace $ns ..."
542+ kubectl delete ns "$ns" --wait=false || true
543+ done
544+ echo "[CLEANUP] Waiting for namespaces to be deleted..."
545+ for ns in $ns_list; do
546+ kubectl wait --for=delete ns/"$ns" --timeout=600s || echo "[WARN] Namespace $ns was not fully deleted within timeout"
547+ done
539548 fi
540- for ns in $ns_list; do
541- echo "[CLEANUP] Deleting namespace $ns ..."
542- kubectl delete ns "$ns" --wait=false || true
543- done
544- echo "[CLEANUP] Waiting for namespaces to be deleted..."
545- for ns in $ns_list; do
546- kubectl wait --for=delete ns/"$ns" --timeout=600s || echo "[WARN] Namespace $ns was not fully deleted within timeout"
547- done
549+ # Cleanup cluster-scoped resources for this run-id (if any)
550+ echo "[CLEANUP] Deleting cluster-scoped resources labeled with run-id='{{ .PREFIX }}'"
551+ kubectl delete virtualmachineclass -l e2e.deckhouse.io/run-id='{{ .PREFIX }}' --ignore-not-found || true
552+ kubectl delete clusterrolebinding -l e2e.deckhouse.io/run-id='{{ .PREFIX }}' --ignore-not-found || true
548553
549554 # ------------------------------------------------------------
550555 # CI helpers: kubeconfig + registry
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ kind: Service
33metadata :
44 name : dvp-over-dvp-443
55 namespace : {{ .Values.namespace }}
6+ labels :
7+ e2e.deckhouse.io/run-id : " {{ .Values.namespace }}"
68spec :
79 ports :
810 - port : 443
@@ -20,6 +22,8 @@ metadata:
2022 annotations :
2123 nginx.ingress.kubernetes.io/ssl-passthrough : " true"
2224 nginx.ingress.kubernetes.io/backend-protocol : " HTTPS"
25+ labels :
26+ e2e.deckhouse.io/run-id : " {{ .Values.namespace }}"
2327spec :
2428 ingressClassName : nginx
2529 rules :
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ kind: Deployment
44metadata :
55 name : jump-host
66 namespace : {{ .Values.namespace }}
7+ labels :
8+ e2e.deckhouse.io/run-id : " {{ .Values.namespace }}"
79spec :
810 replicas : 1
911 selector :
1315 metadata :
1416 labels :
1517 app : jump-host
18+ e2e.deckhouse.io/run-id : " {{ .Values.namespace }}"
1619 spec :
1720 containers :
1821 - name : jump-host
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ kind: Service
44metadata :
55 name : jump-host
66 namespace : {{ .Values.namespace }}
7+ labels :
8+ e2e.deckhouse.io/run-id : " {{ .Values.namespace }}"
79spec :
810 type : NodePort
911 selector :
Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ metadata:
44 name : {{ .Values.namespace }}
55 labels :
66 heritage : deckhouse
7+ e2e.deckhouse.io/run-id : " {{ .Values.namespace }}"
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ kind: ServiceAccount
33metadata :
44 name : dkp-sa
55 namespace : {{ .Values.namespace }}
6+ labels :
7+ e2e.deckhouse.io/run-id : " {{ .Values.namespace }}"
68---
79apiVersion : v1
810kind : Secret
@@ -11,13 +13,17 @@ metadata:
1113 namespace : {{ .Values.namespace }}
1214 annotations :
1315 kubernetes.io/service-account.name : dkp-sa
16+ labels :
17+ e2e.deckhouse.io/run-id : " {{ .Values.namespace }}"
1418type : kubernetes.io/service-account-token
1519---
1620apiVersion : rbac.authorization.k8s.io/v1
1721kind : RoleBinding
1822metadata :
1923 name : dkp-sa-rb
2024 namespace : {{ .Values.namespace }}
25+ labels :
26+ e2e.deckhouse.io/run-id : " {{ .Values.namespace }}"
2127subjects :
2228 - kind : ServiceAccount
2329 name : dkp-sa
@@ -31,6 +37,8 @@ apiVersion: rbac.authorization.k8s.io/v1
3137kind : ClusterRoleBinding
3238metadata :
3339 name : dkp-sa-cluster-admin-{{ .Values.namespace }}
40+ labels :
41+ e2e.deckhouse.io/run-id : " {{ .Values.namespace }}"
3442subjects :
3543 - kind : ServiceAccount
3644 name : dkp-sa
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ kind: VirtualImage
44metadata :
55 name : image
66 namespace : {{ .Values.namespace }}
7+ labels :
8+ e2e.deckhouse.io/run-id : " {{ .Values.namespace }}"
79spec :
810 storage : ContainerRegistry
911 dataSource :
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ apiVersion: virtualization.deckhouse.io/v1alpha2
22kind : VirtualMachineClass
33metadata :
44 name : " {{ .Values.namespace }}-cpu"
5+ labels :
6+ e2e.deckhouse.io/run-id : " {{ .Values.namespace }}"
57spec :
68 cpu :
79 type : Discovery
You can’t perform that action at this time.
0 commit comments