test: extend deploy json drift contract to decision center
This commit is contained in:
@@ -78,6 +78,9 @@ export interface DeployJsonExecutorMirror {
|
||||
request?: string;
|
||||
limit?: string;
|
||||
};
|
||||
health?: {
|
||||
deployMetadataRequired?: boolean;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -295,6 +298,9 @@ export function compareDeployJsonExecutorMirrors(
|
||||
pushDrift(items, mirror, "runtime.healthPath", service.runtime.healthPath, mirror.runtime.healthPath);
|
||||
pushDrift(items, mirror, "runtime.memory.request", service.runtime.memory.request, mirror.runtime.memory?.request);
|
||||
pushDrift(items, mirror, "runtime.memory.limit", service.runtime.memory.limit, mirror.runtime.memory?.limit);
|
||||
if (service.runtime.health !== undefined) {
|
||||
pushDrift(items, mirror, "runtime.health.deployMetadataRequired", service.runtime.health.deployMetadataRequired, mirror.runtime.health?.deployMetadataRequired);
|
||||
}
|
||||
}
|
||||
}
|
||||
return items;
|
||||
@@ -366,6 +372,14 @@ export function k3sManifestExecutorMirror(service: DeployJsonServiceContract): D
|
||||
request: firstRegex(container, /^\s+requests:\s*$[\s\S]*?^\s+memory:\s*([^\s#"]+)\s*$/mu),
|
||||
limit: firstRegex(container, /^\s+limits:\s*$[\s\S]*?^\s+memory:\s*([^\s#"]+)\s*$/mu),
|
||||
},
|
||||
health: {
|
||||
deployMetadataRequired: [
|
||||
"UNIDESK_DEPLOY_SERVICE_ID",
|
||||
"UNIDESK_DEPLOY_REPO",
|
||||
"UNIDESK_DEPLOY_COMMIT",
|
||||
"UNIDESK_DEPLOY_REQUESTED_COMMIT",
|
||||
].every((name) => container.includes(`name: ${name}`)),
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user