fix(e2e): apply CRDs before helm install to resolve dependency ordering

Helm cannot validate PackageSource CR during install because the CRD
is part of the same chart. Pre-apply CRDs via helm template + kubectl
apply --server-side before running helm upgrade --install.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
Aleksei Sviridkin 2026-02-16 22:52:17 +03:00
parent 153d2c48ae
commit 58dfc97201
No known key found for this signature in database
GPG key ID: 7988329FDF395282

View file

@ -8,6 +8,12 @@
}
@test "Install Cozystack" {
# Install CRDs first (PackageSource CR in the chart depends on them)
helm template installer packages/core/installer \
--namespace cozy-system \
--show-only templates/crds.yaml \
| kubectl apply --server-side -f -
# Install cozy-installer chart
helm upgrade installer packages/core/installer \
--install \