fix(deploy) : fit web CPU reservations to cluster capacity
This commit is contained in:
@@ -16,7 +16,7 @@ describe("production deployment contract", () => {
|
||||
expect(deployment.match(/path: \/api\/healthz\n/gu)).toHaveLength(3);
|
||||
expect(deployment).toContain("kubernetes.io/arch: arm64");
|
||||
expect(deployment).toMatch(
|
||||
/requests:\s+cpu: 500m\s+memory: 1Gi\s+limits:\s+cpu: "1"\s+memory: 2Gi/u,
|
||||
/requests:\s+cpu: 200m\s+memory: 1Gi\s+limits:\s+cpu: "1"\s+memory: 2Gi/u,
|
||||
);
|
||||
expect(deployment).toContain("runAsNonRoot: true");
|
||||
expect(deployment).toContain("runAsUser: 1000");
|
||||
@@ -148,6 +148,11 @@ describe("production deployment contract", () => {
|
||||
const patchRolloutStrategy = workflow.indexOf("patch deployment buzz-sheet");
|
||||
expect(patchRolloutStrategy).toBeGreaterThan(-1);
|
||||
expect(patchRolloutStrategy).toBeLessThan(workflow.indexOf("set image"));
|
||||
expect(workflow).toContain("--requests=cpu=200m,memory=1Gi");
|
||||
expect(workflow).toContain("--limits=cpu=1,memory=2Gi");
|
||||
const setResources = workflow.indexOf("set resources deployment/buzz-sheet");
|
||||
expect(setResources).toBeGreaterThan(-1);
|
||||
expect(setResources).toBeLessThan(workflow.indexOf("set image"));
|
||||
const deleteMigrationJob = workflow.indexOf(
|
||||
'delete job buzz-sheet-migrate --ignore-not-found',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user