@blogic-cz/agent-tools 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -209,6 +209,10 @@
|
|
|
209
209
|
"namespace": {
|
|
210
210
|
"description": "Kubectl namespace for tunnel commands.",
|
|
211
211
|
"type": "string"
|
|
212
|
+
},
|
|
213
|
+
"service": {
|
|
214
|
+
"description": "Kubernetes service name used as the port-forward target. Defaults to postgresql.",
|
|
215
|
+
"type": "string"
|
|
212
216
|
}
|
|
213
217
|
},
|
|
214
218
|
"required": ["context", "namespace"]
|
package/src/config/loader.ts
CHANGED
package/src/config/types.ts
CHANGED
package/src/db-tool/service.ts
CHANGED
|
@@ -67,6 +67,7 @@ export class DbService extends Context.Service<
|
|
|
67
67
|
|
|
68
68
|
const kubectlContext = dbConfig.kubectl?.context;
|
|
69
69
|
const kubectlNamespace = dbConfig.kubectl?.namespace;
|
|
70
|
+
const kubectlService = dbConfig.kubectl?.service ?? "postgresql";
|
|
70
71
|
const tunnelTimeoutMs = dbConfig.tunnelTimeoutMs ?? 5000;
|
|
71
72
|
const remotePort = dbConfig.remotePort ?? 5432;
|
|
72
73
|
|
|
@@ -213,7 +214,7 @@ export class DbService extends Context.Service<
|
|
|
213
214
|
kubectlContext,
|
|
214
215
|
"--namespace",
|
|
215
216
|
kubectlNamespace,
|
|
216
|
-
|
|
217
|
+
`svc/${kubectlService}`,
|
|
217
218
|
`${config.port}:${remotePort}`,
|
|
218
219
|
],
|
|
219
220
|
{ stdout: "pipe", stderr: "pipe" },
|