Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e3714cc
feat: add gateway pools for high-availability failover
bernie-g Apr 16, 2026
88a2821
chore: lint auto-format
bernie-g Apr 16, 2026
f0f81c4
fix: replace nested ternaries with if/else blocks
bernie-g Apr 16, 2026
edc64da
fix: org-scoping, race conditions, pool limit, query invalidation
bernie-g Apr 16, 2026
25dca91
fix: add gatewayPool to license defaults and mock, remove pool limit
bernie-g Apr 16, 2026
48d39d8
fix: slug validation, name uniqueness check, popover close on select
bernie-g Apr 16, 2026
c558d9f
docs: add gateway pools documentation with screenshots and FAQ
bernie-g Apr 16, 2026
6eb9042
fix: add 15s refetch interval to gateway pools list
bernie-g Apr 16, 2026
e6b29e2
fix: replace nested ternary with if/else
bernie-g Apr 16, 2026
7eb7f07
fix: address PR review feedback
bernie-g Apr 16, 2026
d4640f7
fix: use Promise.all pattern for connected resources count, fix neste…
bernie-g Apr 16, 2026
7fd6b04
chore: lint auto-format pool modals
bernie-g Apr 17, 2026
1266e73
Merge remote-tracking branch 'origin/main' into feat/gateway-pools
sheensantoscapadngan Apr 24, 2026
086de07
fix: addressed v3 component rename
sheensantoscapadngan Apr 24, 2026
8808a14
refactor: move gateway pools router from v2 to v1
bernie-g Apr 24, 2026
da4c131
chore: include pool and gateway names in pool membership audit logs
bernie-g Apr 24, 2026
4082cec
refactor: let db enforce gateway pool delete restriction via fk
bernie-g Apr 24, 2026
127399f
docs: drop feature-support FAQ from gateway pools docs
bernie-g Apr 24, 2026
d142ba1
docs: use 'gateway' instead of 'member' when referring to pool gateways
bernie-g Apr 24, 2026
4939a32
chore: add pen icon to edit gateway pool dropdown item
bernie-g Apr 24, 2026
981f4a6
feat: add gateway pools to org role permissions ui
bernie-g Apr 24, 2026
200c721
docs: add gateway-pool to org permissions reference
bernie-g Apr 24, 2026
94281de
chore: link gateway pools docs from networking tab badge
bernie-g Apr 24, 2026
d47e1d3
fix: prevent status badge clipping on long gateway names in picker
bernie-g Apr 24, 2026
38abad1
fix: fail k8s auth update when pool has no healthy gateways
bernie-g Apr 24, 2026
590b26b
Revert "fix: fail k8s auth update when pool has no healthy gateways"
bernie-g Apr 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backend/src/@types/fastify.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { TEmailDomainServiceFactory } from "@app/ee/services/email-domain/email-
import { TEventBusService as TInternalEventBusService } from "@app/ee/services/event-bus";
import { TExternalKmsServiceFactory } from "@app/ee/services/external-kms/external-kms-service";
Comment thread
bernie-g marked this conversation as resolved.
import { TGatewayServiceFactory } from "@app/ee/services/gateway/gateway-service";
import { TGatewayPoolServiceFactory } from "@app/ee/services/gateway-pool/gateway-pool-service";
import { TGatewayV2ServiceFactory } from "@app/ee/services/gateway-v2/gateway-v2-service";
import { TGithubOrgSyncServiceFactory } from "@app/ee/services/github-org-sync/github-org-sync-service";
import { TGroupServiceFactory } from "@app/ee/services/group/group-service";
Expand Down Expand Up @@ -369,6 +370,7 @@ declare module "fastify" {
insights: TInsightsServiceFactory;
relay: TRelayServiceFactory;
gatewayV2: TGatewayV2ServiceFactory;
gatewayPool: TGatewayPoolServiceFactory;
Comment thread
bernie-g marked this conversation as resolved.
githubOrgSync: TGithubOrgSyncServiceFactory;
folderCommit: TFolderCommitServiceFactory;
pit: TPitServiceFactory;
Expand Down
12 changes: 12 additions & 0 deletions backend/src/@types/knex.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ import {
TGatewayEnrollmentTokens,
TGatewayEnrollmentTokensInsert,
TGatewayEnrollmentTokensUpdate,
TGatewayPoolMemberships,
TGatewayPoolMembershipsInsert,
TGatewayPoolMembershipsUpdate,
TGatewayPools,
TGatewayPoolsInsert,
TGatewayPoolsUpdate,
TGateways,
TGatewaysInsert,
TGatewaysUpdate,
Expand Down Expand Up @@ -1596,6 +1602,12 @@ declare module "knex/types/tables" {
TGatewayEnrollmentTokensInsert,
TGatewayEnrollmentTokensUpdate
>;
[TableName.GatewayPool]: KnexOriginal.CompositeTableType<TGatewayPools, TGatewayPoolsInsert, TGatewayPoolsUpdate>;
[TableName.GatewayPoolMembership]: KnexOriginal.CompositeTableType<
TGatewayPoolMemberships,
TGatewayPoolMembershipsInsert,
TGatewayPoolMembershipsUpdate
>;
[TableName.UserNotifications]: KnexOriginal.CompositeTableType<
TUserNotifications,
TUserNotificationsInsert,
Expand Down
60 changes: 60 additions & 0 deletions backend/src/db/migrations/20260414000001_add-gateway-pools.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import { Knex } from "knex";

import { TableName } from "../schemas";
import { createOnUpdateTrigger, dropOnUpdateTrigger } from "../utils";

export async function up(knex: Knex): Promise<void> {
// Create gateway_pools table
if (!(await knex.schema.hasTable(TableName.GatewayPool))) {
await knex.schema.createTable(TableName.GatewayPool, (t) => {
t.uuid("id", { primaryKey: true }).defaultTo(knex.fn.uuid());
t.uuid("orgId").notNullable();
t.foreign("orgId").references("id").inTable(TableName.Organization).onDelete("CASCADE");
t.string("name", 32).notNullable();
t.timestamps(true, true, true);
t.unique(["orgId", "name"]);
});

await createOnUpdateTrigger(knex, TableName.GatewayPool);
}

// Create gateway_pool_memberships join table
if (!(await knex.schema.hasTable(TableName.GatewayPoolMembership))) {
await knex.schema.createTable(TableName.GatewayPoolMembership, (t) => {
t.uuid("id", { primaryKey: true }).defaultTo(knex.fn.uuid());
t.uuid("gatewayPoolId").notNullable();
t.foreign("gatewayPoolId").references("id").inTable(TableName.GatewayPool).onDelete("CASCADE");
t.uuid("gatewayId").notNullable();
t.foreign("gatewayId").references("id").inTable(TableName.GatewayV2).onDelete("CASCADE");
t.timestamps(true, true, true);
t.unique(["gatewayPoolId", "gatewayId"]);
});

await createOnUpdateTrigger(knex, TableName.GatewayPoolMembership);
}

// Add gatewayPoolId to identity_kubernetes_auths
const hasGatewayPoolId = await knex.schema.hasColumn(TableName.IdentityKubernetesAuth, "gatewayPoolId");
if (!hasGatewayPoolId) {
await knex.schema.alterTable(TableName.IdentityKubernetesAuth, (t) => {
t.uuid("gatewayPoolId").nullable();
t.foreign("gatewayPoolId").references("id").inTable(TableName.GatewayPool).onDelete("SET NULL");
});
}
Comment thread
bernie-g marked this conversation as resolved.
}

export async function down(knex: Knex): Promise<void> {
// Remove gatewayPoolId from identity_kubernetes_auths
const hasGatewayPoolId = await knex.schema.hasColumn(TableName.IdentityKubernetesAuth, "gatewayPoolId");
if (hasGatewayPoolId) {
await knex.schema.alterTable(TableName.IdentityKubernetesAuth, (t) => {
t.dropColumn("gatewayPoolId");
});
}

await dropOnUpdateTrigger(knex, TableName.GatewayPoolMembership);
await knex.schema.dropTableIfExists(TableName.GatewayPoolMembership);

await dropOnUpdateTrigger(knex, TableName.GatewayPool);
await knex.schema.dropTableIfExists(TableName.GatewayPool);
}
22 changes: 22 additions & 0 deletions backend/src/db/schemas/gateway-pool-memberships.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Code generated by automation script, DO NOT EDIT.
// Automated by pulling database and generating zod schema
// To update. Just run npm run generate:schema
// Written by akhilmhdh.

import { z } from "zod";

import { TImmutableDBKeys } from "./models";

export const GatewayPoolMembershipsSchema = z.object({
id: z.string().uuid(),
gatewayPoolId: z.string().uuid(),
gatewayId: z.string().uuid(),
createdAt: z.date(),
updatedAt: z.date()
});

export type TGatewayPoolMemberships = z.infer<typeof GatewayPoolMembershipsSchema>;
export type TGatewayPoolMembershipsInsert = Omit<z.input<typeof GatewayPoolMembershipsSchema>, TImmutableDBKeys>;
export type TGatewayPoolMembershipsUpdate = Partial<
Omit<z.input<typeof GatewayPoolMembershipsSchema>, TImmutableDBKeys>
>;
20 changes: 20 additions & 0 deletions backend/src/db/schemas/gateway-pools.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Code generated by automation script, DO NOT EDIT.
// Automated by pulling database and generating zod schema
// To update. Just run npm run generate:schema
// Written by akhilmhdh.

import { z } from "zod";

import { TImmutableDBKeys } from "./models";

export const GatewayPoolsSchema = z.object({
id: z.string().uuid(),
orgId: z.string().uuid(),
name: z.string(),
createdAt: z.date(),
updatedAt: z.date()
});

export type TGatewayPools = z.infer<typeof GatewayPoolsSchema>;
export type TGatewayPoolsInsert = Omit<z.input<typeof GatewayPoolsSchema>, TImmutableDBKeys>;
export type TGatewayPoolsUpdate = Partial<Omit<z.input<typeof GatewayPoolsSchema>, TImmutableDBKeys>>;
3 changes: 2 additions & 1 deletion backend/src/db/schemas/identity-kubernetes-auths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export const IdentityKubernetesAuthsSchema = z.object({
gatewayId: z.string().uuid().nullable().optional(),
accessTokenPeriod: z.coerce.number().default(0),
tokenReviewMode: z.string().default("api"),
gatewayV2Id: z.string().uuid().nullable().optional()
gatewayV2Id: z.string().uuid().nullable().optional(),
gatewayPoolId: z.string().uuid().nullable().optional()
});

export type TIdentityKubernetesAuths = z.infer<typeof IdentityKubernetesAuthsSchema>;
Expand Down
2 changes: 2 additions & 0 deletions backend/src/db/schemas/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export * from "./folder-commits";
export * from "./folder-tree-checkpoint-resources";
export * from "./folder-tree-checkpoints";
export * from "./gateway-enrollment-tokens";
export * from "./gateway-pool-memberships";
export * from "./gateway-pools";
export * from "./gateways";
export * from "./gateways-v2";
export * from "./git-app-install-sessions";
Expand Down
2 changes: 2 additions & 0 deletions backend/src/db/schemas/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ export enum TableName {
Relay = "relays",
GatewayV2 = "gateways_v2",
GatewayEnrollmentTokens = "gateway_enrollment_tokens",
GatewayPool = "gateway_pools",
GatewayPoolMembership = "gateway_pool_memberships",

KeyValueStore = "key_value_store",

Expand Down
Loading
Loading