fix: order external PostgreSQL migration resources

This commit is contained in:
root
2026-07-16 23:41:47 +02:00
parent f24d763224
commit 0be9d7d77a
2 changed files with 11 additions and 1 deletions
+1
View File
@@ -735,6 +735,7 @@ test("v03 render keeps node identity as data instead of generated structure", as
Object.keys(externalPostgresMigrationConfig?.data ?? {}).filter((name) => name.endsWith(".sql")),
CLOUD_CORE_MIGRATIONS.map((migration) => path.basename(migration.path))
);
assert.equal(externalPostgresMigrationConfig?.metadata?.annotations?.["argocd.argoproj.io/sync-wave"], "-2");
assert.equal(externalPostgresMigrationJob?.metadata?.annotations?.["argocd.argoproj.io/sync-wave"], "-1");
assert.equal(
externalPostgresMigrationJob?.spec?.template?.spec?.containers?.[0]?.image,
@@ -775,7 +775,16 @@ function externalPostgresManifest({ profile = "v03", config, source, deploy = nu
{
apiVersion: "v1",
kind: "ConfigMap",
metadata: { name: migrationName, namespace, labels, annotations: { ...annotations, "hwlab.pikastech.local/migration-sha256": migrationSha256 } },
metadata: {
name: migrationName,
namespace,
labels,
annotations: {
...annotations,
"argocd.argoproj.io/sync-wave": "-2",
"hwlab.pikastech.local/migration-sha256": migrationSha256
}
},
data: {
"run.mjs": migrationRunner,
...migrationData