@alchemy.run/kubernetes 0.0.0 → 2.0.0-beta.84
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/LICENSE +201 -0
- package/README.md +41 -4
- package/lib/BuiltinAdapters.d.ts +23 -0
- package/lib/BuiltinAdapters.d.ts.map +1 -0
- package/lib/BuiltinAdapters.js +124 -0
- package/lib/BuiltinAdapters.js.map +1 -0
- package/lib/Client.d.ts +80 -0
- package/lib/Client.d.ts.map +1 -0
- package/lib/Client.js +296 -0
- package/lib/Client.js.map +1 -0
- package/lib/ClusterAdapter.d.ts +322 -0
- package/lib/ClusterAdapter.d.ts.map +1 -0
- package/lib/ClusterAdapter.js +65 -0
- package/lib/ClusterAdapter.js.map +1 -0
- package/lib/Connection.d.ts +210 -0
- package/lib/Connection.d.ts.map +1 -0
- package/lib/Connection.js +58 -0
- package/lib/Connection.js.map +1 -0
- package/lib/Deployment.d.ts +382 -0
- package/lib/Deployment.d.ts.map +1 -0
- package/lib/Deployment.js +533 -0
- package/lib/Deployment.js.map +1 -0
- package/lib/HelmChart.d.ts +147 -0
- package/lib/HelmChart.d.ts.map +1 -0
- package/lib/HelmChart.js +248 -0
- package/lib/HelmChart.js.map +1 -0
- package/lib/Job.d.ts +314 -0
- package/lib/Job.d.ts.map +1 -0
- package/lib/Job.js +426 -0
- package/lib/Job.js.map +1 -0
- package/lib/LocalCluster.d.ts +243 -0
- package/lib/LocalCluster.d.ts.map +1 -0
- package/lib/LocalCluster.js +359 -0
- package/lib/LocalCluster.js.map +1 -0
- package/lib/Manifest.d.ts +148 -0
- package/lib/Manifest.d.ts.map +1 -0
- package/lib/Manifest.js +200 -0
- package/lib/Manifest.js.map +1 -0
- package/lib/Objects.d.ts +60 -0
- package/lib/Objects.d.ts.map +1 -0
- package/lib/Objects.js +132 -0
- package/lib/Objects.js.map +1 -0
- package/lib/Providers.d.ts +24 -0
- package/lib/Providers.d.ts.map +1 -0
- package/lib/Providers.js +36 -0
- package/lib/Providers.js.map +1 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +10 -0
- package/lib/index.js.map +1 -0
- package/lib/internal/declared.d.ts +19 -0
- package/lib/internal/declared.d.ts.map +1 -0
- package/lib/internal/declared.js +435 -0
- package/lib/internal/declared.js.map +1 -0
- package/lib/internal/helm.d.ts +65 -0
- package/lib/internal/helm.d.ts.map +1 -0
- package/lib/internal/helm.js +173 -0
- package/lib/internal/helm.js.map +1 -0
- package/lib/internal/kind.d.ts +17 -0
- package/lib/internal/kind.d.ts.map +1 -0
- package/lib/internal/kind.js +31 -0
- package/lib/internal/kind.js.map +1 -0
- package/lib/internal/kubeconfig.d.ts +79 -0
- package/lib/internal/kubeconfig.d.ts.map +1 -0
- package/lib/internal/kubeconfig.js +222 -0
- package/lib/internal/kubeconfig.js.map +1 -0
- package/lib/internal/registry.d.ts +44 -0
- package/lib/internal/registry.d.ts.map +1 -0
- package/lib/internal/registry.js +72 -0
- package/lib/internal/registry.js.map +1 -0
- package/lib/internal/workload.d.ts +127 -0
- package/lib/internal/workload.d.ts.map +1 -0
- package/lib/internal/workload.js +411 -0
- package/lib/internal/workload.js.map +1 -0
- package/package.json +55 -3
- package/src/BuiltinAdapters.ts +194 -0
- package/src/Client.ts +465 -0
- package/src/ClusterAdapter.ts +370 -0
- package/src/Connection.ts +234 -0
- package/src/Deployment.ts +851 -0
- package/src/HelmChart.ts +388 -0
- package/src/Job.ts +689 -0
- package/src/LocalCluster.ts +631 -0
- package/src/Manifest.ts +295 -0
- package/src/Objects.ts +213 -0
- package/src/Providers.ts +52 -0
- package/src/globals.d.ts +2 -0
- package/src/index.ts +9 -0
- package/src/internal/declared.ts +471 -0
- package/src/internal/helm.ts +245 -0
- package/src/internal/kind.ts +43 -0
- package/src/internal/kubeconfig.ts +364 -0
- package/src/internal/registry.ts +108 -0
- package/src/internal/workload.ts +503 -0
package/lib/Client.js
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import * as https from "node:https";
|
|
2
|
+
import { isPlainObject, unwrapRedacted } from "alchemy/Util/data";
|
|
3
|
+
import { collectRedactedSecrets, redactJson } from "alchemy/Util/Redaction";
|
|
4
|
+
/**
|
|
5
|
+
* Internal Kubernetes API client: transport-agnostic server-side apply and
|
|
6
|
+
* kind discovery for arbitrary (CRD) manifests. Powers
|
|
7
|
+
* `Kubernetes.Manifest`, `Kubernetes.Deployment`, `Kubernetes.Job`,
|
|
8
|
+
* `Kubernetes.HelmChart`, and the `AWS.EKS.Cluster` kubernetes-object
|
|
9
|
+
* binding channel. Not exported from the Kubernetes index.
|
|
10
|
+
*
|
|
11
|
+
* Authentication is delegated to the connection's {@link ClusterAdapter}:
|
|
12
|
+
* every request mints headers through the resolved
|
|
13
|
+
* {@link ClusterTransport}, so short-lived tokens (EKS SigV4 presigns,
|
|
14
|
+
* exec-plugin credentials) stay fresh.
|
|
15
|
+
*/
|
|
16
|
+
import * as Data from "effect/Data";
|
|
17
|
+
import * as Effect from "effect/Effect";
|
|
18
|
+
import * as Schedule from "effect/Schedule";
|
|
19
|
+
import { ClusterNotFoundError, findClusterAdapter, } from "./ClusterAdapter.js";
|
|
20
|
+
import { driftMask, hashDriftSelection } from "./internal/declared.js";
|
|
21
|
+
import { buildKubernetesObjectPathWithSpec, chunkByApplyRank, DEFAULT_APPLY_RANK, kubernetesObjectKey, lookupKubernetesKindSpec, sortRefsForDelete, toKubernetesObjectRef, } from "./Objects.js";
|
|
22
|
+
export class KubernetesApiError extends Data.TaggedError("KubernetesApiError") {
|
|
23
|
+
get message() {
|
|
24
|
+
return `${this.method} ${this.path} responded ${this.statusCode}: ${this.body.length > 0 ? this.body.slice(0, 1000) : "(empty body)"}`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const fieldManager = "alchemy";
|
|
28
|
+
/** Deadline for auth-header minting and for each HTTP attempt. */
|
|
29
|
+
const requestTimeout = "10 seconds";
|
|
30
|
+
/**
|
|
31
|
+
* Resolve the {@link ClusterTransport} for a connection through its
|
|
32
|
+
* registered adapter.
|
|
33
|
+
*/
|
|
34
|
+
export const connectCluster = (connection) => findClusterAdapter(connection.auth.kind).pipe(Effect.flatMap((adapter) => adapter.connect(connection)));
|
|
35
|
+
/** 404 from the apiserver, including a removed CRD's discovery 404. */
|
|
36
|
+
export class KubernetesNotFound extends Data.TaggedError("KubernetesNotFound") {
|
|
37
|
+
get message() {
|
|
38
|
+
return `${this.method} ${this.path} responded 404: ${this.body.length > 0 ? this.body.slice(0, 1000) : "(empty body)"}`;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The effect's result when the cluster exists. `ClusterNotFoundError`
|
|
43
|
+
* becomes `undefined`; auth and HTTP failures stay failures.
|
|
44
|
+
*/
|
|
45
|
+
export const ifClusterExists = (effect) => effect.pipe(Effect.catchTag("Kubernetes.ClusterNotFoundError", () => Effect.succeed(undefined)));
|
|
46
|
+
const requestJson = Effect.fn(function* ({ transport, method, path, body, redactions = [], }) {
|
|
47
|
+
// Outside the attempt retry: a hung token mint must not be retried as
|
|
48
|
+
// if it were a refused connection.
|
|
49
|
+
const headers = yield* transport.headers.pipe(Effect.timeout(requestTimeout));
|
|
50
|
+
const url = new URL(path, transport.endpoint);
|
|
51
|
+
// JSON.stringify(Redacted) emits the display placeholder. Unwrap only at
|
|
52
|
+
// the wire so plans and state keep the wrapper.
|
|
53
|
+
const prepared = yield* Effect.sync(() => {
|
|
54
|
+
const payload = body === undefined ? undefined : JSON.stringify(unwrapRedacted(body));
|
|
55
|
+
return {
|
|
56
|
+
payload,
|
|
57
|
+
contentLength: payload === undefined ? undefined : Buffer.byteLength(payload),
|
|
58
|
+
ca: transport.certificateAuthorityData === undefined
|
|
59
|
+
? undefined
|
|
60
|
+
: Buffer.from(transport.certificateAuthorityData, "base64").toString("utf8"),
|
|
61
|
+
secrets: [...(body === undefined ? [] : collectRedactedSecrets(body)), ...redactions],
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
const response = yield* Effect.callback((resume, signal) => {
|
|
65
|
+
const request = https.request({
|
|
66
|
+
signal,
|
|
67
|
+
protocol: url.protocol,
|
|
68
|
+
hostname: url.hostname,
|
|
69
|
+
port: url.port || 443,
|
|
70
|
+
path: `${url.pathname}${url.search}`,
|
|
71
|
+
method,
|
|
72
|
+
headers: {
|
|
73
|
+
...headers,
|
|
74
|
+
Accept: "application/json",
|
|
75
|
+
...(prepared.payload === undefined
|
|
76
|
+
? {}
|
|
77
|
+
: {
|
|
78
|
+
"Content-Type": "application/apply-patch+yaml",
|
|
79
|
+
"Content-Length": prepared.contentLength,
|
|
80
|
+
}),
|
|
81
|
+
},
|
|
82
|
+
...(prepared.ca === undefined ? {} : { ca: prepared.ca }),
|
|
83
|
+
...(transport.clientCert
|
|
84
|
+
? {
|
|
85
|
+
cert: transport.clientCert.certificate,
|
|
86
|
+
key: transport.clientCert.key,
|
|
87
|
+
}
|
|
88
|
+
: {}),
|
|
89
|
+
...(transport.insecureSkipTlsVerify ? { rejectUnauthorized: false } : {}),
|
|
90
|
+
}, (incoming) => {
|
|
91
|
+
const chunks = [];
|
|
92
|
+
incoming.on("data", (chunk) => {
|
|
93
|
+
chunks.push(chunk);
|
|
94
|
+
});
|
|
95
|
+
incoming.on("error", (error) => {
|
|
96
|
+
resume(Effect.fail(error));
|
|
97
|
+
});
|
|
98
|
+
incoming.on("aborted", () => {
|
|
99
|
+
resume(Effect.fail(new Error(`Kubernetes ${method} ${path} response aborted`)));
|
|
100
|
+
});
|
|
101
|
+
incoming.on("end", () => {
|
|
102
|
+
if (incoming.complete === false) {
|
|
103
|
+
resume(Effect.fail(new Error(`Kubernetes ${method} ${path} response ended before completion`)));
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const statusCode = incoming.statusCode ?? 500;
|
|
107
|
+
resume(Effect.sync(() => ({
|
|
108
|
+
statusCode,
|
|
109
|
+
body: Buffer.concat(chunks).toString("utf8"),
|
|
110
|
+
})));
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
request.on("error", (error) => {
|
|
114
|
+
resume(Effect.fail(error instanceof Error ? error : new Error(String(error))));
|
|
115
|
+
});
|
|
116
|
+
if (prepared.payload !== undefined)
|
|
117
|
+
request.write(prepared.payload);
|
|
118
|
+
request.end();
|
|
119
|
+
// Bun's TLS client ignores AbortSignal. Destroying the socket releases it.
|
|
120
|
+
// Effect.callback already drops a second resume, and this finalizer runs
|
|
121
|
+
// on the same interrupt that aborts `signal`.
|
|
122
|
+
return Effect.sync(() => {
|
|
123
|
+
request.destroy();
|
|
124
|
+
request.socket?.destroy();
|
|
125
|
+
});
|
|
126
|
+
}).pipe(Effect.timeout(requestTimeout), Effect.mapError((error) => new Error(`Failed Kubernetes ${method} ${path}: ${error instanceof Error ? error.message : String(error)}`)),
|
|
127
|
+
// Transport-level failures (ECONNREFUSED/ECONNRESET/ETIMEDOUT/DNS,
|
|
128
|
+
// the per-attempt deadline) are transient — a fresh managed endpoint's
|
|
129
|
+
// load balancer can refuse connections for a short window after the
|
|
130
|
+
// cluster reports ready. Every request here is idempotent (GET / SSA
|
|
131
|
+
// PATCH / DELETE), so retry them. HTTP status errors are classified
|
|
132
|
+
// below and are not retried here.
|
|
133
|
+
Effect.retry({
|
|
134
|
+
schedule: Schedule.max([Schedule.spaced("5 seconds"), Schedule.recurs(8)]),
|
|
135
|
+
}));
|
|
136
|
+
if (response.statusCode < 200 || response.statusCode >= 300) {
|
|
137
|
+
// Error bodies can echo the request. Scrub only failures —
|
|
138
|
+
// a successful dry-run is the object we compare for drift.
|
|
139
|
+
const responseBody = yield* Effect.sync(() => redactJson(response.body, prepared.secrets));
|
|
140
|
+
if (response.statusCode === 404) {
|
|
141
|
+
return yield* new KubernetesNotFound({ method, path, body: responseBody });
|
|
142
|
+
}
|
|
143
|
+
return yield* new KubernetesApiError({
|
|
144
|
+
method,
|
|
145
|
+
path,
|
|
146
|
+
statusCode: response.statusCode,
|
|
147
|
+
body: responseBody,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
if (!response.body.trim())
|
|
151
|
+
return undefined;
|
|
152
|
+
return yield* Effect.sync(() => {
|
|
153
|
+
try {
|
|
154
|
+
return JSON.parse(response.body);
|
|
155
|
+
}
|
|
156
|
+
catch {
|
|
157
|
+
return response.body;
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
// One resolution per (endpoint, apiVersion, kind) per process. Plain cached
|
|
162
|
+
// values (no finalizers), so module scope is safe.
|
|
163
|
+
const discoveredKinds = new Map();
|
|
164
|
+
/**
|
|
165
|
+
* Resolve the REST mapping (plural + scope) for an arbitrary kind: static
|
|
166
|
+
* table fast path, then the Kubernetes discovery API (`/apis/{g}/{v}` or
|
|
167
|
+
* `/api/v1`). This is what lets `Kubernetes.Manifest` apply any CRD.
|
|
168
|
+
*/
|
|
169
|
+
export const resolveKindSpec = Effect.fn(function* ({ transport, input, }) {
|
|
170
|
+
const staticSpec = lookupKubernetesKindSpec(input);
|
|
171
|
+
if (staticSpec)
|
|
172
|
+
return staticSpec;
|
|
173
|
+
const cacheKey = `${transport.endpoint}|${input.apiVersion}|${input.kind}`;
|
|
174
|
+
const cached = discoveredKinds.get(cacheKey);
|
|
175
|
+
if (cached)
|
|
176
|
+
return cached;
|
|
177
|
+
const discoveryPath = input.apiVersion.includes("/")
|
|
178
|
+
? `/apis/${input.apiVersion}`
|
|
179
|
+
: `/api/${input.apiVersion}`;
|
|
180
|
+
const listed = (yield* requestJson({
|
|
181
|
+
transport,
|
|
182
|
+
method: "GET",
|
|
183
|
+
path: discoveryPath,
|
|
184
|
+
}));
|
|
185
|
+
const resource = listed.resources?.find((candidate) => candidate.kind === input.kind &&
|
|
186
|
+
typeof candidate.name === "string" &&
|
|
187
|
+
!candidate.name.includes("/"));
|
|
188
|
+
if (!resource?.name) {
|
|
189
|
+
return yield* new KubernetesNotFound({
|
|
190
|
+
method: "GET",
|
|
191
|
+
path: discoveryPath,
|
|
192
|
+
body: `Kind '${input.kind}' not found in API group '${input.apiVersion}'`,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
const spec = {
|
|
196
|
+
plural: resource.name,
|
|
197
|
+
scope: resource.namespaced ? "Namespaced" : "Cluster",
|
|
198
|
+
applyRank: DEFAULT_APPLY_RANK,
|
|
199
|
+
};
|
|
200
|
+
discoveredKinds.set(cacheKey, spec);
|
|
201
|
+
return spec;
|
|
202
|
+
});
|
|
203
|
+
const buildPath = Effect.fn(function* ({ transport, object, }) {
|
|
204
|
+
const spec = yield* resolveKindSpec({ transport, input: object });
|
|
205
|
+
return yield* Effect.try({
|
|
206
|
+
try: () => buildKubernetesObjectPathWithSpec(object, spec),
|
|
207
|
+
catch: (error) => (error instanceof Error ? error : new Error(String(error))),
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
// ─────────────────────────────────────────────────────────── object ops ──
|
|
211
|
+
export const readObject = Effect.fn(function* ({ transport, object, }) {
|
|
212
|
+
return yield* requestJson({
|
|
213
|
+
transport,
|
|
214
|
+
method: "GET",
|
|
215
|
+
path: yield* buildPath({ transport, object }),
|
|
216
|
+
}).pipe(
|
|
217
|
+
// Drift reads a whole Helm release at once. A 429 is the apiserver
|
|
218
|
+
// asking for a pause, not a failed object.
|
|
219
|
+
Effect.retry({
|
|
220
|
+
while: (error) => error instanceof KubernetesApiError && error.statusCode === 429,
|
|
221
|
+
schedule: Schedule.max([Schedule.spaced("1 second"), Schedule.recurs(4)]),
|
|
222
|
+
}));
|
|
223
|
+
});
|
|
224
|
+
export const applyObject = Effect.fn(function* ({ transport, object, redactions, }) {
|
|
225
|
+
const basePath = yield* buildPath({
|
|
226
|
+
transport,
|
|
227
|
+
object: toKubernetesObjectRef(object),
|
|
228
|
+
});
|
|
229
|
+
const path = `${basePath}?fieldManager=${fieldManager}&force=true`;
|
|
230
|
+
// A freshly provisioned cluster's API server briefly 5xxes while warming
|
|
231
|
+
// up, and the creator's bootstrap access can propagate asynchronously
|
|
232
|
+
// (401/403 in the first minute).
|
|
233
|
+
return yield* requestJson({
|
|
234
|
+
transport,
|
|
235
|
+
method: "PATCH",
|
|
236
|
+
path,
|
|
237
|
+
body: object,
|
|
238
|
+
redactions,
|
|
239
|
+
}).pipe(Effect.retry({
|
|
240
|
+
while: (e) => e instanceof KubernetesApiError &&
|
|
241
|
+
(e.statusCode >= 500 ||
|
|
242
|
+
e.statusCode === 429 ||
|
|
243
|
+
e.statusCode === 401 ||
|
|
244
|
+
e.statusCode === 403),
|
|
245
|
+
schedule: Schedule.max([Schedule.spaced("6 seconds"), Schedule.recurs(10)]),
|
|
246
|
+
}));
|
|
247
|
+
});
|
|
248
|
+
export const deleteObject = Effect.fn(function* ({ transport, object, }) {
|
|
249
|
+
yield* buildPath({ transport, object }).pipe(Effect.flatMap((path) => requestJson({
|
|
250
|
+
transport,
|
|
251
|
+
method: "DELETE",
|
|
252
|
+
// batch/v1 Jobs orphan their pods on DELETE unless a propagation
|
|
253
|
+
// policy is set; Background matches kubectl's default.
|
|
254
|
+
path: `${path}?propagationPolicy=Background`,
|
|
255
|
+
})), Effect.catchTag("KubernetesNotFound", () => Effect.void));
|
|
256
|
+
});
|
|
257
|
+
export const reconcileObjects = Effect.fn(function* ({ transport, previousObjects, desiredObjects, redactions, }) {
|
|
258
|
+
const desiredRefs = desiredObjects.map(toKubernetesObjectRef);
|
|
259
|
+
const desiredKeys = new Set(desiredRefs.map(kubernetesObjectKey));
|
|
260
|
+
const removedObjects = previousObjects.filter((object) => !desiredKeys.has(kubernetesObjectKey(object)));
|
|
261
|
+
for (const object of sortRefsForDelete(removedObjects)) {
|
|
262
|
+
yield* deleteObject({
|
|
263
|
+
transport,
|
|
264
|
+
object,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
const baselines = new Map();
|
|
268
|
+
for (const chunk of chunkByApplyRank(desiredObjects)) {
|
|
269
|
+
yield* Effect.forEach(chunk, (object) => Effect.gen(function* () {
|
|
270
|
+
const applied = yield* applyObject({
|
|
271
|
+
transport,
|
|
272
|
+
object,
|
|
273
|
+
redactions,
|
|
274
|
+
});
|
|
275
|
+
const ref = toKubernetesObjectRef(object);
|
|
276
|
+
const witnessed = isPlainObject(applied) ? applied : undefined;
|
|
277
|
+
baselines.set(kubernetesObjectKey(ref), {
|
|
278
|
+
driftMask: driftMask(object, witnessed),
|
|
279
|
+
baselineHash: yield* hashDriftSelection(object, witnessed ?? object),
|
|
280
|
+
});
|
|
281
|
+
}), { concurrency: "unbounded" });
|
|
282
|
+
}
|
|
283
|
+
return desiredRefs.map((ref) => ({
|
|
284
|
+
...ref,
|
|
285
|
+
...baselines.get(kubernetesObjectKey(ref)),
|
|
286
|
+
}));
|
|
287
|
+
});
|
|
288
|
+
export const deleteObjects = Effect.fn(function* ({ transport, objects, }) {
|
|
289
|
+
for (const object of sortRefsForDelete(objects)) {
|
|
290
|
+
yield* deleteObject({
|
|
291
|
+
transport,
|
|
292
|
+
object,
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
//# sourceMappingURL=Client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../src/Client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC5E;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GAEnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC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CAAC,CAAC,SAAS,CAAC;YAC/D,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE;gBACtC,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC;gBACvC,YAAY,EAAE,KAAK,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE,SAAS,IAAI,MAAM,CAAC;aACrE,CAAC,CAAC;QACL,CAAC,CAAC,EACJ,EAAE,WAAW,EAAE,WAAW,EAAE,CAC7B,CAAC;IACJ,CAAC;IAED,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC/B,GAAG,GAAG;QACN,GAAG,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;KAC3C,CAAC,CAAC,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,EAChD,SAAS,EACT,OAAO,GAIR;IACC,KAAK,MAAM,MAAM,IAAI,iBAAiB,CAAC,OAAO,CAAC,EAAE,CAAC;QAChD,KAAK,CAAC,CAAC,YAAY,CAAC;YAClB,SAAS;YACT,MAAM;SACP,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import type { InlineDockerfile } from "@alchemy.run/docker/Dockerfile";
|
|
2
|
+
import type * as Bundle from "alchemy/Bundle/Bundle";
|
|
3
|
+
import type { ResourceBinding } from "alchemy/Resource";
|
|
4
|
+
import type { ResourceContext } from "alchemy/ResourceContext";
|
|
5
|
+
import type { Stack } from "alchemy/Stack";
|
|
6
|
+
import type { Stage } from "alchemy/Stage";
|
|
7
|
+
/**
|
|
8
|
+
* The extension seam between the cluster-agnostic `Kubernetes.*` workloads
|
|
9
|
+
* and the platform a cluster runs on.
|
|
10
|
+
*
|
|
11
|
+
* A {@link ClusterAdapterService} is registered under a keyed Context tag —
|
|
12
|
+
* `Kubernetes.ClusterAdapter/<auth kind>` — and resolved dynamically from
|
|
13
|
+
* the ambient provider context by {@link findClusterAdapter}, mirroring how
|
|
14
|
+
* resource providers are resolved by type. `Kubernetes.providers()` ships
|
|
15
|
+
* the built-in adapters (`kubeconfig`, `token`, `client-cert`, `exec`);
|
|
16
|
+
* cloud provider layers contribute theirs (`AWS.providers()` registers
|
|
17
|
+
* `aws-eks`).
|
|
18
|
+
*
|
|
19
|
+
* An adapter owns everything platform-specific:
|
|
20
|
+
*
|
|
21
|
+
* - **connect** (required) — resolve the API server endpoint/CA and mint
|
|
22
|
+
* per-request auth headers.
|
|
23
|
+
* - **identity** (optional) — provision workload identity for a namespace +
|
|
24
|
+
* service account and translate host bindings into cloud credentials
|
|
25
|
+
* (EKS Pod Identity, GKE Workload Identity Federation).
|
|
26
|
+
* - **registry** (optional) — build/mirror container images into a managed
|
|
27
|
+
* registry the cluster can pull from (ECR on EKS, Artifact Registry on GKE).
|
|
28
|
+
* - **bootstrap** (optional) — platform-specific generated container
|
|
29
|
+
* entries for Effect-native workloads (e.g. wiring the AWS credential
|
|
30
|
+
* chain for Pod Identity).
|
|
31
|
+
* - **loadBalancerDefaults** (optional) — platform defaults for
|
|
32
|
+
* `LoadBalancer` Services (EKS Auto Mode's `loadBalancerClass` +
|
|
33
|
+
* internet-facing scheme).
|
|
34
|
+
*/
|
|
35
|
+
import * as Context from "effect/Context";
|
|
36
|
+
import * as Effect from "effect/Effect";
|
|
37
|
+
import type { Connection } from "./Connection.ts";
|
|
38
|
+
/**
|
|
39
|
+
* Per-resource engine services ambient inside every provider lifecycle
|
|
40
|
+
* operation. Adapter methods run inside the workload providers' lifecycle
|
|
41
|
+
* ops, so they may require these (physical-name generation needs the
|
|
42
|
+
* resource's ResourceContext + Stack + Stage) — everything else an adapter
|
|
43
|
+
* needs is captured at its layer build.
|
|
44
|
+
*/
|
|
45
|
+
export type AdapterLifecycleServices = ResourceContext | Stack | Stage;
|
|
46
|
+
declare const ClusterNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
47
|
+
readonly _tag: "Kubernetes.ClusterNotFoundError";
|
|
48
|
+
} & Readonly<A>;
|
|
49
|
+
/**
|
|
50
|
+
* The target cluster no longer exists (definitively — e.g. the managed
|
|
51
|
+
* control plane is deleted or deleting). Distinct from transient
|
|
52
|
+
* unreachability: `read`/`delete` treat this as "everything in-cluster is
|
|
53
|
+
* already gone".
|
|
54
|
+
*/
|
|
55
|
+
export declare class ClusterNotFoundError extends ClusterNotFoundError_base<{
|
|
56
|
+
message: string;
|
|
57
|
+
}> {
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* A resolved transport to a cluster's API server. `headers` is an Effect
|
|
61
|
+
* so short-lived tokens (EKS SigV4 presigns, exec plugin credentials) are
|
|
62
|
+
* minted per request.
|
|
63
|
+
*/
|
|
64
|
+
export interface ClusterTransport {
|
|
65
|
+
/** The API server endpoint URL. */
|
|
66
|
+
endpoint: string;
|
|
67
|
+
/** Base64-encoded PEM certificate authority bundle. */
|
|
68
|
+
certificateAuthorityData?: string;
|
|
69
|
+
/** Skip TLS verification (self-signed local clusters). */
|
|
70
|
+
insecureSkipTlsVerify?: boolean;
|
|
71
|
+
/** Mint the auth headers for one request. */
|
|
72
|
+
headers: Effect.Effect<Record<string, string>, Error>;
|
|
73
|
+
/** PEM client certificate credentials for mutual TLS. */
|
|
74
|
+
clientCert?: {
|
|
75
|
+
certificate: string;
|
|
76
|
+
key: string;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Workload identity state persisted on a workload's attributes, keyed by
|
|
81
|
+
* adapter kind. Cloud providers extend it via module augmentation — AWS
|
|
82
|
+
* registers:
|
|
83
|
+
*
|
|
84
|
+
* ```ts
|
|
85
|
+
* declare module "@alchemy.run/kubernetes/ClusterAdapter" {
|
|
86
|
+
* interface IdentityStateRegistry {
|
|
87
|
+
* "aws-pod-identity": {
|
|
88
|
+
* roleArn: string;
|
|
89
|
+
* roleName: string;
|
|
90
|
+
* associationArn: string;
|
|
91
|
+
* associationId: string;
|
|
92
|
+
* };
|
|
93
|
+
* }
|
|
94
|
+
* }
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
export interface IdentityStateRegistry {
|
|
98
|
+
}
|
|
99
|
+
/** The discriminated identity-state union across all registered adapters. */
|
|
100
|
+
export type IdentityState = {
|
|
101
|
+
[K in keyof IdentityStateRegistry]: {
|
|
102
|
+
readonly kind: K;
|
|
103
|
+
} & IdentityStateRegistry[K];
|
|
104
|
+
}[keyof IdentityStateRegistry];
|
|
105
|
+
/**
|
|
106
|
+
* Image-registry state persisted on a workload's attributes, keyed by
|
|
107
|
+
* adapter kind (AWS registers `"aws-ecr"` with the repository name/URI).
|
|
108
|
+
* The built-in `"registry"` entry records images pushed to a connection's
|
|
109
|
+
* {@link Connection.registry}.
|
|
110
|
+
*/
|
|
111
|
+
export interface RegistryStateRegistry {
|
|
112
|
+
registry: {
|
|
113
|
+
/** The registry `server` the image was pushed to. */
|
|
114
|
+
server: string;
|
|
115
|
+
/** The repository the image was pushed to (`<server>/<name>`). */
|
|
116
|
+
repository: string;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
/** The discriminated registry-state union across all registered adapters. */
|
|
120
|
+
export type RegistryState = {
|
|
121
|
+
[K in keyof RegistryStateRegistry]: {
|
|
122
|
+
readonly kind: K;
|
|
123
|
+
} & RegistryStateRegistry[K];
|
|
124
|
+
}[keyof RegistryStateRegistry];
|
|
125
|
+
/**
|
|
126
|
+
* Cloud-specific workload identity options, extended via module
|
|
127
|
+
* augmentation (AWS adds `managedPolicyArns`, GCP `gcpServiceAccount`).
|
|
128
|
+
*/
|
|
129
|
+
export interface WorkloadIdentityOptions {
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The binding contract of `Kubernetes.Deployment` / `Kubernetes.Job`
|
|
133
|
+
* hosts. The core contract is environment variables; cloud providers
|
|
134
|
+
* augment it with their credential-grant channels (AWS adds
|
|
135
|
+
* `policyStatements`, GCP adds `iam`), which the matching {@link ClusterAdapterService}'s
|
|
136
|
+
* identity adapter materializes at deploy time.
|
|
137
|
+
*/
|
|
138
|
+
export interface WorkloadBindingContract {
|
|
139
|
+
env?: Record<string, any>;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Ambient runtime services the workload platforms assume inside the
|
|
143
|
+
* deployed container, keyed by contributor and extended via module
|
|
144
|
+
* augmentation — AWS registers its credential-chain services so inline
|
|
145
|
+
* impls can use AWS bindings without providing them:
|
|
146
|
+
*
|
|
147
|
+
* ```ts
|
|
148
|
+
* declare module "@alchemy.run/kubernetes/ClusterAdapter" {
|
|
149
|
+
* interface WorkloadServicesRegistry {
|
|
150
|
+
* aws: Credentials | Region | AWSEnvironment;
|
|
151
|
+
* }
|
|
152
|
+
* }
|
|
153
|
+
* ```
|
|
154
|
+
*/
|
|
155
|
+
export interface WorkloadServicesRegistry {
|
|
156
|
+
}
|
|
157
|
+
/** The union of all registered ambient workload services. */
|
|
158
|
+
export type WorkloadServices = WorkloadServicesRegistry[keyof WorkloadServicesRegistry];
|
|
159
|
+
/**
|
|
160
|
+
* The image-source shape shared by every workload: exactly one of `main`
|
|
161
|
+
* (bundle an inline Effect program), `context`/`dockerfile` (build the
|
|
162
|
+
* user's Dockerfile), or `image` (a pre-built registry reference).
|
|
163
|
+
* Structurally mirrors the AWS container platforms' source props.
|
|
164
|
+
*/
|
|
165
|
+
export interface WorkloadImageSource {
|
|
166
|
+
main?: string;
|
|
167
|
+
handler?: string;
|
|
168
|
+
/**
|
|
169
|
+
* Bundler configuration for `main`. Unused code is tree-shaken.
|
|
170
|
+
* `effect`, alchemy, and `@distilled.cloud` are marked pure so unused
|
|
171
|
+
* parts prune more aggressively. List extra packages with
|
|
172
|
+
* `pure.packages`, or disable with `pure: false`.
|
|
173
|
+
*/
|
|
174
|
+
build?: Bundle.BundleConfig;
|
|
175
|
+
context?: string;
|
|
176
|
+
dockerfile?: string | InlineDockerfile;
|
|
177
|
+
image?: string;
|
|
178
|
+
}
|
|
179
|
+
export interface WorkloadIdentityReconcileOptions {
|
|
180
|
+
/** Logical resource id. */
|
|
181
|
+
id: string;
|
|
182
|
+
/** The resolved cluster connection. */
|
|
183
|
+
connection: Connection;
|
|
184
|
+
/** The namespace the workload runs in. */
|
|
185
|
+
namespace: string;
|
|
186
|
+
/** The service account name the workload's pods run as. */
|
|
187
|
+
serviceAccount: string;
|
|
188
|
+
/** Host bindings attached to the workload. */
|
|
189
|
+
bindings: ResourceBinding<WorkloadBindingContract>[];
|
|
190
|
+
/** Cloud-specific identity options from the workload's `identity` prop. */
|
|
191
|
+
options: WorkloadIdentityOptions | undefined;
|
|
192
|
+
/**
|
|
193
|
+
* Previously persisted identity state, if any — untyped hints because
|
|
194
|
+
* legacy pre-rename rows carry the old flat attribute shape; adapters
|
|
195
|
+
* narrow structurally and re-observe cloud state as the authority.
|
|
196
|
+
*/
|
|
197
|
+
state: Record<string, unknown> | undefined;
|
|
198
|
+
/** Internal + user tags for identity-owned cloud resources. */
|
|
199
|
+
tags: Record<string, string>;
|
|
200
|
+
}
|
|
201
|
+
export interface WorkloadIdentityResult {
|
|
202
|
+
/** Extra container environment collected from bindings. */
|
|
203
|
+
env: Record<string, any>;
|
|
204
|
+
/** Annotations to stamp on the workload's ServiceAccount object. */
|
|
205
|
+
serviceAccountAnnotations?: Record<string, string>;
|
|
206
|
+
/** Serializable state persisted on the workload's attributes. */
|
|
207
|
+
state: IdentityState | undefined;
|
|
208
|
+
}
|
|
209
|
+
export interface WorkloadIdentityDeleteOptions {
|
|
210
|
+
/** The persisted cluster connection (may reference a gone cluster). */
|
|
211
|
+
connection: Connection | undefined;
|
|
212
|
+
/**
|
|
213
|
+
* The persisted identity state. Untyped because legacy pre-rename rows
|
|
214
|
+
* carry the old flat attribute shape — adapters narrow structurally.
|
|
215
|
+
*/
|
|
216
|
+
state: Record<string, unknown> | undefined;
|
|
217
|
+
}
|
|
218
|
+
export interface ImageRegistryResolveOptions {
|
|
219
|
+
/** Logical resource id — keys generated repository names. */
|
|
220
|
+
id: string;
|
|
221
|
+
/** The image-source props bag. */
|
|
222
|
+
source: WorkloadImageSource;
|
|
223
|
+
/** Target image platform (`linux/amd64` / `linux/arm64`). */
|
|
224
|
+
platform: string;
|
|
225
|
+
/** Port the generated Dockerfile exposes (`main` sources only). */
|
|
226
|
+
port?: number;
|
|
227
|
+
/** True when `main` bundles as-is (no Effect bootstrap entry). */
|
|
228
|
+
isExternal?: boolean;
|
|
229
|
+
/** The generated-entry bootstrap wrapped around `main`. */
|
|
230
|
+
bootstrap: (importPath: string) => string;
|
|
231
|
+
/** Tags for registry-owned cloud resources. */
|
|
232
|
+
tags: Record<string, string>;
|
|
233
|
+
/**
|
|
234
|
+
* Previously persisted registry state, if any — untyped hints because
|
|
235
|
+
* legacy pre-rename rows carry the old flat attribute shape; adapters
|
|
236
|
+
* narrow structurally.
|
|
237
|
+
*/
|
|
238
|
+
state: Record<string, unknown> | undefined;
|
|
239
|
+
/** Plan-status session for build/push progress notes. */
|
|
240
|
+
session: {
|
|
241
|
+
note: (message: string) => Effect.Effect<void>;
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
export interface ImageRegistryResult {
|
|
245
|
+
/** Full image reference the pod spec should run. */
|
|
246
|
+
imageUri: string;
|
|
247
|
+
/** Content hash identifying the image. */
|
|
248
|
+
codeHash: string;
|
|
249
|
+
/** Serializable state persisted on the workload's attributes. */
|
|
250
|
+
state: RegistryState | undefined;
|
|
251
|
+
}
|
|
252
|
+
export interface ImageRegistryHashOptions {
|
|
253
|
+
source: WorkloadImageSource;
|
|
254
|
+
platform: string;
|
|
255
|
+
port?: number;
|
|
256
|
+
isExternal?: boolean;
|
|
257
|
+
bootstrap: (importPath: string) => string;
|
|
258
|
+
}
|
|
259
|
+
export interface ImageRegistryDeleteOptions {
|
|
260
|
+
/**
|
|
261
|
+
* The persisted registry state. Untyped because legacy pre-rename rows
|
|
262
|
+
* carry the old flat attribute shape — adapters narrow structurally.
|
|
263
|
+
*/
|
|
264
|
+
state: Record<string, unknown> | undefined;
|
|
265
|
+
}
|
|
266
|
+
export interface ClusterAdapterService {
|
|
267
|
+
readonly kind: "Kubernetes.ClusterAdapter";
|
|
268
|
+
/**
|
|
269
|
+
* Resolve the transport for a connection: discover the endpoint/CA when
|
|
270
|
+
* the connection doesn't carry them, and return a per-request auth
|
|
271
|
+
* header mint. Fails with {@link ClusterNotFoundError} when the cluster
|
|
272
|
+
* definitively no longer exists.
|
|
273
|
+
*/
|
|
274
|
+
readonly connect: (connection: Connection) => Effect.Effect<ClusterTransport, ClusterNotFoundError | Error>;
|
|
275
|
+
/** Workload identity provisioning (Pod Identity on EKS, Workload Identity Federation on GKE). */
|
|
276
|
+
readonly identity?: {
|
|
277
|
+
readonly reconcile: (options: WorkloadIdentityReconcileOptions) => Effect.Effect<WorkloadIdentityResult, any, AdapterLifecycleServices>;
|
|
278
|
+
readonly delete: (options: WorkloadIdentityDeleteOptions) => Effect.Effect<void, any, AdapterLifecycleServices>;
|
|
279
|
+
};
|
|
280
|
+
/** Managed container-image registry (ECR on EKS, Artifact Registry on GKE). */
|
|
281
|
+
readonly registry?: {
|
|
282
|
+
readonly resolve: (options: ImageRegistryResolveOptions) => Effect.Effect<ImageRegistryResult, any, AdapterLifecycleServices>;
|
|
283
|
+
/** Plan-time content hash used by `diff` to surface source drift. */
|
|
284
|
+
readonly hash: (options: ImageRegistryHashOptions) => Effect.Effect<string | undefined, any, AdapterLifecycleServices>;
|
|
285
|
+
readonly delete: (options: ImageRegistryDeleteOptions) => Effect.Effect<void, any, AdapterLifecycleServices>;
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* Platform-specific generated container entries for Effect-native
|
|
289
|
+
* workloads. Defaults to the platform-neutral bootstraps when omitted.
|
|
290
|
+
*/
|
|
291
|
+
readonly bootstrap?: {
|
|
292
|
+
readonly server?: (handler: string) => (importPath: string) => string;
|
|
293
|
+
readonly job?: (handler: string) => (importPath: string) => string;
|
|
294
|
+
};
|
|
295
|
+
/**
|
|
296
|
+
* Platform defaults applied to a `LoadBalancer` Service (EKS Auto Mode
|
|
297
|
+
* sets `loadBalancerClass: eks.amazonaws.com/nlb` and defaults the
|
|
298
|
+
* scheme to internet-facing). User `serviceAnnotations` always win.
|
|
299
|
+
*/
|
|
300
|
+
readonly loadBalancerDefaults?: (options: {
|
|
301
|
+
connection: Connection;
|
|
302
|
+
}) => Effect.Effect<{
|
|
303
|
+
loadBalancerClass?: string | undefined;
|
|
304
|
+
annotations?: Record<string, string>;
|
|
305
|
+
}, any, AdapterLifecycleServices>;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* The keyed Context tag for an adapter. Same auth kind → same tag, so a
|
|
309
|
+
* layer built with `ClusterAdapter("aws-eks")` is found by any dynamic
|
|
310
|
+
* lookup for that kind.
|
|
311
|
+
*/
|
|
312
|
+
export declare const ClusterAdapter: (authKind: string) => Context.Service<ClusterAdapterService, ClusterAdapterService>;
|
|
313
|
+
/**
|
|
314
|
+
* Resolve the {@link ClusterAdapterService} for a connection's auth kind
|
|
315
|
+
* from the ambient context (the stack's composed provider layers). Dies
|
|
316
|
+
* with setup guidance when no adapter is registered — that means the
|
|
317
|
+
* provider layer contributing it (e.g. `AWS.providers()` for `aws-eks`)
|
|
318
|
+
* is missing from the stack.
|
|
319
|
+
*/
|
|
320
|
+
export declare const findClusterAdapter: (authKind: string) => Effect.Effect<ClusterAdapterService>;
|
|
321
|
+
export {};
|
|
322
|
+
//# sourceMappingURL=ClusterAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClusterAdapter.d.ts","sourceRoot":"","sources":["../src/ClusterAdapter.ts"],"names":[],"mappings":"AAAA,O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