fix(deploy): persist replica snapshot before stop for restore on start
Read live deployment replica counts from K8s before scaling to zero, store them on the application as suspendedReplicas, and use that snapshot when resuming so Start restores the pre-stop replica layout. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -159,6 +159,10 @@ export class Application {
|
||||
@Column({ type: 'timestamptz', nullable: true })
|
||||
suspendedAt: Date; // When the app was suspended (pods scaled to 0)
|
||||
|
||||
/** Per-deployment replica counts captured before suspend (deployment name → replicas). */
|
||||
@Column({ type: 'jsonb', nullable: true })
|
||||
suspendedReplicas?: Record<string, number>;
|
||||
|
||||
@Column({ type: 'timestamptz', nullable: true })
|
||||
scheduledDeletionAt: Date; // When the app will be permanently deleted
|
||||
|
||||
|
||||
Reference in New Issue
Block a user