import { KubernetesClient, KubernetesResource } from "@kubernetesjs/ops"; import { ClusterSetupConfig, ApplicationConfig, DeploymentStatus, OperatorInfo, ClusterOverview, SecretConfig } from "./types"; export declare class SetupClient { private client; private defaultNamespace; constructor(client: KubernetesClient, defaultNamespace?: string); /** * Check if the Kubernetes cluster is accessible */ checkConnection(): Promise; applyManifest(manifest: KubernetesResource, options?: { continueOnError?: boolean; log?: (msg: string) => void; }): Promise; applyManifests(manifests: KubernetesResource[], options?: { continueOnError?: boolean; log?: (msg: string) => void; }): Promise; deployApplicationResources(config: ApplicationConfig, options?: { continueOnError?: boolean; log?: (msg: string) => void; }): Promise; deleteApplicationResources(config: ApplicationConfig, options?: { continueOnError?: boolean; log?: (msg: string) => void; }): Promise; deleteManifest(manifest: KubernetesResource, options?: { continueOnError?: boolean; log?: (msg: string) => void; }): Promise; deleteManifests(manifests: KubernetesResource[], options?: { continueOnError?: boolean; log?: (msg: string) => void; }): Promise; /** * Install operators based on cluster setup configuration */ installOperators(config: ClusterSetupConfig): Promise; /** * Resolves operator dependencies to ensure proper installation order */ private resolveOperatorDependencies; /** * Ensures a namespace is ready for use by waiting for any terminating namespace to be fully deleted */ private ensureNamespaceReady; /** * Delete operators based on cluster setup configuration */ deleteOperators(config: ClusterSetupConfig, options?: { continueOnError?: boolean; }): Promise; /** * Get deployment status for a cluster setup */ getClusterSetupStatus(config: ClusterSetupConfig): Promise; /** * Get deployment status for an application */ getApplicationStatus(config: ApplicationConfig): Promise; /** * Delete resources for a cluster setup */ deleteClusterSetup(config: ClusterSetupConfig): Promise; /** * Helper method to filter pods and check readiness for kube-prometheus-stack * Filters out test pods and node-exporter pods, then checks core deployments as fallback */ private filterPodsAndCheckReadiness; private getOperatorStatus; /** * Install a single operator by name (optional version). */ installOperatorByName(name: string, version?: string): Promise; /** * Uninstall a single operator by name (optional version). */ uninstallOperatorByName(name: string, version?: string): Promise; /** * List supported operators with detected status + version across all namespaces. */ listOperatorsInfo(): Promise; /** * High-level cluster overview (nodes/pods/services/operators/version). */ getClusterOverview(): Promise; /** * Create a secret by applying a minimal Secret manifest. */ createSecret(secret: SecretConfig): Promise; /** * List secrets in one or all namespaces (name/namespace/type/age/keys). */ listSecrets(namespace?: string): Promise>; private buildApplicationManifests; private safeListNamespaces; private findOperatorDeployment; /** * Return best-effort install state for a known operator. * Uses deployment label selectors and defaults per operator, then falls back to a cluster-wide search. */ getOperatorInstallations(name: string): Promise>; /** * Wait until the operator reports 'installed' or timeout. */ waitForOperator(name: string, timeoutMs?: number, // Reduced from 300_000 (5 min) to 180_000 (3 min) pollMs?: number): Promise; /** * Wait until the operator is fully removed from its canonical namespaces (and CRDs absent if hinted). */ waitForOperatorDeletion(name: string, timeoutMs?: number, pollMs?: number): Promise; /** * Detailed debug info for an operator: matched deployments/pods per namespace, and CRD presence. */ getOperatorDebug(name: string): Promise; private getOperatorDetector; private getOperatorCRDHints; private formatAge; }