@vibesdotdev/integrations-kubernetes 0.0.0-stage → 1.0.0-rc.0
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/README.md +19 -2
- package/dist/helm-chart.d.ts +13 -0
- package/dist/helm-chart.d.ts.map +1 -0
- package/dist/helm-chart.js +508 -0
- package/dist/helm-chart.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/k8s-configmap.d.ts +25 -0
- package/dist/k8s-configmap.d.ts.map +1 -0
- package/dist/k8s-configmap.js +168 -0
- package/dist/k8s-configmap.js.map +1 -0
- package/dist/k8s-gpu-operator.d.ts +3 -0
- package/dist/k8s-gpu-operator.d.ts.map +1 -0
- package/dist/k8s-gpu-operator.js +53 -0
- package/dist/k8s-gpu-operator.js.map +1 -0
- package/dist/k8s-namespace.d.ts +51 -0
- package/dist/k8s-namespace.d.ts.map +1 -0
- package/dist/k8s-namespace.js +280 -0
- package/dist/k8s-namespace.js.map +1 -0
- package/dist/k8s-pod-health.d.ts +60 -0
- package/dist/k8s-pod-health.d.ts.map +1 -0
- package/dist/k8s-pod-health.js +376 -0
- package/dist/k8s-pod-health.js.map +1 -0
- package/dist/k8s-secret.d.ts +55 -0
- package/dist/k8s-secret.d.ts.map +1 -0
- package/dist/k8s-secret.js +391 -0
- package/dist/k8s-secret.js.map +1 -0
- package/dist/kind-cluster.d.ts +84 -0
- package/dist/kind-cluster.d.ts.map +1 -0
- package/dist/kind-cluster.js +694 -0
- package/dist/kind-cluster.js.map +1 -0
- package/dist/kubectl-budget.client.d.ts +13 -0
- package/dist/kubectl-budget.client.d.ts.map +1 -0
- package/dist/kubectl-budget.client.js +38 -0
- package/dist/kubectl-budget.client.js.map +1 -0
- package/dist/kubectl.d.ts +59 -0
- package/dist/kubectl.d.ts.map +1 -0
- package/dist/kubectl.js +121 -0
- package/dist/kubectl.js.map +1 -0
- package/dist/port-forward-command.d.ts +6 -0
- package/dist/port-forward-command.d.ts.map +1 -0
- package/dist/port-forward-command.js +24 -0
- package/dist/port-forward-command.js.map +1 -0
- package/dist/port-forward-compat.d.ts +11 -0
- package/dist/port-forward-compat.d.ts.map +1 -0
- package/dist/port-forward-compat.js +21 -0
- package/dist/port-forward-compat.js.map +1 -0
- package/dist/port-forward-identity.d.ts +23 -0
- package/dist/port-forward-identity.d.ts.map +1 -0
- package/dist/port-forward-identity.js +72 -0
- package/dist/port-forward-identity.js.map +1 -0
- package/dist/port-forward.consumer.plugin.d.ts +3 -0
- package/dist/port-forward.consumer.plugin.d.ts.map +1 -0
- package/dist/port-forward.consumer.plugin.js +10 -0
- package/dist/port-forward.consumer.plugin.js.map +1 -0
- package/dist/port-forward.d.ts +18 -0
- package/dist/port-forward.d.ts.map +1 -0
- package/dist/port-forward.descriptor.d.ts +7 -0
- package/dist/port-forward.descriptor.d.ts.map +1 -0
- package/dist/port-forward.descriptor.js +3 -0
- package/dist/port-forward.descriptor.js.map +1 -0
- package/dist/port-forward.impl.consumer.d.ts +22 -0
- package/dist/port-forward.impl.consumer.d.ts.map +1 -0
- package/dist/port-forward.impl.consumer.js +32 -0
- package/dist/port-forward.impl.consumer.js.map +1 -0
- package/dist/port-forward.js +26 -0
- package/dist/port-forward.js.map +1 -0
- package/dist/port-forward.kind.d.ts +13 -0
- package/dist/port-forward.kind.d.ts.map +1 -0
- package/dist/port-forward.kind.js +12 -0
- package/dist/port-forward.kind.js.map +1 -0
- package/dist/resource-providers.consumer.plugin.d.ts +3 -0
- package/dist/resource-providers.consumer.plugin.d.ts.map +1 -0
- package/dist/resource-providers.consumer.plugin.js +56 -0
- package/dist/resource-providers.consumer.plugin.js.map +1 -0
- package/dist/schemas/helm-chart.d.ts +14 -0
- package/dist/schemas/helm-chart.d.ts.map +1 -0
- package/dist/schemas/helm-chart.js +12 -0
- package/dist/schemas/helm-chart.js.map +1 -0
- package/dist/schemas/k8s-pod-health.d.ts +17 -0
- package/dist/schemas/k8s-pod-health.d.ts.map +1 -0
- package/dist/schemas/k8s-pod-health.js +21 -0
- package/dist/schemas/k8s-pod-health.js.map +1 -0
- package/dist/schemas/port-forward.d.ts +62 -0
- package/dist/schemas/port-forward.d.ts.map +1 -0
- package/dist/schemas/port-forward.js +24 -0
- package/dist/schemas/port-forward.js.map +1 -0
- package/dist/tool-env.d.ts +19 -0
- package/dist/tool-env.d.ts.map +1 -0
- package/dist/tool-env.js +32 -0
- package/dist/tool-env.js.map +1 -0
- package/package.json +80 -4
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createRuntimeImplementation } from '@vibesdotdev/kernel';
|
|
2
|
+
import { constructPortForwardPlan } from "./port-forward-command.js";
|
|
3
|
+
import { isPortForwardConfig, matchesPortForwardSignature, portForwardTokens } from "./port-forward-identity.js";
|
|
4
|
+
import * as z from 'zod/v4';
|
|
5
|
+
/**
|
|
6
|
+
* Process config shape the identity hooks read (PM's hook input is a loose
|
|
7
|
+
* superset, so every hook parses its boundary before reading tokens).
|
|
8
|
+
*/
|
|
9
|
+
const IdentityConfigSchema = z.object({ command: z.string().optional(), args: z.array(z.string()).optional() });
|
|
10
|
+
/** Local listeners a kubectl port-forward declaration holds. */
|
|
11
|
+
function monitoredPorts(config) {
|
|
12
|
+
const parsed = IdentityConfigSchema.safeParse(config);
|
|
13
|
+
if (!parsed.success || !isPortForwardConfig(parsed.data) || !parsed.data.args)
|
|
14
|
+
return [];
|
|
15
|
+
return portForwardTokens(parsed.data.args).map((token) => Number(token.split(':')[0]));
|
|
16
|
+
}
|
|
17
|
+
/** kubectl port-forward process identity: token equality on both command lines. */
|
|
18
|
+
function matchesProcessCommand(input) {
|
|
19
|
+
const parsed = IdentityConfigSchema.safeParse(input.config);
|
|
20
|
+
if (input.port === undefined || !parsed.success || !isPortForwardConfig(parsed.data))
|
|
21
|
+
return false;
|
|
22
|
+
return matchesPortForwardSignature(input.command, parsed.data, input.port);
|
|
23
|
+
}
|
|
24
|
+
export default createRuntimeImplementation({
|
|
25
|
+
kind: 'kubernetes/port-forward', id: 'kubernetes.port-forward',
|
|
26
|
+
implementation: {
|
|
27
|
+
async prepare(config) { return constructPortForwardPlan(config); },
|
|
28
|
+
monitoredPorts,
|
|
29
|
+
matchesProcessCommand
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=port-forward.impl.consumer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"port-forward.impl.consumer.js","sourceRoot":"","sources":["../src/port-forward.impl.consumer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,EACN,mBAAmB,EACnB,2BAA2B,EAC3B,iBAAiB,EACjB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B;;;GAGG;AACH,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAEhH,gEAAgE;AAChE,SAAS,cAAc,CAAC,MAAe;IACtC,MAAM,MAAM,GAAG,oBAAoB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACtD,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACzF,OAAO,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACxF,CAAC;AAED,mFAAmF;AACnF,SAAS,qBAAqB,CAAC,KAA2B;IACzD,MAAM,MAAM,GAAG,oBAAoB,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5D,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACnG,OAAO,2BAA2B,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;AAC5E,CAAC;AAED,eAAe,2BAA2B,CAAC;IAC1C,IAAI,EAAE,yBAAyB,EAAE,EAAE,EAAE,yBAAyB;IAC9D,cAAc,EAAE;QACf,KAAK,CAAC,OAAO,CAAC,MAAyB,IAAI,OAAO,wBAAwB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACrF,cAAc;QACd,qBAAqB;KACrB;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
2
|
+
import { PortForwardImplementationSchema, PortForwardPlanSchema } from "./schemas/port-forward.js";
|
|
3
|
+
export * from "./schemas/port-forward.js";
|
|
4
|
+
export { default as portForwardKind } from "./port-forward.kind.js";
|
|
5
|
+
export { default as portForwardDescriptor } from "./port-forward.descriptor.js";
|
|
6
|
+
export { readPortForwardConfig } from "./port-forward-compat.js";
|
|
7
|
+
export { buildPortForwardPlan } from "./port-forward-command.js";
|
|
8
|
+
export async function preparePortForward(runtime, config) {
|
|
9
|
+
if (!runtime.hasKind('kubernetes/port-forward') ||
|
|
10
|
+
!runtime.query('kubernetes/port-forward').enabled().descriptors().length) {
|
|
11
|
+
throw new CapabilityError('Kubernetes port-forward is unavailable.', 'UNAVAILABLE', {
|
|
12
|
+
reason: 'kubernetes-port-forward-unavailable',
|
|
13
|
+
recoveryHint: 'Compose @vibesdotdev/integrations-kubernetes/port-forward.consumer.plugin.'
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
const resolved = await runtime.query('kubernetes/port-forward').enabled().resolve();
|
|
17
|
+
const implementation = PortForwardImplementationSchema.safeParse(resolved);
|
|
18
|
+
if (!implementation.success) {
|
|
19
|
+
throw new CapabilityError('Invalid Kubernetes port-forward implementation.', 'INTERNAL', { reason: 'kubernetes-port-forward-invalid' });
|
|
20
|
+
}
|
|
21
|
+
const plan = PortForwardPlanSchema.safeParse(await implementation.data.prepare(config));
|
|
22
|
+
if (!plan.success)
|
|
23
|
+
throw new CapabilityError('Invalid Kubernetes port-forward plan.', 'INTERNAL', { reason: 'kubernetes-port-forward-invalid' });
|
|
24
|
+
return plan.data;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=port-forward.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"port-forward.js","sourceRoot":"","sources":["../src/port-forward.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAqB,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,+BAA+B,EAAE,qBAAqB,EAA0B,MAAM,2BAA2B,CAAC;AAC3H,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAC,OAAO,IAAI,qBAAqB,EAAC,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAC,qBAAqB,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,OAAqB,EAAE,MAAyB;IACxF,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,yBAAyB,CAAC;QAC9C,CAAC,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,OAAO,EAAE,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,CAAC;QAC3E,MAAM,IAAI,eAAe,CAAC,yCAAyC,EAAE,aAAa,EAAE;YACnF,MAAM,EAAE,qCAAqC;YAC7C,YAAY,EAAE,4EAA4E;SAC1F,CAAC,CAAC;IACJ,CAAC;IACD,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC;IACpF,MAAM,cAAc,GAAG,+BAA+B,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC3E,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;QAC7B,MAAM,IAAI,eAAe,CAAC,iDAAiD,EAAE,UAAU,EAAE,EAAC,MAAM,EAAE,iCAAiC,EAAC,CAAC,CAAC;IACvI,CAAC;IACD,MAAM,IAAI,GAAG,qBAAqB,CAAC,SAAS,CAAC,MAAM,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IACxF,IAAI,CAAC,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,eAAe,CAAC,uCAAuC,EAAE,UAAU,EAAE,EAAC,MAAM,EAAE,iCAAiC,EAAC,CAAC,CAAC;IAC/I,OAAO,IAAI,CAAC,IAAI,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const _default: import("@vibesdotdev/kernel").RuntimeKindDescriptorRecord<{
|
|
2
|
+
prepare: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<readonly [import("zod").ZodObject<{
|
|
3
|
+
namespace: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4
|
+
service: import("zod").ZodString;
|
|
5
|
+
localPort: import("zod").ZodNumber;
|
|
6
|
+
remotePort: import("zod").ZodNumber;
|
|
7
|
+
context: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8
|
+
additionalFlags: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
9
|
+
labelSelector: import("zod").ZodOptional<import("zod").ZodString>;
|
|
10
|
+
}, import("zod/v4/core").$strip>], null>, import("zod").ZodPromise<import("zod").ZodUnknown>>;
|
|
11
|
+
}>;
|
|
12
|
+
export default _default;
|
|
13
|
+
//# sourceMappingURL=port-forward.kind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"port-forward.kind.d.ts","sourceRoot":"","sources":["../src/port-forward.kind.ts"],"names":[],"mappings":";;;;;;;;;;;AAQA,wBAGG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRuntimeKind, CapabilityError } from '@vibesdotdev/kernel';
|
|
2
|
+
import { PortForwardDescriptorSchema } from "./schemas/port-forward.js";
|
|
3
|
+
class UnimplementedPortForward {
|
|
4
|
+
async prepare() {
|
|
5
|
+
throw new CapabilityError('Kubernetes port-forward is unavailable.', 'UNAVAILABLE', { reason: 'kubernetes-port-forward-unavailable' });
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export default createRuntimeKind({
|
|
9
|
+
id: 'kubernetes/port-forward', descriptorSchema: PortForwardDescriptorSchema,
|
|
10
|
+
defaultImplementation: UnimplementedPortForward
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=port-forward.kind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"port-forward.kind.js","sourceRoot":"","sources":["../src/port-forward.kind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAkC,MAAM,2BAA2B,CAAC;AAExG,MAAM,wBAAwB;IAC7B,KAAK,CAAC,OAAO;QACZ,MAAM,IAAI,eAAe,CAAC,yCAAyC,EAAE,aAAa,EAAE,EAAC,MAAM,EAAE,qCAAqC,EAAC,CAAC,CAAC;IACtI,CAAC;CACD;AACD,eAAe,iBAAiB,CAAwF;IACvH,EAAE,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,2BAA2B;IAC5E,qBAAqB,EAAE,wBAAwB;CAC/C,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-providers.consumer.plugin.d.ts","sourceRoot":"","sources":["../src/resource-providers.consumer.plugin.ts"],"names":[],"mappings":";AA2DA,wBAOG"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kubernetes vendor resource providers as `pm/resource-provider` assets (id =
|
|
3
|
+
* the resource type). Each implementation loads lazily, on the first resource
|
|
4
|
+
* of its type. The `pm/resource-provider` kind itself stays owned by
|
|
5
|
+
* `@vibesdotdev/pm`; this plugin only contributes the vendor descriptors and
|
|
6
|
+
* their consumer-scoped loaders, so a host composes it next to pm's plugin.
|
|
7
|
+
*/
|
|
8
|
+
import { createRuntimeAsset, createRuntimePlugin, loader } from '@vibesdotdev/kernel';
|
|
9
|
+
import { KUBECTL_BUDGET_CLIENT_ID } from "./kubectl-budget.client.js";
|
|
10
|
+
import { RESOURCE_PROVIDER_KIND } from '@vibesdotdev/pm/resources/provider';
|
|
11
|
+
function providerDescriptor(type, name, description) {
|
|
12
|
+
return createRuntimeAsset({ kind: RESOURCE_PROVIDER_KIND, id: type, name, description });
|
|
13
|
+
}
|
|
14
|
+
function providerLoader(type, load) {
|
|
15
|
+
return loader(type, { kind: RESOURCE_PROVIDER_KIND, scope: 'consumer' }, async () => ({ impl: await load() }));
|
|
16
|
+
}
|
|
17
|
+
const descriptors = [
|
|
18
|
+
providerDescriptor('kind/cluster', 'Kind cluster', 'A local Kubernetes-in-Docker cluster.'),
|
|
19
|
+
providerDescriptor('k8s/namespace', 'Kubernetes namespace', 'A Kubernetes namespace.'),
|
|
20
|
+
providerDescriptor('k8s/secret', 'Kubernetes secret', 'An opaque Kubernetes secret, applied through stdin.'),
|
|
21
|
+
providerDescriptor('k8s/secret-tls', 'Kubernetes TLS secret', 'A Kubernetes TLS secret.'),
|
|
22
|
+
providerDescriptor('k8s/secret-docker-registry', 'Kubernetes registry secret', 'A Kubernetes docker-registry secret.'),
|
|
23
|
+
providerDescriptor('k8s/configmap', 'Kubernetes config map', 'A Kubernetes config map.'),
|
|
24
|
+
providerDescriptor('k8s/pod-health', 'Kubernetes pod health', 'Readiness of labelled pods.'),
|
|
25
|
+
providerDescriptor('k8s/gpu-operator', 'Kubernetes GPU operator', 'The NVIDIA GPU operator.'),
|
|
26
|
+
providerDescriptor('helm/chart', 'Helm chart', 'A Helm release.'),
|
|
27
|
+
createRuntimeAsset({
|
|
28
|
+
kind: 'runtime/client',
|
|
29
|
+
id: KUBECTL_BUDGET_CLIENT_ID,
|
|
30
|
+
name: 'kubectl spawn budget',
|
|
31
|
+
description: 'The per-root kubectl concurrency budget the pod-health provider spends.'
|
|
32
|
+
})
|
|
33
|
+
];
|
|
34
|
+
const loaders = [
|
|
35
|
+
providerLoader('kind/cluster', async () => new (await import("./kind-cluster.js")).KindClusterProvider()),
|
|
36
|
+
providerLoader('k8s/namespace', async () => new (await import("./k8s-namespace.js")).K8sNamespaceProvider()),
|
|
37
|
+
providerLoader('k8s/secret', async () => (await import("./k8s-secret.js")).k8sSecretProvider),
|
|
38
|
+
providerLoader('k8s/secret-tls', async () => (await import("./k8s-secret.js")).k8sSecretTlsProvider),
|
|
39
|
+
providerLoader('k8s/secret-docker-registry', async () => (await import("./k8s-secret.js")).k8sSecretDockerRegistryProvider),
|
|
40
|
+
providerLoader('k8s/configmap', async () => (await import("./k8s-configmap.js")).k8sConfigMapProvider),
|
|
41
|
+
providerLoader('k8s/pod-health', async () => (await import("./k8s-pod-health.js")).k8sPodHealthProvider),
|
|
42
|
+
providerLoader('k8s/gpu-operator', async () => (await import("./k8s-gpu-operator.js")).k8sGpuOperatorProvider),
|
|
43
|
+
providerLoader('helm/chart', async () => (await import("./helm-chart.js")).helmChartProvider),
|
|
44
|
+
loader(KUBECTL_BUDGET_CLIENT_ID, { kind: 'runtime/client' }, async () => ({
|
|
45
|
+
impl: (await import("./kubectl-budget.client.js")).KubectlBudgetClient
|
|
46
|
+
}))
|
|
47
|
+
];
|
|
48
|
+
export default createRuntimePlugin({
|
|
49
|
+
id: 'integrations-kubernetes/resource-providers',
|
|
50
|
+
name: 'Kubernetes resource providers',
|
|
51
|
+
description: 'kind, kubectl and helm resource providers for the pm/resource-provider kind',
|
|
52
|
+
dependencies: ['runtime-client'],
|
|
53
|
+
descriptors,
|
|
54
|
+
loaders
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=resource-providers.consumer.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-providers.consumer.plugin.js","sourceRoot":"","sources":["../src/resource-providers.consumer.plugin.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export declare const HelmValuesSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
3
|
+
export type HelmValues = z.infer<typeof HelmValuesSchema>;
|
|
4
|
+
export declare const HelmChartConfigSchema: z.ZodObject<{
|
|
5
|
+
chart: z.ZodString;
|
|
6
|
+
release: z.ZodString;
|
|
7
|
+
namespace: z.ZodString;
|
|
8
|
+
context: z.ZodOptional<z.ZodString>;
|
|
9
|
+
valuesFiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
|
+
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
11
|
+
createNamespace: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type HelmChartConfig = z.infer<typeof HelmChartConfigSchema>;
|
|
14
|
+
//# sourceMappingURL=helm-chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helm-chart.d.ts","sourceRoot":"","sources":["../../src/schemas/helm-chart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,eAAO,MAAM,gBAAgB,yFAAuE,CAAC;AACrG,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,qBAAqB;;;;;;;;iBAQhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export const HelmValuesSchema = z.record(z.string(), z.union([z.string(), z.number(), z.boolean()]));
|
|
3
|
+
export const HelmChartConfigSchema = z.object({
|
|
4
|
+
chart: z.string().min(1),
|
|
5
|
+
release: z.string().min(1),
|
|
6
|
+
namespace: z.string().min(1),
|
|
7
|
+
context: z.string().optional(),
|
|
8
|
+
valuesFiles: z.array(z.string().min(1)).optional(),
|
|
9
|
+
values: HelmValuesSchema.optional(),
|
|
10
|
+
createNamespace: z.boolean().optional()
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=helm-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helm-chart.js","sourceRoot":"","sources":["../../src/schemas/helm-chart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;AAGrG,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAClD,MAAM,EAAE,gBAAgB,CAAC,QAAQ,EAAE;IACnC,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
/** The kubectl spawn budget of one runtime root: slots in use and the callers waiting for one. */
|
|
3
|
+
export declare const KubectlSemaphoreSchema: z.ZodObject<{
|
|
4
|
+
active: z.ZodNumber;
|
|
5
|
+
queue: z.ZodArray<z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodVoid>>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type KubectlSemaphore = z.infer<typeof KubectlSemaphoreSchema>;
|
|
8
|
+
export declare const K8sPodHealthConfigSchema: z.ZodObject<{
|
|
9
|
+
labelSelector: z.ZodString;
|
|
10
|
+
namespace: z.ZodString;
|
|
11
|
+
context: z.ZodOptional<z.ZodString>;
|
|
12
|
+
minReady: z.ZodDefault<z.ZodNumber>;
|
|
13
|
+
healthCheckInterval: z.ZodDefault<z.ZodNumber>;
|
|
14
|
+
requireAllContainersReady: z.ZodDefault<z.ZodBoolean>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export type K8sPodHealthConfig = z.infer<typeof K8sPodHealthConfigSchema>;
|
|
17
|
+
//# sourceMappingURL=k8s-pod-health.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"k8s-pod-health.d.ts","sourceRoot":"","sources":["../../src/schemas/k8s-pod-health.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,kGAAkG;AAClG,eAAO,MAAM,sBAAsB;;;iBAGjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,wBAAwB;;;;;;;iBAanC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
/** The kubectl spawn budget of one runtime root: slots in use and the callers waiting for one. */
|
|
3
|
+
export const KubectlSemaphoreSchema = z.object({
|
|
4
|
+
active: z.number().int().nonnegative(),
|
|
5
|
+
queue: z.array(z.function({ input: [], output: z.void() }))
|
|
6
|
+
});
|
|
7
|
+
export const K8sPodHealthConfigSchema = z.object({
|
|
8
|
+
/** Label selector to find pods (e.g., 'app=postgres') */
|
|
9
|
+
labelSelector: z.string().min(1),
|
|
10
|
+
/** Kubernetes namespace */
|
|
11
|
+
namespace: z.string().min(1),
|
|
12
|
+
/** Kubernetes context (optional) */
|
|
13
|
+
context: z.string().optional(),
|
|
14
|
+
/** Minimum number of ready pods required (default: 1) */
|
|
15
|
+
minReady: z.number().int().positive().default(1),
|
|
16
|
+
/** Health check interval in ms (default: 10000) */
|
|
17
|
+
healthCheckInterval: z.number().int().positive().default(10000),
|
|
18
|
+
/** Whether to require all containers to be ready (default: true) */
|
|
19
|
+
requireAllContainersReady: z.boolean().default(true)
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=k8s-pod-health.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"k8s-pod-health.js","sourceRoot":"","sources":["../../src/schemas/k8s-pod-health.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,kGAAkG;AAClG,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IACtC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;CAC3D,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,yDAAyD;IACzD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,2BAA2B;IAC3B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,oCAAoC;IACpC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,yDAAyD;IACzD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAChD,mDAAmD;IACnD,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAC/D,oEAAoE;IACpE,yBAAyB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CACpD,CAAC,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export declare const PortForwardConfigSchema: z.ZodObject<{
|
|
3
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
4
|
+
service: z.ZodString;
|
|
5
|
+
localPort: z.ZodNumber;
|
|
6
|
+
remotePort: z.ZodNumber;
|
|
7
|
+
context: z.ZodOptional<z.ZodString>;
|
|
8
|
+
additionalFlags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
|
+
labelSelector: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const PortForwardCommandSchema: z.ZodObject<{
|
|
12
|
+
command: z.ZodString;
|
|
13
|
+
args: z.ZodArray<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const PortForwardPlanSchema: z.ZodObject<{
|
|
16
|
+
process: z.ZodObject<{
|
|
17
|
+
command: z.ZodString;
|
|
18
|
+
args: z.ZodArray<z.ZodString>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
readiness: z.ZodObject<{
|
|
21
|
+
command: z.ZodString;
|
|
22
|
+
args: z.ZodArray<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export declare const PortForwardImplementationSchema: z.ZodObject<{
|
|
26
|
+
prepare: z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
|
|
27
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
28
|
+
service: z.ZodString;
|
|
29
|
+
localPort: z.ZodNumber;
|
|
30
|
+
remotePort: z.ZodNumber;
|
|
31
|
+
context: z.ZodOptional<z.ZodString>;
|
|
32
|
+
additionalFlags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
33
|
+
labelSelector: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>], null>, z.ZodPromise<z.ZodUnknown>>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export declare const PortForwardDescriptorSchema: z.ZodObject<{
|
|
37
|
+
id: z.ZodString;
|
|
38
|
+
name: z.ZodOptional<z.ZodString>;
|
|
39
|
+
description: z.ZodOptional<z.ZodString>;
|
|
40
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
|
+
hardware: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
42
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
capabilityId: z.ZodOptional<z.ZodString>;
|
|
45
|
+
requiredContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
46
|
+
optionalContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
47
|
+
config: z.ZodOptional<z.ZodUnknown>;
|
|
48
|
+
retention: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
49
|
+
maxAgeDays: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
maxEntries: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
maxBytes: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
cascadeFrom: z.ZodOptional<z.ZodString>;
|
|
53
|
+
ageField: z.ZodOptional<z.ZodString>;
|
|
54
|
+
reason: z.ZodString;
|
|
55
|
+
enforcedBy: z.ZodOptional<z.ZodString>;
|
|
56
|
+
}, z.core.$strip>]>>;
|
|
57
|
+
kind: z.ZodLiteral<"kubernetes/port-forward">;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
export type PortForwardConfig = z.infer<typeof PortForwardConfigSchema>;
|
|
60
|
+
export type PortForwardPlan = z.infer<typeof PortForwardPlanSchema>;
|
|
61
|
+
export type PortForwardImplementation = z.infer<typeof PortForwardImplementationSchema>;
|
|
62
|
+
//# sourceMappingURL=port-forward.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"port-forward.d.ts","sourceRoot":"","sources":["../../src/schemas/port-forward.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAO5B,eAAO,MAAM,uBAAuB;;;;;;;;iBAQlC,CAAC;AACH,eAAO,MAAM,wBAAwB;;;iBAAsE,CAAC;AAC5G,eAAO,MAAM,qBAAqB;;;;;;;;;iBAGhC,CAAC;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;iBAE1C,CAAC;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;iBAA+E,CAAC;AACxH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { RuntimeDescriptorSchema } from '@vibesdotdev/kernel/schemas/descriptor';
|
|
3
|
+
const DnsLabelSchema = z.string().min(1).max(63).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/);
|
|
4
|
+
const PortSchema = z.number().int().positive().max(65535);
|
|
5
|
+
const OptionTextSchema = z.string().min(1).regex(/^[^\p{Cc}]+$/u);
|
|
6
|
+
export const PortForwardConfigSchema = z.object({
|
|
7
|
+
namespace: DnsLabelSchema.optional(),
|
|
8
|
+
service: DnsLabelSchema,
|
|
9
|
+
localPort: PortSchema,
|
|
10
|
+
remotePort: PortSchema,
|
|
11
|
+
context: OptionTextSchema.optional(),
|
|
12
|
+
additionalFlags: z.array(z.string()).optional(),
|
|
13
|
+
labelSelector: OptionTextSchema.optional()
|
|
14
|
+
});
|
|
15
|
+
export const PortForwardCommandSchema = z.object({ command: z.string().min(1), args: z.array(z.string()) });
|
|
16
|
+
export const PortForwardPlanSchema = z.object({
|
|
17
|
+
process: PortForwardCommandSchema,
|
|
18
|
+
readiness: PortForwardCommandSchema
|
|
19
|
+
});
|
|
20
|
+
export const PortForwardImplementationSchema = z.object({
|
|
21
|
+
prepare: z.function({ input: [PortForwardConfigSchema], output: z.promise(z.unknown()) })
|
|
22
|
+
});
|
|
23
|
+
export const PortForwardDescriptorSchema = RuntimeDescriptorSchema.extend({ kind: z.literal('kubernetes/port-forward') });
|
|
24
|
+
//# sourceMappingURL=port-forward.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"port-forward.js","sourceRoot":"","sources":["../../src/schemas/port-forward.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;AAC1F,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC1D,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;AAElE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,SAAS,EAAE,cAAc,CAAC,QAAQ,EAAE;IACpC,OAAO,EAAE,cAAc;IACvB,SAAS,EAAE,UAAU;IACrB,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,gBAAgB,CAAC,QAAQ,EAAE;IACpC,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC/C,aAAa,EAAE,gBAAgB,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;AAC5G,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,OAAO,EAAE,wBAAwB;IACjC,SAAS,EAAE,wBAAwB;CACnC,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAC,KAAK,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,EAAC,CAAC;CACvF,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,uBAAuB,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,yBAAyB,CAAC,EAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host variables the vendor CLIs these providers run read beyond the
|
|
3
|
+
* host set. Each call names them (`inheritEnv`); credentials are never named
|
|
4
|
+
* here — they reach a child only as a lease in its declaration. Generic
|
|
5
|
+
* failure and excerpt helpers stay owned by `@vibesdotdev/pm/resources/tool-env`.
|
|
6
|
+
*/
|
|
7
|
+
import type { RuntimeRef } from '@vibesdotdev/kernel';
|
|
8
|
+
import { type PMToolOptions } from '@vibesdotdev/pm/utils/exec';
|
|
9
|
+
/** kubectl and helm: the cluster config and helm's own directories. */
|
|
10
|
+
export declare const KUBE_TOOL_INHERIT_ENV: readonly ["KUBECONFIG", "HELM_CONFIG_HOME", "HELM_CACHE_HOME", "HELM_DATA_HOME", "HELM_KUBECONTEXT"];
|
|
11
|
+
/** docker and kind: the daemon endpoint and client config. */
|
|
12
|
+
export declare const DOCKER_TOOL_INHERIT_ENV: readonly ["DOCKER_HOST", "DOCKER_CONFIG", "DOCKER_CONTEXT", "DOCKER_CERT_PATH", "DOCKER_TLS_VERIFY", "KIND_EXPERIMENTAL_PROVIDER", "KUBECONFIG"];
|
|
13
|
+
/**
|
|
14
|
+
* Run kubectl or helm with the cluster variables named. The call ends with the
|
|
15
|
+
* handed runtime (its `lifecycle.signal`) unless the caller passes its own
|
|
16
|
+
* signal, so a hung cluster call never holds the runtime's disposal.
|
|
17
|
+
*/
|
|
18
|
+
export declare function runKubeCapture(runtime: RuntimeRef, cmd: string, args: readonly string[], options?: PMToolOptions): Promise<import("@vibesdotdev/kernel/execution").RunCaptureResult>;
|
|
19
|
+
//# sourceMappingURL=tool-env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-env.d.ts","sourceRoot":"","sources":["../src/tool-env.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE5E,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,sGAMxB,CAAC;AAEX,8DAA8D;AAC9D,eAAO,MAAM,uBAAuB,kJAQ1B,CAAC;AAEX;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,GAAE,aAAkB,qEAMpH"}
|
package/dist/tool-env.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { runCapture } from '@vibesdotdev/pm/utils/exec';
|
|
2
|
+
/** kubectl and helm: the cluster config and helm's own directories. */
|
|
3
|
+
export const KUBE_TOOL_INHERIT_ENV = [
|
|
4
|
+
'KUBECONFIG',
|
|
5
|
+
'HELM_CONFIG_HOME',
|
|
6
|
+
'HELM_CACHE_HOME',
|
|
7
|
+
'HELM_DATA_HOME',
|
|
8
|
+
'HELM_KUBECONTEXT'
|
|
9
|
+
];
|
|
10
|
+
/** docker and kind: the daemon endpoint and client config. */
|
|
11
|
+
export const DOCKER_TOOL_INHERIT_ENV = [
|
|
12
|
+
'DOCKER_HOST',
|
|
13
|
+
'DOCKER_CONFIG',
|
|
14
|
+
'DOCKER_CONTEXT',
|
|
15
|
+
'DOCKER_CERT_PATH',
|
|
16
|
+
'DOCKER_TLS_VERIFY',
|
|
17
|
+
'KIND_EXPERIMENTAL_PROVIDER',
|
|
18
|
+
'KUBECONFIG'
|
|
19
|
+
];
|
|
20
|
+
/**
|
|
21
|
+
* Run kubectl or helm with the cluster variables named. The call ends with the
|
|
22
|
+
* handed runtime (its `lifecycle.signal`) unless the caller passes its own
|
|
23
|
+
* signal, so a hung cluster call never holds the runtime's disposal.
|
|
24
|
+
*/
|
|
25
|
+
export function runKubeCapture(runtime, cmd, args, options = {}) {
|
|
26
|
+
return runCapture(runtime, cmd, args, {
|
|
27
|
+
...options,
|
|
28
|
+
signal: options.signal ?? runtime.lifecycle.signal,
|
|
29
|
+
inheritEnv: KUBE_TOOL_INHERIT_ENV
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=tool-env.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-env.js","sourceRoot":"","sources":["../src/tool-env.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAsB,MAAM,4BAA4B,CAAC;AAE5E,uEAAuE;AACvE,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACpC,YAAY;IACZ,kBAAkB;IAClB,iBAAiB;IACjB,gBAAgB;IAChB,kBAAkB;CACT,CAAC;AAEX,8DAA8D;AAC9D,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACtC,aAAa;IACb,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,mBAAmB;IACnB,4BAA4B;IAC5B,YAAY;CACH,CAAC;AAEX;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,OAAmB,EAAE,GAAW,EAAE,IAAuB,EAAE,UAAyB,EAAE;IACpH,OAAO,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE;QACrC,GAAG,OAAO;QACV,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM;QAClD,UAAU,EAAE,qBAAqB;KACjC,CAAC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,82 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibesdotdev/integrations-kubernetes",
|
|
3
|
-
"version": "0.0.0
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0-rc.0",
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"@vibesdotdev/kernel": "^1.0.0-rc.5",
|
|
6
|
+
"@vibesdotdev/logging": "^1.0.0-rc.3",
|
|
7
|
+
"@vibesdotdev/pm": "^1.0.0-rc.2",
|
|
8
|
+
"@vibesdotdev/shared": "^1.0.0-rc.4",
|
|
9
|
+
"zod": "^4.6.7"
|
|
10
|
+
},
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"bun": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./port-forward": {
|
|
20
|
+
"bun": "./dist/port-forward.js",
|
|
21
|
+
"types": "./dist/port-forward.d.ts",
|
|
22
|
+
"import": "./dist/port-forward.js",
|
|
23
|
+
"default": "./dist/port-forward.js"
|
|
24
|
+
},
|
|
25
|
+
"./port-forward.consumer.plugin": {
|
|
26
|
+
"bun": "./dist/port-forward.consumer.plugin.js",
|
|
27
|
+
"types": "./dist/port-forward.consumer.plugin.d.ts",
|
|
28
|
+
"import": "./dist/port-forward.consumer.plugin.js",
|
|
29
|
+
"default": "./dist/port-forward.consumer.plugin.js"
|
|
30
|
+
},
|
|
31
|
+
"./resource-providers.consumer.plugin": {
|
|
32
|
+
"bun": "./dist/resource-providers.consumer.plugin.js",
|
|
33
|
+
"types": "./dist/resource-providers.consumer.plugin.d.ts",
|
|
34
|
+
"import": "./dist/resource-providers.consumer.plugin.js",
|
|
35
|
+
"default": "./dist/resource-providers.consumer.plugin.js"
|
|
36
|
+
},
|
|
37
|
+
"./kubectl": {
|
|
38
|
+
"bun": "./dist/kubectl.js",
|
|
39
|
+
"types": "./dist/kubectl.d.ts",
|
|
40
|
+
"import": "./dist/kubectl.js",
|
|
41
|
+
"default": "./dist/kubectl.js"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist",
|
|
46
|
+
"README.md",
|
|
47
|
+
"LICENSE",
|
|
48
|
+
"!dist/**/*.test.*"
|
|
49
|
+
],
|
|
50
|
+
"scripts": {
|
|
51
|
+
"lint": "node ../../node_modules/@vibesdotdev/internal-oxlint-toolchain/ratchet.mjs",
|
|
52
|
+
"check": "bun --bun tsc -p tsconfig.json",
|
|
53
|
+
"build": "bun --bun tsc -p tsconfig.build.json",
|
|
54
|
+
"test": "bun test src"
|
|
55
|
+
},
|
|
56
|
+
"repository": {
|
|
57
|
+
"type": "git",
|
|
58
|
+
"url": "ssh://git@git.vibes.dev/vibesdotdev/integrations.git",
|
|
59
|
+
"directory": "integrations/kubernetes"
|
|
60
|
+
},
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"registry": "https://packages.vibes.dev",
|
|
63
|
+
"access": "public",
|
|
64
|
+
"tag": "next"
|
|
65
|
+
},
|
|
66
|
+
"vibes": {
|
|
67
|
+
"visibility": "public",
|
|
68
|
+
"registry": {
|
|
69
|
+
"repositoryId": "70be51c9-5ab7-4d7e-9f47-801cb17720d8",
|
|
70
|
+
"directory": "integrations/kubernetes"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"type": "module",
|
|
74
|
+
"types": "./dist/index.d.ts",
|
|
75
|
+
"license": "MIT",
|
|
76
|
+
"gitHead": "494ddfcab4c073eef61acb182042223d7e4da2e5",
|
|
77
|
+
"_vibes_source": {
|
|
78
|
+
"repo": "ssh://git@git.vibes.dev/vibesdotdev/integrations.git",
|
|
79
|
+
"sha": "494ddfcab4c073eef61acb182042223d7e4da2e5",
|
|
80
|
+
"workspaceDigest": "sha256:a6f39965949a1080c06902a3b802f92a727eec6876d4fa2c63a18c58b78bd6c7"
|
|
81
|
+
}
|
|
82
|
+
}
|