@microagi/alchemy-gcp 0.6.0 → 0.7.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/CHANGELOG.md +47 -0
- package/lib/Kubernetes/KubernetesManifest.d.ts +100 -0
- package/lib/Kubernetes/KubernetesManifest.d.ts.map +1 -0
- package/lib/Kubernetes/KubernetesManifest.js +131 -0
- package/lib/Kubernetes/KubernetesManifest.js.map +1 -0
- package/lib/Kubernetes/Secret.d.ts +25 -18
- package/lib/Kubernetes/Secret.d.ts.map +1 -1
- package/lib/Kubernetes/Secret.js +79 -45
- package/lib/Kubernetes/Secret.js.map +1 -1
- package/lib/Kubernetes/client.d.ts +27 -23
- package/lib/Kubernetes/client.d.ts.map +1 -1
- package/lib/Kubernetes/client.js +139 -37
- package/lib/Kubernetes/client.js.map +1 -1
- package/lib/Kubernetes/connection.d.ts +48 -0
- package/lib/Kubernetes/connection.d.ts.map +1 -0
- package/lib/Kubernetes/connection.js +93 -0
- package/lib/Kubernetes/connection.js.map +1 -0
- package/lib/Kubernetes/index.d.ts +1 -0
- package/lib/Kubernetes/index.d.ts.map +1 -1
- package/lib/Kubernetes/index.js +1 -0
- package/lib/Kubernetes/index.js.map +1 -1
- package/lib/Providers.d.ts.map +1 -1
- package/lib/Providers.js +3 -1
- package/lib/Providers.js.map +1 -1
- package/package.json +3 -1
- package/src/Kubernetes/KubernetesManifest.ts +301 -0
- package/src/Kubernetes/Secret.ts +153 -79
- package/src/Kubernetes/client.ts +226 -59
- package/src/Kubernetes/connection.ts +180 -0
- package/src/Kubernetes/index.ts +1 -0
- package/src/Providers.ts +6 -0
|
@@ -19,8 +19,8 @@ export declare class KubernetesApiError extends KubernetesApiError_base<{
|
|
|
19
19
|
body: string;
|
|
20
20
|
}> {
|
|
21
21
|
}
|
|
22
|
-
/**
|
|
23
|
-
export interface
|
|
22
|
+
/** A Kubernetes object as seen on the wire (only the fields we read back). */
|
|
23
|
+
export interface KubeObject {
|
|
24
24
|
apiVersion?: string;
|
|
25
25
|
kind?: string;
|
|
26
26
|
metadata?: {
|
|
@@ -29,30 +29,34 @@ export interface SecretObject {
|
|
|
29
29
|
uid?: string;
|
|
30
30
|
resourceVersion?: string;
|
|
31
31
|
labels?: Record<string, string>;
|
|
32
|
+
[key: string]: unknown;
|
|
32
33
|
};
|
|
33
|
-
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
}
|
|
36
|
+
/** Where a Kind lives in the REST hierarchy, from the discovery doc. */
|
|
37
|
+
interface ResourceInfo {
|
|
38
|
+
/** Plural resource name, e.g. `secrets`, `deployments`. */
|
|
39
|
+
plural: string;
|
|
40
|
+
/** Whether instances are namespaced (vs cluster-scoped). */
|
|
41
|
+
namespaced: boolean;
|
|
34
42
|
}
|
|
35
|
-
/** GET a Secret; the caller maps `KubernetesApiError(404)` to "missing". */
|
|
36
|
-
export declare const getSecret: (connection: GkeConnection, namespace: string, name: string) => Effect.Effect<SecretObject, KubernetesApiError>;
|
|
37
43
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* Values go through `data` (base64), NOT `stringData`: server-side apply
|
|
42
|
-
* tracks the field manager's ownership of `data` keys, so dropping a key
|
|
43
|
-
* from a later apply prunes it from the stored Secret. `stringData` is
|
|
44
|
-
* write-only/ephemeral and isn't tracked, which would leave stale keys.
|
|
44
|
+
* Resolve a Kind to its REST resource (plural + scope) via the apiserver's
|
|
45
|
+
* discovery endpoint. This is what lets SSA work for ANY kind — built-ins and
|
|
46
|
+
* CRDs — without a hard-coded kind→plural table.
|
|
45
47
|
*/
|
|
46
|
-
export declare const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
export declare const
|
|
48
|
+
export declare const resolveResource: (connection: GkeConnection, apiVersion: string, kind: string) => Effect.Effect<ResourceInfo, KubernetesApiError>;
|
|
49
|
+
/**
|
|
50
|
+
* Server-side apply an arbitrary object (idempotent create-or-converge).
|
|
51
|
+
* `force=true` makes alchemy the field manager even where another manager
|
|
52
|
+
* currently owns a field we declare. Only the fields present in `object` are
|
|
53
|
+
* managed; fields owned by other managers are left untouched, and dropping a
|
|
54
|
+
* previously-declared field prunes it.
|
|
55
|
+
*/
|
|
56
|
+
export declare const applyObject: (connection: GkeConnection, object: KubeObject, fieldManager?: string) => Effect.Effect<KubeObject | undefined, KubernetesApiError>;
|
|
57
|
+
/** GET an object; the caller maps `KubernetesApiError(404)` to "missing". */
|
|
58
|
+
export declare const getObject: (connection: GkeConnection, apiVersion: string, kind: string, namespace: string | undefined, name: string) => Effect.Effect<KubeObject, KubernetesApiError>;
|
|
59
|
+
/** DELETE an object; 404 is tolerated as success (idempotent teardown). */
|
|
60
|
+
export declare const deleteObject: (connection: GkeConnection, apiVersion: string, kind: string, namespace: string | undefined, name: string) => Effect.Effect<void, KubernetesApiError>;
|
|
57
61
|
export {};
|
|
58
62
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/Kubernetes/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/Kubernetes/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAgExC,yDAAyD;AACzD,MAAM,WAAW,aAAa;IAC5B,qEAAqE;IACrE,QAAQ,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,aAAa,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;CACf;;;;AAED,wEAAwE;AACxE,qBAAa,kBAAmB,SAAQ,wBAEtC;IACA,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;I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,GACvB,YAAY,aAAa,EACzB,YAAY,MAAM,EAClB,MAAM,MAAM,EACZ,WAAW,MAAM,GAAG,SAAS,EAC7B,MAAM,MAAM,KACX,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,kBAAkB,CAkBtC,CAAC"}
|
package/lib/Kubernetes/client.js
CHANGED
|
@@ -2,22 +2,63 @@ import * as Data from "effect/Data";
|
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
3
|
import * as https from "node:https";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Raw, **server-side-apply-capable** GKE Kubernetes REST client.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* - a Google OAuth bearer token (cloud-platform scope), minted from the
|
|
9
|
-
* provider's ADC {@link Credentials}, and
|
|
10
|
-
* - the cluster's own CA certificate for TLS verification.
|
|
7
|
+
* # Two ways this provider writes to a cluster — and when to use each
|
|
11
8
|
*
|
|
12
|
-
*
|
|
9
|
+
* There are two transports for talking to a GKE control plane. They are not
|
|
10
|
+
* redundant; each is correct for a different shape of resource.
|
|
11
|
+
*
|
|
12
|
+
* ### 1. Typed per-kind ops — `@distilled.cloud/kubernetes` via `connection.ts`
|
|
13
|
+
*
|
|
14
|
+
* What {@link "./Secret.ts"} uses. A **create + replace (PUT)** upsert built
|
|
15
|
+
* from the typed `core/v1` operations, with the cluster wired in by
|
|
16
|
+
* `clusterLayer`.
|
|
17
|
+
*
|
|
18
|
+
* **Use when** the kind is known at author time and the resource fully owns the
|
|
19
|
+
* object (Secret, ConfigMap, …).
|
|
20
|
+
* - ✅ Typed inputs/outputs (real `metadata`/`data`/`type` fields), no
|
|
21
|
+
* discovery round-trip, no content-type fiddling.
|
|
22
|
+
* - ⚠️ A PUT is a *full-object replacement*: it carries `resourceVersion` and
|
|
23
|
+
* overwrites every field — so it clobbers anything another manager set that
|
|
24
|
+
* you didn't include. Fine for objects you solely own; wrong for shared ones.
|
|
25
|
+
* - ⚠️ Per-kind only — there's a distinct typed op per Kind.
|
|
26
|
+
*
|
|
27
|
+
* ### 2. This raw client — server-side apply of an **arbitrary** object
|
|
28
|
+
*
|
|
29
|
+
* What {@link "./KubernetesManifest.ts"} uses. A single `PATCH` with
|
|
30
|
+
* `Content-Type: application/apply-patch+yaml`, `?fieldManager=alchemy&force=true`,
|
|
31
|
+
* the object itself as the (untyped) body, and the resource path resolved from
|
|
32
|
+
* the apiserver's **discovery** endpoint so *any* Kind works — built-ins and
|
|
33
|
+
* CRDs alike.
|
|
34
|
+
*
|
|
35
|
+
* **Use when** the kind is dynamic/unknown (generic manifests, CRDs), **or**
|
|
36
|
+
* you need server-side-apply semantics:
|
|
37
|
+
* - **field-level merge / ownership** — apply touches only the fields
|
|
38
|
+
* `fieldManager: alchemy` declares, leaving fields owned by other managers
|
|
39
|
+
* (controllers, defaulting, admission) intact instead of clobbering them;
|
|
40
|
+
* - **declarative pruning** — dropping a field you previously owned removes it,
|
|
41
|
+
* without a read-merge-write dance;
|
|
42
|
+
* - **one idempotent call** — no read-before-write, no create-vs-replace
|
|
43
|
+
* branch, no `resourceVersion` juggling.
|
|
44
|
+
* - ⚠️ Untyped body, plus one extra discovery `GET` to map Kind → resource.
|
|
45
|
+
*
|
|
46
|
+
* Rule of thumb: **known Kind you fully own → typed create/replace (path 1);
|
|
47
|
+
* arbitrary Kind or shared/merge semantics → SSA (this client).**
|
|
48
|
+
*
|
|
49
|
+
* ---
|
|
50
|
+
*
|
|
51
|
+
* Both transports authenticate with a Google OAuth bearer token (cloud-platform
|
|
52
|
+
* scope, minted from the provider's ADC credentials) and trust the cluster's
|
|
53
|
+
* own CA. `node:https` is used here deliberately (rather than the Effect
|
|
13
54
|
* `HttpClient`): the GKE API server presents a certificate signed by the
|
|
14
|
-
* *per-cluster* CA — not a public root — so the request must trust an
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* are wrapped in `Effect.tryPromise` so failures surface as typed errors
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
55
|
+
* *per-cluster* CA — not a public root — so the request must trust an explicit,
|
|
56
|
+
* runtime-resolved `ca` PEM. (`connection.ts`'s `clusterLayer` solves the same
|
|
57
|
+
* CA-trust problem for the distilled path, by overriding `FetchHttpClient`.)
|
|
58
|
+
* Calls are wrapped in `Effect.tryPromise` so failures surface as typed errors;
|
|
59
|
+
* a socket timeout bounds hung requests (Effect interruption won't abort an
|
|
60
|
+
* in-flight socket — the timeout is what guarantees a deploy can't block
|
|
61
|
+
* forever).
|
|
21
62
|
*/
|
|
22
63
|
const REQUEST_TIMEOUT_MS = 30_000;
|
|
23
64
|
/** A non-2xx (or transport) response from the Kubernetes API server. */
|
|
@@ -99,33 +140,94 @@ const requestJson = Effect.fn("k8s.requestJson")(function* ({ connection, method
|
|
|
99
140
|
}),
|
|
100
141
|
});
|
|
101
142
|
});
|
|
102
|
-
const secretPath = (namespace, name) => `/api/v1/namespaces/${namespace}/secrets/${name}`;
|
|
103
|
-
/** GET a Secret; the caller maps `KubernetesApiError(404)` to "missing". */
|
|
104
|
-
export const getSecret = (connection, namespace, name) => requestJson({
|
|
105
|
-
connection,
|
|
106
|
-
method: "GET",
|
|
107
|
-
path: secretPath(namespace, name),
|
|
108
|
-
});
|
|
109
143
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
*
|
|
116
|
-
*
|
|
144
|
+
* Discovery path for an `apiVersion`: core group (`v1`) lives under `/api/v1`,
|
|
145
|
+
* named groups (`apps/v1`, `networking.k8s.io/v1`) under `/apis/{group}/{ver}`.
|
|
146
|
+
*/
|
|
147
|
+
const apiPathPrefix = (apiVersion) => apiVersion.includes("/") ? `/apis/${apiVersion}` : `/api/${apiVersion}`;
|
|
148
|
+
/**
|
|
149
|
+
* Resolve a Kind to its REST resource (plural + scope) via the apiserver's
|
|
150
|
+
* discovery endpoint. This is what lets SSA work for ANY kind — built-ins and
|
|
151
|
+
* CRDs — without a hard-coded kind→plural table.
|
|
117
152
|
*/
|
|
118
|
-
export const
|
|
153
|
+
export const resolveResource = (connection, apiVersion, kind) => {
|
|
154
|
+
const path = apiPathPrefix(apiVersion);
|
|
155
|
+
return requestJson({ connection, method: "GET", path }).pipe(Effect.flatMap((doc) => {
|
|
156
|
+
// Match on Kind, excluding subresources (their `name` contains a `/`,
|
|
157
|
+
// e.g. `pods/status`).
|
|
158
|
+
const match = (doc.resources ?? []).find((r) => r.kind === kind && !r.name.includes("/"));
|
|
159
|
+
return match
|
|
160
|
+
? Effect.succeed({ plural: match.name, namespaced: match.namespaced })
|
|
161
|
+
: Effect.fail(new KubernetesApiError({
|
|
162
|
+
method: "GET",
|
|
163
|
+
path,
|
|
164
|
+
statusCode: 0,
|
|
165
|
+
body: `Kind ${apiVersion}/${kind} not found in discovery (${path})`,
|
|
166
|
+
}));
|
|
167
|
+
}));
|
|
168
|
+
};
|
|
169
|
+
const objectPath = (apiVersion, info, namespace, name) => {
|
|
170
|
+
const prefix = apiPathPrefix(apiVersion);
|
|
171
|
+
const collection = info.namespaced
|
|
172
|
+
? `${prefix}/namespaces/${namespace}/${info.plural}`
|
|
173
|
+
: `${prefix}/${info.plural}`;
|
|
174
|
+
return name ? `${collection}/${name}` : collection;
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* Guard against building a `/namespaces/undefined/…` path: a namespaced Kind
|
|
178
|
+
* with no namespace would otherwise GET/DELETE a bogus URL — the API returns
|
|
179
|
+
* 404, which read treats as "absent" (phantom recreate) and delete tolerates as
|
|
180
|
+
* success (orphan). Fail loudly instead. (No-op for cluster-scoped Kinds.)
|
|
181
|
+
*/
|
|
182
|
+
const requireNamespace = (method, apiVersion, kind, info, namespace) => info.namespaced && !namespace
|
|
183
|
+
? Effect.fail(new KubernetesApiError({
|
|
184
|
+
method,
|
|
185
|
+
path: "",
|
|
186
|
+
statusCode: 0,
|
|
187
|
+
body: `${apiVersion}/${kind} is namespaced — a namespace is required`,
|
|
188
|
+
}))
|
|
189
|
+
: Effect.void;
|
|
190
|
+
/**
|
|
191
|
+
* Server-side apply an arbitrary object (idempotent create-or-converge).
|
|
192
|
+
* `force=true` makes alchemy the field manager even where another manager
|
|
193
|
+
* currently owns a field we declare. Only the fields present in `object` are
|
|
194
|
+
* managed; fields owned by other managers are left untouched, and dropping a
|
|
195
|
+
* previously-declared field prunes it.
|
|
196
|
+
*/
|
|
197
|
+
export const applyObject = (connection, object, fieldManager = "alchemy") => {
|
|
198
|
+
const apiVersion = object.apiVersion;
|
|
199
|
+
const kind = object.kind;
|
|
200
|
+
const name = object.metadata?.name;
|
|
201
|
+
const namespace = object.metadata?.namespace;
|
|
202
|
+
if (!apiVersion || !kind || !name) {
|
|
203
|
+
return Effect.fail(new KubernetesApiError({
|
|
204
|
+
method: "PATCH",
|
|
205
|
+
path: "",
|
|
206
|
+
statusCode: 0,
|
|
207
|
+
body: "object must have apiVersion, kind and metadata.name",
|
|
208
|
+
}));
|
|
209
|
+
}
|
|
210
|
+
return resolveResource(connection, apiVersion, kind).pipe(Effect.flatMap((info) => requireNamespace("PATCH", apiVersion, kind, info, namespace).pipe(Effect.flatMap(() => {
|
|
211
|
+
const path = `${objectPath(apiVersion, info, namespace, name)}?fieldManager=${fieldManager}&force=true`;
|
|
212
|
+
return requestJson({
|
|
213
|
+
connection,
|
|
214
|
+
method: "PATCH",
|
|
215
|
+
path,
|
|
216
|
+
contentType: "application/apply-patch+yaml",
|
|
217
|
+
body: object,
|
|
218
|
+
});
|
|
219
|
+
}))));
|
|
220
|
+
};
|
|
221
|
+
/** GET an object; the caller maps `KubernetesApiError(404)` to "missing". */
|
|
222
|
+
export const getObject = (connection, apiVersion, kind, namespace, name) => resolveResource(connection, apiVersion, kind).pipe(Effect.flatMap((info) => requireNamespace("GET", apiVersion, kind, info, namespace).pipe(Effect.flatMap(() => requestJson({
|
|
119
223
|
connection,
|
|
120
|
-
method: "
|
|
121
|
-
path:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
/** DELETE a Secret; 404 is tolerated as success (idempotent teardown). */
|
|
126
|
-
export const deleteSecret = (connection, namespace, name) => requestJson({
|
|
224
|
+
method: "GET",
|
|
225
|
+
path: objectPath(apiVersion, info, namespace, name),
|
|
226
|
+
})))));
|
|
227
|
+
/** DELETE an object; 404 is tolerated as success (idempotent teardown). */
|
|
228
|
+
export const deleteObject = (connection, apiVersion, kind, namespace, name) => resolveResource(connection, apiVersion, kind).pipe(Effect.flatMap((info) => requireNamespace("DELETE", apiVersion, kind, info, namespace).pipe(Effect.flatMap(() => requestJson({
|
|
127
229
|
connection,
|
|
128
230
|
method: "DELETE",
|
|
129
|
-
path:
|
|
130
|
-
})
|
|
231
|
+
path: objectPath(apiVersion, info, namespace, name),
|
|
232
|
+
})))), Effect.catchIf((e) => e instanceof KubernetesApiError && e.statusCode === 404, () => Effect.void));
|
|
131
233
|
//# sourceMappingURL=client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/Kubernetes/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AAEpC
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/Kubernetes/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAYlC,wEAAwE;AACxE,MAAM,OAAO,kBAAmB,SAAQ,IAAI,CAAC,WAAW,CACtD,oBAAoB,CAMpB;CAAG;AAEL,MAAM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,kBAAkB,IAAI,CAAC,CAAC,UAAU,KAAK,GAAG,EACzD,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAClB,CACF,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Credentials } from "@distilled.cloud/kubernetes/Credentials";
|
|
2
|
+
import * as Layer from "effect/Layer";
|
|
3
|
+
import type * as Redacted from "effect/Redacted";
|
|
4
|
+
import type * as HttpClient from "effect/unstable/http/HttpClient";
|
|
5
|
+
/**
|
|
6
|
+
* Bridges a GKE control plane into the layers that `@distilled.cloud/kubernetes`
|
|
7
|
+
* operations require — letting us drive the cluster's kube-apiserver through the
|
|
8
|
+
* typed distilled SDK (core/v1, apps/v1, batch, rbac, apiextensions/CRDs, …)
|
|
9
|
+
* instead of hand-rolling one HTTP resource per kind.
|
|
10
|
+
*
|
|
11
|
+
* distilled operations resolve two services from context:
|
|
12
|
+
*
|
|
13
|
+
* - `KubernetesCredentials` (`{ token, apiBaseUrl }`) — the bearer token (a
|
|
14
|
+
* Google OAuth access token minted from the provider's ADC `Credentials`) and
|
|
15
|
+
* the API base URL (`https://<cluster endpoint>`).
|
|
16
|
+
* - `HttpClient.HttpClient` — the transport. The GKE API server presents a cert
|
|
17
|
+
* signed by the cluster's *own* CA (not a public root), so a stock fetch fails
|
|
18
|
+
* TLS verification. We override {@link FetchHttpClient.Fetch} with a
|
|
19
|
+
* `node:https`-backed fetch that trusts the per-cluster CA — the same
|
|
20
|
+
* justified TLS exception the bespoke client made, but now routed through the
|
|
21
|
+
* typed SDK. (undici's `Agent`/`dispatcher` would be the fetch-native route,
|
|
22
|
+
* but undici isn't resolvable as a bare import here, and this reuses the
|
|
23
|
+
* transport we already trust.)
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* import { readCoreV1NamespacedSecret } from "@distilled.cloud/kubernetes/core";
|
|
28
|
+
*
|
|
29
|
+
* const secret = yield* readCoreV1NamespacedSecret({ namespace, name }).pipe(
|
|
30
|
+
* Effect.provide(clusterLayer({ endpoint, caCertificate, token })),
|
|
31
|
+
* );
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
/** A resolved connection to a single GKE control plane. */
|
|
35
|
+
export interface ClusterConnection {
|
|
36
|
+
/** Master endpoint — IP or hostname, no scheme (e.g. `34.1.2.3`). */
|
|
37
|
+
readonly endpoint: string;
|
|
38
|
+
/** Base64-encoded cluster CA certificate (PEM), as GKE returns it. */
|
|
39
|
+
readonly caCertificate: string;
|
|
40
|
+
/** Google OAuth access token (cloud-platform scope) for `Authorization`. */
|
|
41
|
+
readonly token: Redacted.Redacted<string>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The full requirements layer for any `@distilled.cloud/kubernetes` operation
|
|
45
|
+
* against one GKE cluster: credentials + a CA-trusting HTTP client.
|
|
46
|
+
*/
|
|
47
|
+
export declare const clusterLayer: (connection: ClusterConnection) => Layer.Layer<Credentials | HttpClient.HttpClient>;
|
|
48
|
+
//# sourceMappingURL=connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../src/Kubernetes/connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAEtE,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAEjD,OAAO,KAAK,KAAK,UAAU,MAAM,iCAAiC,CAAC;AAGnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,2DAA2D;AAC3D,MAAM,WAAW,iBAAiB;IAChC,qEAAqE;IACrE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,sEAAsE;IACtE,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC3C;AA2HD;;;GAGG;AACH,eAAO,MAAM,YAAY,GACvB,YAAY,iBAAiB,KAC5B,KAAK,CAAC,KAAK,CAAC,WAAW,GAAG,UAAU,CAAC,UAAU,CAI/C,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Credentials } from "@distilled.cloud/kubernetes/Credentials";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as Layer from "effect/Layer";
|
|
4
|
+
import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient";
|
|
5
|
+
import * as https from "node:https";
|
|
6
|
+
/** Bounds a hung socket — Effect interruption can't abort an in-flight request. */
|
|
7
|
+
const REQUEST_TIMEOUT_MS = 30_000;
|
|
8
|
+
/**
|
|
9
|
+
* A `globalThis.fetch`-shaped function that issues the request over `node:https`
|
|
10
|
+
* trusting an explicit CA PEM, then resolves a standard `Response`. Effect's
|
|
11
|
+
* {@link FetchHttpClient.layer} reads this via `fiber.getRef(Fetch)` and feeds
|
|
12
|
+
* it `(url, { method, headers, body, signal })` per request.
|
|
13
|
+
*/
|
|
14
|
+
const caFetch = (caPem) => ((input, init) => {
|
|
15
|
+
const href = typeof input === "string"
|
|
16
|
+
? input
|
|
17
|
+
: input instanceof URL
|
|
18
|
+
? input.href
|
|
19
|
+
: input.url;
|
|
20
|
+
const url = new URL(href);
|
|
21
|
+
const headers = {};
|
|
22
|
+
if (init?.headers) {
|
|
23
|
+
new Headers(init.headers).forEach((value, key) => {
|
|
24
|
+
headers[key] = value;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
const body = init?.body;
|
|
28
|
+
if (body != null &&
|
|
29
|
+
typeof body !== "string" &&
|
|
30
|
+
!(body instanceof Uint8Array)) {
|
|
31
|
+
// Our k8s calls only ever send JSON (Raw/Uint8Array) bodies. A streaming
|
|
32
|
+
// body would need different handling — fail loudly rather than silently
|
|
33
|
+
// dropping it.
|
|
34
|
+
return Promise.reject(new TypeError("caFetch: only string/Uint8Array request bodies are supported"));
|
|
35
|
+
}
|
|
36
|
+
return new Promise((resolve, reject) => {
|
|
37
|
+
const request = https.request({
|
|
38
|
+
protocol: url.protocol,
|
|
39
|
+
hostname: url.hostname,
|
|
40
|
+
port: url.port || 443,
|
|
41
|
+
path: `${url.pathname}${url.search}`,
|
|
42
|
+
method: init?.method ?? "GET",
|
|
43
|
+
headers,
|
|
44
|
+
ca: caPem,
|
|
45
|
+
timeout: REQUEST_TIMEOUT_MS,
|
|
46
|
+
}, (response) => {
|
|
47
|
+
const chunks = [];
|
|
48
|
+
response.on("data", (chunk) => chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)));
|
|
49
|
+
response.on("end", () => {
|
|
50
|
+
const buffer = Buffer.concat(chunks);
|
|
51
|
+
const responseHeaders = new Headers();
|
|
52
|
+
for (const [key, value] of Object.entries(response.headers)) {
|
|
53
|
+
if (Array.isArray(value)) {
|
|
54
|
+
for (const v of value)
|
|
55
|
+
responseHeaders.append(key, v);
|
|
56
|
+
}
|
|
57
|
+
else if (value != null) {
|
|
58
|
+
responseHeaders.set(key, value);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
resolve(new Response(buffer.length > 0 ? buffer : null, {
|
|
62
|
+
status: response.statusCode ?? 500,
|
|
63
|
+
statusText: response.statusMessage ?? "",
|
|
64
|
+
headers: responseHeaders,
|
|
65
|
+
}));
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
request.on("error", reject);
|
|
69
|
+
// `timeout` only fires the event — destroy the socket ourselves so the
|
|
70
|
+
// promise rejects instead of hanging.
|
|
71
|
+
request.on("timeout", () => request.destroy(new Error(`Kubernetes request timed out after ${REQUEST_TIMEOUT_MS}ms`)));
|
|
72
|
+
// Honour Effect's abort signal so interruption tears down the socket.
|
|
73
|
+
if (init?.signal) {
|
|
74
|
+
if (init.signal.aborted)
|
|
75
|
+
request.destroy(new Error("aborted"));
|
|
76
|
+
else
|
|
77
|
+
init.signal.addEventListener("abort", () => request.destroy(new Error("aborted")));
|
|
78
|
+
}
|
|
79
|
+
if (body != null)
|
|
80
|
+
request.write(body);
|
|
81
|
+
request.end();
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
/** `HttpClient` layer whose fetch trusts the given (base64 PEM) cluster CA. */
|
|
85
|
+
const caHttpClient = (caCertificate) => Layer.provide(FetchHttpClient.layer, Layer.succeed(FetchHttpClient.Fetch, caFetch(Buffer.from(caCertificate, "base64").toString("utf8"))));
|
|
86
|
+
/** `KubernetesCredentials` layer for a single cluster + bearer token. */
|
|
87
|
+
const credentials = (endpoint, token) => Layer.succeed(Credentials, Effect.succeed({ token, apiBaseUrl: `https://${endpoint}` }));
|
|
88
|
+
/**
|
|
89
|
+
* The full requirements layer for any `@distilled.cloud/kubernetes` operation
|
|
90
|
+
* against one GKE cluster: credentials + a CA-trusting HTTP client.
|
|
91
|
+
*/
|
|
92
|
+
export const clusterLayer = (connection) => Layer.merge(credentials(connection.endpoint, connection.token), caHttpClient(connection.caCertificate));
|
|
93
|
+
//# sourceMappingURL=connection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../src/Kubernetes/connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,eAAe,MAAM,sCAAsC,CAAC;AAExE,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AA0CpC,mFAAmF;AACnF,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC;;;;;GAKG;AACH,MAAM,OAAO,GAAG,CAAC,KAAa,EAA2B,EAAE,CACzD,CAAC,CAAC,KAAwB,EAAE,IAAkB,EAAqB,EAAE;IACnE,MAAM,IAAI,GACR,OAAO,KAAK,KAAK,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B,EACqB,EAAE,CACpD,KAAK,CAAC,KAAK,CACT,WAAW,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,EAClD,YAAY,CAAC,UAAU,CAAC,aAAa,CAAC,CACvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Kubernetes/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Kubernetes/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC"}
|
package/lib/Kubernetes/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Kubernetes/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Kubernetes/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC"}
|
package/lib/Providers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Providers.d.ts","sourceRoot":"","sources":["../src/Providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;;
|
|
1
|
+
{"version":3,"file":"Providers.d.ts","sourceRoot":"","sources":["../src/Providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;;AA+CtC,qBAAa,SAAU,SAAQ,cAA+C;CAAG;AAEjF,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC;AAEhF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,SAAS,8QA6DnB,CAAC"}
|
package/lib/Providers.js
CHANGED
|
@@ -14,6 +14,7 @@ import { SharedVpcServiceProject, SharedVpcServiceProjectProvider, } from "./Com
|
|
|
14
14
|
import { Subnetwork, SubnetworkProvider } from "./Compute/Subnetwork.js";
|
|
15
15
|
import { Cluster, ClusterProvider } from "./Container/Cluster.js";
|
|
16
16
|
import { NodePool, NodePoolProvider } from "./Container/NodePool.js";
|
|
17
|
+
import { KubernetesManifest, KubernetesManifestProvider, } from "./Kubernetes/KubernetesManifest.js";
|
|
17
18
|
import { KubernetesSecret, KubernetesSecretProvider, } from "./Kubernetes/Secret.js";
|
|
18
19
|
import { ManagedLustreInstance, ManagedLustreInstanceProvider, } from "./ManagedLustre/Instance.js";
|
|
19
20
|
import { Job, JobProvider } from "./Run/Job.js";
|
|
@@ -62,7 +63,8 @@ export const providers = () => Layer.effect(Providers, Provider.collection([
|
|
|
62
63
|
SqlUser,
|
|
63
64
|
ArtifactRegistryRepository,
|
|
64
65
|
KubernetesSecret,
|
|
65
|
-
|
|
66
|
+
KubernetesManifest,
|
|
67
|
+
])).pipe(Layer.provide(Layer.mergeAll(ProjectProvider(), ClusterProvider(), NodePoolProvider(), ApiEnableProvider(), NetworkProvider(), SubnetworkProvider(), FirewallProvider(), AddressProvider(), ForwardingRuleProvider(), GlobalAddressProvider(), SharedVpcHostProvider(), SharedVpcServiceProjectProvider(), PsaConnectionProvider(), ManagedLustreInstanceProvider(), ServiceProvider(), JobProvider(), SqlInstanceProvider(), SqlDatabaseProvider(), SqlUserProvider(), ArtifactRegistryRepositoryProvider(), KubernetesSecretProvider(), KubernetesManifestProvider())), Layer.provideMerge(fromAuthProvider()), Layer.provideMerge(GCPAuth),
|
|
66
68
|
// Auth/config failures (missing ADC, malformed profile) become
|
|
67
69
|
// unrecoverable defects rather than typed errors — mirrors
|
|
68
70
|
// `AWS/Providers.ts` and `Cloudflare/Providers.ts`. Resource lifecycle
|
package/lib/Providers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Providers.js","sourceRoot":"","sources":["../src/Providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,GACnC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EACL,cAAc,EACd,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,EACL,uBAAuB,EACvB,+BAA+B,GAChC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EACL,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,6BAA6B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AC,YAAY,CAAC,OAAO,CAAC;AAC3B,+DAA+D;AAC/D,2DAA2D;AAC3D,uEAAuE;AACvE,0DAA0D;AAC1D,KAAK,CAAC,KAAK,CACZ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microagi/alchemy-gcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "GCP provider for Alchemy v2 (Effect-based IaC). Resources for Project, Cluster, NodePool, Compute, ManagedLustre, ServiceUsage, ServiceNetworking, Cloud Run (Service + Job + IAM), Cloud SQL (Instance + Database + User with IAM database authn), Artifact Registry (Docker repositories, standard + remote pull-through caches), with ADC-backed credentials and target-side IAM bindings.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"alchemy",
|
|
@@ -54,11 +54,13 @@
|
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@distilled.cloud/gcp": ">=0.16.9",
|
|
57
|
+
"@distilled.cloud/kubernetes": ">=0.24.9",
|
|
57
58
|
"alchemy": ">=2.0.0-beta.30",
|
|
58
59
|
"effect": ">=4.0.0-beta.60 || >=4.0.0"
|
|
59
60
|
},
|
|
60
61
|
"devDependencies": {
|
|
61
62
|
"@distilled.cloud/gcp": "workspace:*",
|
|
63
|
+
"@distilled.cloud/kubernetes": "workspace:*",
|
|
62
64
|
"@types/bun": "latest",
|
|
63
65
|
"@types/node": "latest",
|
|
64
66
|
"alchemy": "workspace:*",
|