feat: multi-cluster management with pool-based load balancing
- Add ClusterPool entity for grouping clusters into named pools - Support 3 deployment modes: manual cluster, pool load-balanced, default fallback - Pool strategies: least-apps (fewest deployed apps) and round-robin - Add pool CRUD API endpoints (admin) and public pool listing - Frontend deploy page: 3-mode cluster selector (Default/Manual/Pool) - Frontend app detail: shows assigned cluster and pool info - Admin pools management page with cluster selection and strategy picker - Application entity extended with poolId field
This commit is contained in:
@@ -28,6 +28,7 @@ export interface Application {
|
||||
port: number;
|
||||
userId: string;
|
||||
clusterId?: string;
|
||||
poolId?: string;
|
||||
latestImageTag?: string;
|
||||
subdomain?: string;
|
||||
deployments?: Deployment[];
|
||||
@@ -95,6 +96,37 @@ export interface CreateApplicationDto {
|
||||
memoryLimit?: string;
|
||||
replicas?: number;
|
||||
port?: number;
|
||||
clusterId?: string;
|
||||
poolId?: string;
|
||||
}
|
||||
|
||||
export interface ClusterPublic {
|
||||
id: string;
|
||||
name: string;
|
||||
region?: string;
|
||||
provider?: string;
|
||||
isDefault: boolean;
|
||||
status: 'active' | 'inactive' | 'maintenance';
|
||||
}
|
||||
|
||||
export interface ClusterPoolPublic {
|
||||
id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
strategy: 'least-apps' | 'round-robin';
|
||||
clusterIds: string[];
|
||||
isActive: boolean;
|
||||
clusters: Pick<ClusterPublic, 'id' | 'name' | 'region' | 'provider' | 'status'>[];
|
||||
}
|
||||
|
||||
export interface ClusterPool {
|
||||
id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
strategy: 'least-apps' | 'round-robin';
|
||||
clusterIds: string[];
|
||||
isActive: boolean;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface PodInfo {
|
||||
|
||||
Reference in New Issue
Block a user