|
75 | 75 | } |
76 | 76 |
|
77 | 77 | @test "Create platform Package and reconcile previous version" { |
78 | | - # Minimal, version-stable platform config: networking + publishing only. These |
79 | | - # keys have been valid since the 1.4 line, so the same manifest installs on the |
80 | | - # baseline AND is what the current chart re-renders on upgrade. Deliberately |
81 | | - # lean (no monitoring/seaweedfs bundle) — the seeded canaries don't need them, |
82 | | - # and a leaner baseline is faster and less flaky while still exercising the |
83 | | - # operators/CRDs/storage/tenant/app upgrade surface. |
| 78 | + # Version-stable platform config: networking + publishing (valid since the 1.4 |
| 79 | + # line, so the same manifest installs on the baseline AND is re-rendered by the |
| 80 | + # current chart on upgrade), plus migrations.etcdAdoptSkipBackup. |
| 81 | + # |
| 82 | + # etcdAdoptSkipBackup makes the etcd v1alpha2 adoption migration (run during the |
| 83 | + # upgrade) adopt the live etcd WITHOUT its pre-adoption S3 safety snapshot. That |
| 84 | + # snapshot is structurally impossible in an e2e sandbox: the Etcd backup |
| 85 | + # strategy has no caCert field, so it needs a trusted-cert (ACME) external S3 |
| 86 | + # endpoint, which a sandbox on example.org with no DNS/ACME cannot provide |
| 87 | + # (proven on dev10 — the snapshot only completes against a real ACME S3 host). |
| 88 | + # The adoption itself (pod/PVC re-ownership, operator swap, etcd 3.5->3.6 roll) |
| 89 | + # still runs — that is what this lane exercises. Set here (no strict values |
| 90 | + # schema on either version) so it is in place when the current chart upgrades. |
84 | 91 | kubectl apply -f - <<EOF |
85 | 92 | apiVersion: cozystack.io/v1alpha1 |
86 | 93 | kind: Package |
|
99 | 106 | publishing: |
100 | 107 | host: "example.org" |
101 | 108 | apiServerEndpoint: "https://192.168.123.10:6443" |
| 109 | + migrations: |
| 110 | + etcdAdoptSkipBackup: true |
102 | 111 | EOF |
103 | 112 |
|
104 | 113 | # Configure storage (LINSTOR pool + StorageClasses) and the MetalLB pool in the |
@@ -128,14 +137,22 @@ EOF |
128 | 137 | } |
129 | 138 |
|
130 | 139 | @test "Configure root tenant (baseline)" { |
131 | | - # Enable just enough of the root tenant to host a child tenant + apps: etcd |
132 | | - # (tenant control plane) and ingress. Monitoring/seaweedfs are intentionally |
133 | | - # left off (see the lean-baseline rationale above). |
| 140 | + # Mirror a realistic root tenant: etcd (a legacy etcd.aenix.io cluster for the |
| 141 | + # v1alpha2 adoption migration to exercise on upgrade), ingress, and seaweedfs. |
| 142 | + # seaweedfs is the historical default (install-cozystack.bats enables it too), |
| 143 | + # so the baseline resembles a real cluster being upgraded. The etcd-adoption |
| 144 | + # migration does NOT depend on the seaweedfs backup chain here — that snapshot |
| 145 | + # is skipped via migrations.etcdAdoptSkipBackup (see the platform Package |
| 146 | + # above), so we only need the seaweedfs HR itself Ready, not the deeper |
| 147 | + # S3/bucket/creds projection. |
134 | 148 | kubectl patch tenants/root -n tenant-root --type merge \ |
135 | | - -p '{"spec":{"host":"example.org","ingress":true,"etcd":true,"isolated":true}}' |
| 149 | + -p '{"spec":{"host":"example.org","ingress":true,"etcd":true,"isolated":true,"seaweedfs":true}}' |
136 | 150 |
|
137 | | - timeout 60 sh -ec 'until kubectl get hr -n tenant-root etcd ingress tenant-root >/dev/null 2>&1; do sleep 1; done' |
138 | | - kubectl wait hr/etcd hr/ingress hr/tenant-root -n tenant-root --timeout=10m --for=condition=ready |
| 151 | + timeout 60 sh -ec 'until kubectl get hr -n tenant-root etcd ingress seaweedfs tenant-root >/dev/null 2>&1; do sleep 1; done' |
| 152 | + # seaweedfs installs as a serial chain (seaweedfs-db CNPG -> seaweedfs-system |
| 153 | + # raft -> seaweedfs wrapper), ~5-6min idle and longer under load; the |
| 154 | + # tenant-root parent flips Ready only after every child, so gate at 20m. |
| 155 | + kubectl wait hr/etcd hr/ingress hr/seaweedfs hr/tenant-root -n tenant-root --timeout=20m --for=condition=ready |
139 | 156 | } |
140 | 157 |
|
141 | 158 | @test "Create isolated test tenant (baseline)" { |
|
0 commit comments