Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Revert "fix: fail k8s auth update when pool has no healthy gateways"

bernie-g590b26b7e0e1
diff --git a/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts b/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts
index 44618820a0..161203465d 100644
--- a/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts
+++ b/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts
@@ -1179,11 +1179,22 @@ export const identityKubernetesAuthServiceFactory = ({
effectiveCaCert = undefined;
}
- // Resolve the gateway ID to validate through (either direct or from pool)
+ // Resolve the gateway ID to validate through (either direct or from pool).
+ // If the pool has no healthy gateways right now, skip validation — the user
+ // should still be able to edit unrelated fields (TTL, audiences, etc.) while
+ // the pool recovers. Attach-time still validates, so the config was known
+ // healthy when it was first created.
let validationGatewayId: string | null = effectiveGatewayId ?? null;
if (!validationGatewayId && effectiveGatewayPoolId) {
- const picked = await gatewayPoolService.pickRandomHealthyGateway(effectiveGatewayPoolId);
- validationGatewayId = picked.id;
+ try {
+ const picked = await gatewayPoolService.pickRandomHealthyGateway(effectiveGatewayPoolId);
+ validationGatewayId = picked.id;
+ } catch {
+ logger.warn(
+ { gatewayPoolId: effectiveGatewayPoolId },
+ "No healthy gateways in pool, skipping connectivity validation for k8s auth update"
+ );
+ }
}
if (validationGatewayId) {