gateway api fixes

This commit is contained in:
Nils Blomgren
2026-05-21 16:57:50 +02:00
parent 8b94fb8826
commit e0f967482e
68 changed files with 44082 additions and 437 deletions

View File

@@ -38,4 +38,19 @@ public interface IKubernetesClientFactory
/// Uses kubectl exec to connect to the primary and run psql.
/// </summary>
Task ExecuteSqlAsync(string clusterName, string ns, string sql, string kubeconfig, CancellationToken ct = default);
/// <summary>
/// Executes a MongoDB script against the primary pod via kubectl exec + mongosh.
/// The primary pod is the first StatefulSet member: {clusterName}-0.
/// When username and password are provided, mongosh connects with SCRAM credentials.
/// </summary>
Task ExecuteMongoAsync(string clusterName, string ns, string script, string kubeconfig,
string? username = null, string? password = null, CancellationToken ct = default);
/// <summary>
/// Reads a single key from a Kubernetes Secret and returns the decoded value.
/// Returns null if the secret or key does not exist.
/// </summary>
Task<string?> GetSecretValueAsync(string secretName, string key, string ns, string kubeconfig,
CancellationToken ct = default);
}