import { KubernetesClient } from '@kubernetesjs/ops'; import { SetupClient } from '../setup'; export type PostgresPoolMode = 'session' | 'transaction'; export type BackupMethod = 'barmanObjectStore' | 'volumeSnapshot' | 'plugin'; export interface PostgresDeployOptions { name?: string; namespace?: string; instances?: number; storage?: string; storageClass?: string; imageName?: string; superuserUsername?: string; superuserPassword?: string; appUsername?: string; appPassword?: string; enablePooler?: boolean; poolerName?: string; poolerInstances?: number; poolMode?: PostgresPoolMode; operatorNamespace?: string; log?: (msg: string) => void; } export interface DeployResult { namespace: string; clusterName: string; poolerName?: string; hosts: { rw: string; ro: string; poolerRw?: string; }; } export declare class PostgresDeployer { private kube; private setup; private log; constructor(kube: KubernetesClient, setup: SetupClient, log?: (msg: string) => void); deploy(options?: PostgresDeployOptions): Promise; waitForClusterReady(name: string, namespace: string, timeoutMs?: number, pollMs?: number): Promise; waitForPoolerReady(name: string, namespace: string, timeoutMs?: number, pollMs?: number): Promise; /** * Create an on-demand Backup CR for a cluster. * If 'method' is omitted, CNPG uses the Cluster's backup config; otherwise it can be forced. */ createBackup(opts: { namespace: string; clusterName: string; method?: BackupMethod; name?: string; }): Promise<{ name: string; namespace: string; }>; private waitForCnpgWebhooksReady; private injectCaBundleIntoWebhooks; } export declare function connectionInfo(res: DeployResult, appUser?: string, appPass?: string): { direct: { host: string; port: number; database: string; user: string; password: string; url: string; }; pooled: { host: string; port: number; database: string; user: string; password: string; url: string; }; notes: string; };