feat: add health check failureThreshold

This commit is contained in:
biersoeckli
2026-01-30 08:00:27 +00:00
parent 4ec36e18de
commit ff1165a275
12 changed files with 85 additions and 13 deletions

View File

@@ -0,0 +1,44 @@
-- RedefineTables
PRAGMA defer_foreign_keys=ON;
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_App" (
"id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"appType" TEXT NOT NULL DEFAULT 'APP',
"projectId" TEXT NOT NULL,
"sourceType" TEXT NOT NULL DEFAULT 'GIT',
"containerImageSource" TEXT,
"containerRegistryUsername" TEXT,
"containerRegistryPassword" TEXT,
"gitUrl" TEXT,
"gitBranch" TEXT,
"gitUsername" TEXT,
"gitToken" TEXT,
"dockerfilePath" TEXT NOT NULL DEFAULT './Dockerfile',
"replicas" INTEGER NOT NULL DEFAULT 1,
"envVars" TEXT NOT NULL DEFAULT '',
"memoryReservation" INTEGER,
"memoryLimit" INTEGER,
"cpuReservation" INTEGER,
"cpuLimit" INTEGER,
"webhookId" TEXT,
"ingressNetworkPolicy" TEXT NOT NULL DEFAULT 'ALLOW_ALL',
"egressNetworkPolicy" TEXT NOT NULL DEFAULT 'ALLOW_ALL',
"useNetworkPolicy" BOOLEAN NOT NULL DEFAULT true,
"healthChechHttpGetPath" TEXT,
"healthCheckHttpScheme" TEXT,
"healthCheckHttpHeadersJson" TEXT,
"healthCheckHttpPort" INTEGER,
"healthCheckPeriodSeconds" INTEGER NOT NULL DEFAULT 15,
"healthCheckTimeoutSeconds" INTEGER NOT NULL DEFAULT 5,
"healthCheckFailureThreshold" INTEGER NOT NULL DEFAULT 3,
"healthCheckTcpPort" INTEGER,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
CONSTRAINT "App_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);
INSERT INTO "new_App" ("appType", "containerImageSource", "containerRegistryPassword", "containerRegistryUsername", "cpuLimit", "cpuReservation", "createdAt", "dockerfilePath", "egressNetworkPolicy", "envVars", "gitBranch", "gitToken", "gitUrl", "gitUsername", "healthChechHttpGetPath", "healthCheckHttpHeadersJson", "healthCheckHttpPort", "healthCheckHttpScheme", "healthCheckPeriodSeconds", "healthCheckTcpPort", "healthCheckTimeoutSeconds", "id", "ingressNetworkPolicy", "memoryLimit", "memoryReservation", "name", "projectId", "replicas", "sourceType", "updatedAt", "useNetworkPolicy", "webhookId") SELECT "appType", "containerImageSource", "containerRegistryPassword", "containerRegistryUsername", "cpuLimit", "cpuReservation", "createdAt", "dockerfilePath", "egressNetworkPolicy", "envVars", "gitBranch", "gitToken", "gitUrl", "gitUsername", "healthChechHttpGetPath", "healthCheckHttpHeadersJson", "healthCheckHttpPort", "healthCheckHttpScheme", "healthCheckPeriodSeconds", "healthCheckTcpPort", "healthCheckTimeoutSeconds", "id", "ingressNetworkPolicy", "memoryLimit", "memoryReservation", "name", "projectId", "replicas", "sourceType", "updatedAt", "useNetworkPolicy", "webhookId" FROM "App";
DROP TABLE "App";
ALTER TABLE "new_App" RENAME TO "App";
PRAGMA foreign_keys=ON;
PRAGMA defer_foreign_keys=OFF;

View File

@@ -205,12 +205,13 @@ model App {
useNetworkPolicy Boolean @default(true)
// healthCheck startupProbe, readinessProbe, livenessProbe
healthChechHttpGetPath String?
healthCheckHttpScheme String? // HTTP, HTTPS
healthCheckHttpHeadersJson String? // JSON stringified key-value pairs
healthCheckHttpPort Int?
healthCheckPeriodSeconds Int @default(10)
healthCheckTimeoutSeconds Int @default(5)
healthChechHttpGetPath String?
healthCheckHttpScheme String? // HTTP, HTTPS
healthCheckHttpHeadersJson String? // JSON stringified key-value pairs
healthCheckHttpPort Int?
healthCheckPeriodSeconds Int @default(15)
healthCheckTimeoutSeconds Int @default(5)
healthCheckFailureThreshold Int @default(3)
healthCheckTcpPort Int?