add build env and path ingress controls
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
CREATE TABLE "build_env_variables" (
|
||||
"id" UUID NOT NULL DEFAULT gen_random_uuid(),
|
||||
"component_id" UUID NOT NULL,
|
||||
"key" TEXT NOT NULL,
|
||||
"value" TEXT NOT NULL,
|
||||
"is_secret" BOOLEAN NOT NULL DEFAULT false,
|
||||
"created_at" TIMESTAMP(3) WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updated_at" TIMESTAMP(3) WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT "build_env_variables_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX "build_env_variables_component_id_key_key" ON "build_env_variables"("component_id", "key");
|
||||
CREATE INDEX "build_env_variables_component_id_idx" ON "build_env_variables"("component_id");
|
||||
CREATE INDEX "build_env_variables_component_id_is_secret_idx" ON "build_env_variables"("component_id", "is_secret");
|
||||
|
||||
ALTER TABLE "build_env_variables"
|
||||
ADD CONSTRAINT "build_env_variables_component_id_fkey"
|
||||
FOREIGN KEY ("component_id") REFERENCES "app_components"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
COMMENT ON TABLE "build_env_variables" IS '구성요소 빌드 시 주입할 환경변수';
|
||||
COMMENT ON COLUMN "build_env_variables"."component_id" IS '빌드 대상 구성요소 ID';
|
||||
COMMENT ON COLUMN "build_env_variables"."key" IS '환경변수 키';
|
||||
COMMENT ON COLUMN "build_env_variables"."value" IS '환경변수 값';
|
||||
COMMENT ON COLUMN "build_env_variables"."is_secret" IS '비밀값 여부';
|
||||
@@ -0,0 +1,4 @@
|
||||
ALTER TABLE "runtime_ingress_rules"
|
||||
ADD COLUMN "strip_prefix" BOOLEAN NOT NULL DEFAULT false;
|
||||
|
||||
COMMENT ON COLUMN "runtime_ingress_rules"."strip_prefix" IS 'Traefik StripPrefix 미들웨어 적용 여부';
|
||||
@@ -170,6 +170,7 @@ model AppComponent {
|
||||
updatedAt DateTime @updatedAt @map("updated_at") @db.Timestamptz(3)
|
||||
app App @relation(fields: [appId], references: [id], onDelete: Cascade)
|
||||
buildJobs BuildJob[]
|
||||
buildVariables BuildEnvVariable[]
|
||||
runtimeVariables RuntimeEnvVariable[]
|
||||
ingressRules RuntimeIngressRule[]
|
||||
|
||||
@@ -177,6 +178,22 @@ model AppComponent {
|
||||
@@map("app_components")
|
||||
}
|
||||
|
||||
model BuildEnvVariable {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
componentId String @map("component_id") @db.Uuid
|
||||
key String
|
||||
value String
|
||||
isSecret Boolean @default(false) @map("is_secret")
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3)
|
||||
updatedAt DateTime @updatedAt @map("updated_at") @db.Timestamptz(3)
|
||||
component AppComponent @relation(fields: [componentId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([componentId, key])
|
||||
@@index([componentId])
|
||||
@@index([componentId, isSecret])
|
||||
@@map("build_env_variables")
|
||||
}
|
||||
|
||||
model BuildJob {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
componentId String @map("component_id") @db.Uuid
|
||||
@@ -319,6 +336,7 @@ model RuntimeIngressRule {
|
||||
host String
|
||||
path String @default("/")
|
||||
servicePort Int @map("service_port")
|
||||
stripPrefix Boolean @default(false) @map("strip_prefix")
|
||||
tlsEnabled Boolean @default(false) @map("tls_enabled")
|
||||
tlsSecretName String? @map("tls_secret_name")
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3)
|
||||
|
||||
Reference in New Issue
Block a user