@openupstream/sdk 0.12.0 → 0.22.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/dist/index.d.ts +57 -5
- package/dist/index.js +109 -6
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +175 -12
- package/dist/internal.js +92 -7
- package/dist/internal.js.map +1 -1
- package/dist/model.d.ts +480 -10
- package/dist/model.js +111 -2
- package/dist/model.js.map +1 -1
- package/package.json +1 -1
package/dist/internal.d.ts
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* public API: it is served on its own port, never routed by ingress, and
|
|
5
5
|
* callers authenticate with their Kubernetes ServiceAccount token.
|
|
6
6
|
*/
|
|
7
|
-
import type { Account, Database, DatabaseAccess, DatabaseConnection, DefinitionDatabaseAccess, Domain, Id, Job, Member, Project, ResourceKind, Route, Service, Site, UsageUnit } from './model.js';
|
|
7
|
+
import type { Account, Database, DatabaseAccess, DatabaseConnection, DefinitionDatabaseAccess, Domain, FunctionResource, Id, Job, Member, PostgresTier, Project, ResourceKind, Route, Service, Site, UsageUnit } from './model.js';
|
|
8
|
+
import { type ServiceRollout } from './model.js';
|
|
8
9
|
/**
|
|
9
10
|
* Kubernetes names, by id (ARCHITECTURE.md, decision 42): the operators
|
|
10
11
|
* create these objects, the control plane reads and deletes them.
|
|
@@ -74,16 +75,17 @@ export declare const databaseAppSecret: (database: Pick<Database, "id">) => stri
|
|
|
74
75
|
*/
|
|
75
76
|
export declare const databaseAppVerifierSecret: (database: Pick<Database, "id">) => string;
|
|
76
77
|
/** Where the Project's Services and Jobs reach the Database: its Pooler, inside the cluster. */
|
|
77
|
-
export declare const databaseConnection: (database: Pick<Database, "id" | "projectId">) => DatabaseConnection;
|
|
78
|
+
export declare const databaseConnection: (database: Pick<Database, "id" | "projectId" | "postgresName">) => DatabaseConnection;
|
|
78
79
|
/**
|
|
79
80
|
* Where they reach its standby, for queries that must not load the primary
|
|
80
81
|
* and may read slightly old data (decision 157): the Database's `ro` Pooler.
|
|
81
82
|
* Nothing answers there while no standby is ready.
|
|
82
83
|
*/
|
|
83
|
-
export declare const databaseReadConnection: (database: Pick<Database, "id" | "projectId">) => DatabaseConnection;
|
|
84
|
-
/** The Kubernetes Secret with the values of the Secrets a Service's or
|
|
84
|
+
export declare const databaseReadConnection: (database: Pick<Database, "id" | "projectId" | "postgresName">) => DatabaseConnection;
|
|
85
|
+
/** The Kubernetes Secret with the values of the Secrets a Service's, Job's or Function's definition names (decision 170); it exists only while the definition names one. */
|
|
85
86
|
export declare const serviceEnvSecret: (service: Pick<Service, "id">) => string;
|
|
86
87
|
export declare const jobEnvSecret: (job: Pick<Job, "id">) => string;
|
|
88
|
+
export declare const functionEnvSecret: (fn: Pick<FunctionResource, "id">) => string;
|
|
87
89
|
/** `DATABASE_URL_<NAME>`'s suffix: the Database's name upper-cased, `-` as `_`. */
|
|
88
90
|
export declare const databaseEnvSuffix: (database: {
|
|
89
91
|
readonly name: string;
|
|
@@ -109,12 +111,25 @@ export declare const serviceObjectName: (service: Pick<Service, "id">) => string
|
|
|
109
111
|
export declare const jobObjectName: (job: Pick<Job, "id">) => string;
|
|
110
112
|
/** On a Service's Deployment and its pods: the Service's id, by which the control plane finds the pods for its logs. */
|
|
111
113
|
export declare const SERVICE_ID_LABEL = "openupstream.io/service-id";
|
|
114
|
+
/** The one container of a Service's pods (and the name the memory sizing pass resizes, decision 193). */
|
|
115
|
+
export declare const SERVICE_CONTAINER = "app";
|
|
112
116
|
/** On a Job's CronJob and its runs: the Job's id, by which the control plane lists the runs. */
|
|
113
117
|
export declare const JOB_ID_LABEL = "openupstream.io/job-id";
|
|
114
118
|
/** On a run the control plane started (a One-off job): `api`. Scheduled runs do not have it. */
|
|
115
119
|
export declare const RUN_TRIGGER_LABEL = "openupstream.io/trigger";
|
|
116
120
|
/** The folder under the backup bucket that holds one Database's base backups and WAL. */
|
|
117
121
|
export declare const backupPrefix: (projectId: Id, databaseId: Id) => string;
|
|
122
|
+
/**
|
|
123
|
+
* The server name its backups of `version` are archived under in its
|
|
124
|
+
* ObjectStore (Barman's `serverName`, decision 220): the Cluster's name for
|
|
125
|
+
* the major it was created with (`archiveVersion`), `<cluster>-pg<major>`
|
|
126
|
+
* for each major it was upgraded to. `pg_upgrade` makes a new system with
|
|
127
|
+
* timeline 1, whose WAL would mix with, and could overwrite, the old
|
|
128
|
+
* major's in one folder.
|
|
129
|
+
*/
|
|
130
|
+
export declare const archiveServerName: (server: Pick<Database, "id">, version: number, archiveVersion: number) => string;
|
|
131
|
+
/** The folder under the backup bucket of one server's archive under `serverName` (archiveServerName). */
|
|
132
|
+
export declare const archivePrefix: (projectId: Id, serverName: string) => string;
|
|
118
133
|
/** Ids are lowercase UUIDs, as Postgres prints them; usable in DNS names. */
|
|
119
134
|
export declare const UUID: RegExp;
|
|
120
135
|
/** Project and Database names, and label values: a DNS label (the schema checks the same). */
|
|
@@ -136,6 +151,8 @@ export declare const INTERNAL_ROUTES_PATH = "/internal/v1/routes";
|
|
|
136
151
|
export declare const INTERNAL_SERVICES_PATH = "/internal/v1/services";
|
|
137
152
|
/** `GET` lists every Job with its Project, for the Jobs operator. */
|
|
138
153
|
export declare const INTERNAL_JOBS_PATH = "/internal/v1/jobs";
|
|
154
|
+
/** `GET` lists every Function of a live Project, for the Functions operator (FunctionRow). */
|
|
155
|
+
export declare const INTERNAL_FUNCTIONS_PATH = "/internal/v1/functions";
|
|
139
156
|
/**
|
|
140
157
|
* For the madAuth sidecar, which passes on madAuth's events (decision 143):
|
|
141
158
|
* `DELETE <path>/<user id>` removes a user madAuth deleted from every
|
|
@@ -148,6 +165,14 @@ export declare const INTERNAL_USERS_PATH = "/internal/v1/users";
|
|
|
148
165
|
export declare const MADAUTH_ID: RegExp;
|
|
149
166
|
export declare const internalUserPath: (subject: string) => string;
|
|
150
167
|
export declare const internalApiKeyPath: (subject: string, apiKeyId: string) => string;
|
|
168
|
+
/**
|
|
169
|
+
* Whether an address has a pending invitation (decision 142), which lets it
|
|
170
|
+
* sign up while sign-up is closed: madAuth's sidecar asks before a new user
|
|
171
|
+
* is created. The address goes as the hex SHA-256 of its lowercased form,
|
|
172
|
+
* so no address is in a URL.
|
|
173
|
+
*/
|
|
174
|
+
export declare const INTERNAL_INVITED_PATH = "/internal/v1/invited";
|
|
175
|
+
export declare const internalInvitedPath: (emailSha256Hex: string) => string;
|
|
151
176
|
/** An Account's usage of one month: `${INTERNAL_ACCOUNTS_PATH}/{id}/usage?month=YYYY-MM`, for the billing service. */
|
|
152
177
|
export declare const internalUsagePath: (accountId: Id, month: string) => string;
|
|
153
178
|
/**
|
|
@@ -175,12 +200,12 @@ export interface AccountUsage {
|
|
|
175
200
|
}
|
|
176
201
|
/**
|
|
177
202
|
* The Traefik IngressRoute that serves one Resource under one Domain, in its
|
|
178
|
-
* Project's namespace (decision 114): `domain-<id>-bucket-<id
|
|
179
|
-
* `domain-<id>-svc-<id>`. Traefik names each
|
|
180
|
-
* metering reads the Resource from them.
|
|
203
|
+
* Project's namespace (decision 114): `domain-<id>-bucket-<id>`,
|
|
204
|
+
* `domain-<id>-svc-<id>` or `domain-<id>-fn-<id>`. Traefik names each
|
|
205
|
+
* rule's metrics after it, so metering reads the Resource from them.
|
|
181
206
|
*/
|
|
182
207
|
export declare const ingressRouteName: (domainId: Id, resource: {
|
|
183
|
-
readonly kind: "bucket" | "service";
|
|
208
|
+
readonly kind: "bucket" | "service" | "function";
|
|
184
209
|
readonly id: Id;
|
|
185
210
|
}) => string;
|
|
186
211
|
/** A Route as the Routes operator needs it: the Bucket by name, or the Service with its port. */
|
|
@@ -194,6 +219,66 @@ export type RoutedPath = Pick<Route, 'id' | 'pathPrefix'> & ({
|
|
|
194
219
|
readonly serviceId: Id;
|
|
195
220
|
readonly port: number;
|
|
196
221
|
});
|
|
222
|
+
/**
|
|
223
|
+
* A Route to a Function (decision 216): Traefik sends it to the runner with
|
|
224
|
+
* a Middleware that names the Function in `x-oup-function`. Kept apart
|
|
225
|
+
* from `routes`, so an operator that serves only Buckets and Services
|
|
226
|
+
* reads the routing table as before.
|
|
227
|
+
*/
|
|
228
|
+
export type FunctionRoutedPath = Pick<Route, 'id' | 'pathPrefix'> & {
|
|
229
|
+
readonly kind: 'function';
|
|
230
|
+
readonly functionId: Id;
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
* An origin of a Function as the Functions operator needs it to address it
|
|
234
|
+
* as the Routes operator does: a Bucket through Garage's website endpoint,
|
|
235
|
+
* with its name as the `Host` header; a Service at its Kubernetes Service
|
|
236
|
+
* (`serviceObjectName`) in the Project's namespace, on its port.
|
|
237
|
+
*/
|
|
238
|
+
export type FunctionRowOrigin = {
|
|
239
|
+
readonly name: string;
|
|
240
|
+
readonly kind: 'bucket';
|
|
241
|
+
readonly bucketId: Id;
|
|
242
|
+
readonly bucketName: string;
|
|
243
|
+
} | {
|
|
244
|
+
readonly name: string;
|
|
245
|
+
readonly kind: 'service';
|
|
246
|
+
readonly serviceId: Id;
|
|
247
|
+
readonly port: number;
|
|
248
|
+
};
|
|
249
|
+
/**
|
|
250
|
+
* One Function as the Functions operator needs it for the runner's
|
|
251
|
+
* configuration (decisions 159 and 216). The component's bytes are at
|
|
252
|
+
* `componentPath(projectId, componentDigest)` on the control plane's
|
|
253
|
+
* COMPONENTS_PORT. What its definition names for its environment
|
|
254
|
+
* (decision 170): the Secrets' names, whose values are in
|
|
255
|
+
* `functionEnvSecret` in the Project's namespace while there is at least
|
|
256
|
+
* one, the plain Variables, and the version of the named Secrets' values
|
|
257
|
+
* last written there.
|
|
258
|
+
*/
|
|
259
|
+
export interface FunctionRow {
|
|
260
|
+
readonly id: Id;
|
|
261
|
+
readonly projectId: Id;
|
|
262
|
+
readonly componentDigest: string;
|
|
263
|
+
readonly memoryMb: number;
|
|
264
|
+
readonly cpuMs: number;
|
|
265
|
+
readonly timeoutMs: number;
|
|
266
|
+
readonly secrets: readonly string[];
|
|
267
|
+
readonly variables: Readonly<Record<string, string>>;
|
|
268
|
+
readonly envVersion: string;
|
|
269
|
+
readonly origins: readonly FunctionRowOrigin[];
|
|
270
|
+
}
|
|
271
|
+
/** Only the shape a Functions operator relies on; the control plane checked the values when it stored them. */
|
|
272
|
+
export declare const isFunctionRow: (value: unknown) => value is FunctionRow;
|
|
273
|
+
/** Whether a body of `INTERNAL_FUNCTIONS_PATH` has the shape of its rows. */
|
|
274
|
+
export declare const isFunctionRows: (body: unknown) => body is FunctionRow[];
|
|
275
|
+
/**
|
|
276
|
+
* The control plane's port that serves Functions' components to the runner
|
|
277
|
+
* (`GET componentPath(…)`, `application/wasm`): no authentication, so only
|
|
278
|
+
* the runner's namespace may reach it (control-plane/deploy).
|
|
279
|
+
*/
|
|
280
|
+
export declare const COMPONENTS_PORT = 8085;
|
|
281
|
+
export declare const componentPath: (projectId: Id, digest: string) => string;
|
|
197
282
|
/**
|
|
198
283
|
* One Domain as the Routes operator needs it: where it lives, its hostname,
|
|
199
284
|
* and its Routes with what each one serves.
|
|
@@ -210,7 +295,14 @@ export interface DomainRouting {
|
|
|
210
295
|
* its own.
|
|
211
296
|
*/
|
|
212
297
|
readonly kind: Domain['kind'] | 'service';
|
|
298
|
+
/** Its Routes to Buckets and Services, longest prefix first. */
|
|
213
299
|
readonly routes: readonly RoutedPath[];
|
|
300
|
+
/**
|
|
301
|
+
* Its Routes to Functions, longest prefix first; only when it has one,
|
|
302
|
+
* and absent from a control plane before decision 216. A Domain with
|
|
303
|
+
* only these has empty `routes`.
|
|
304
|
+
*/
|
|
305
|
+
readonly functionRoutes?: readonly FunctionRoutedPath[];
|
|
214
306
|
}
|
|
215
307
|
export interface AccountRecord extends Account {
|
|
216
308
|
readonly members: readonly Pick<Member, 'authSubject' | 'email' | 'role'>[];
|
|
@@ -218,7 +310,10 @@ export interface AccountRecord extends Account {
|
|
|
218
310
|
/** One Service as the Services operator needs it. */
|
|
219
311
|
export interface ServiceRow {
|
|
220
312
|
readonly project: Project;
|
|
221
|
-
readonly service: Pick<Service, 'id' | 'name' | 'image' | 'imageDigest' | 'replicas' | 'memoryMb' | 'cpuMillicores' | 'port'
|
|
313
|
+
readonly service: Pick<Service, 'id' | 'name' | 'image' | 'imageDigest' | 'replicas' | 'memoryMb' | 'cpuMillicores' | 'cpuBurst' | 'port'> & {
|
|
314
|
+
/** Left out by a control plane from before decision 161: overlap. */
|
|
315
|
+
readonly rollout?: ServiceRollout;
|
|
316
|
+
};
|
|
222
317
|
/** What the Deployment runs: `<registry>/<repository>@<digest>`. */
|
|
223
318
|
readonly pinnedImage: string;
|
|
224
319
|
/** Where a single replica runs: the Service's homeSite, else the Project's oldest Database's, else the default Site. */
|
|
@@ -254,6 +349,12 @@ export interface ServiceRow {
|
|
|
254
349
|
* Absent from a control plane older than Keys.
|
|
255
350
|
*/
|
|
256
351
|
readonly keyAccess?: boolean;
|
|
352
|
+
/**
|
|
353
|
+
* What its pod template requests of memory, below `service.memoryMb`,
|
|
354
|
+
* which stays the limit (decision 193): the sizing pass's request as of
|
|
355
|
+
* the Service's last deploy. Absent: the request is the limit.
|
|
356
|
+
*/
|
|
357
|
+
readonly memoryRequestMb?: number;
|
|
257
358
|
}
|
|
258
359
|
/** The audience of the token a pod presents to the key API (decision 168); the Kubernetes API accepts no such token. */
|
|
259
360
|
export declare const KEYS_AUDIENCE = "openupstream-keys";
|
|
@@ -278,7 +379,9 @@ export declare const keysUrl: () => string;
|
|
|
278
379
|
* Database's owner. `access` is absent from a control plane before
|
|
279
380
|
* decision 173, whose rows name every Database of the Project as owner.
|
|
280
381
|
*/
|
|
281
|
-
export type RowDatabase = Pick<Database, 'id' | 'name'> & {
|
|
382
|
+
export type RowDatabase = Pick<Database, 'id' | 'name' | 'postgresName'> & {
|
|
383
|
+
/** Its Postgres server (decision 189); absent from a control plane before servers. */
|
|
384
|
+
readonly serverId?: Id;
|
|
282
385
|
readonly access?: DefinitionDatabaseAccess;
|
|
283
386
|
readonly role?: {
|
|
284
387
|
readonly id: Id;
|
|
@@ -292,6 +395,24 @@ export declare const definitionRoleName: (definition: {
|
|
|
292
395
|
}) => string;
|
|
293
396
|
/** The group role a Service's or Job's own role is a member of, which lets it connect (made at a Database's creation). */
|
|
294
397
|
export declare const CONNECT_GROUP_ROLE = "oup_connect";
|
|
398
|
+
/** A new Database's `postgresName`: its name with `-` as `_` (decision 189). */
|
|
399
|
+
export declare const postgresNameFor: (name: string) => string;
|
|
400
|
+
/**
|
|
401
|
+
* A Database's Postgres database, its owner and its group roles: named
|
|
402
|
+
* after its `postgresName` (decision 189, ADR-0015), or the names of a
|
|
403
|
+
* Database from before, whose server it is alone on.
|
|
404
|
+
*/
|
|
405
|
+
export interface PostgresNames {
|
|
406
|
+
readonly database: string;
|
|
407
|
+
readonly owner: string;
|
|
408
|
+
/** Has CONNECT on the database: a Service's or Job's own role is a member. */
|
|
409
|
+
readonly connect: string;
|
|
410
|
+
/** Reads every table; the owner may grant it. */
|
|
411
|
+
readonly read: string;
|
|
412
|
+
/** Reads and changes rows; the owner may grant it. */
|
|
413
|
+
readonly write: string;
|
|
414
|
+
}
|
|
415
|
+
export declare const postgresNamesOf: (database: Pick<Database, "postgresName">) => PostgresNames;
|
|
295
416
|
/**
|
|
296
417
|
* A Service's or Job's role in a Database, as the Databases operator adds
|
|
297
418
|
* it to the Cluster; without `login` it stays and cannot sign in. `dropped`
|
|
@@ -334,11 +455,11 @@ export declare const SPEC_VERSION_ANNOTATION = "openupstream.io/spec-version";
|
|
|
334
455
|
* `deploying` until the Deployment carries the version its row asks for,
|
|
335
456
|
* so a change is not `running` before it has been applied and rolled out.
|
|
336
457
|
*/
|
|
337
|
-
export declare const serviceSpecVersion: (row: Pick<ServiceRow, "service" | "pinnedImage" | "site" | "databases" | "keyAccess" | "secrets" | "variables" | "envVersion">) => string;
|
|
458
|
+
export declare const serviceSpecVersion: (row: Pick<ServiceRow, "service" | "pinnedImage" | "site" | "databases" | "keyAccess" | "secrets" | "variables" | "envVersion" | "memoryRequestMb">) => string;
|
|
338
459
|
/** One Job as the Jobs operator needs it. */
|
|
339
460
|
export interface JobRow {
|
|
340
461
|
readonly project: Project;
|
|
341
|
-
readonly job: Pick<Job, 'id' | 'name' | 'image' | 'imageDigest' | 'command' | 'args' | 'memoryMb' | 'cpuMillicores' | 'timeoutSeconds' | 'schedule' | 'timeZone'>;
|
|
462
|
+
readonly job: Pick<Job, 'id' | 'name' | 'image' | 'imageDigest' | 'command' | 'args' | 'memoryMb' | 'cpuMillicores' | 'cpuBurst' | 'timeoutSeconds' | 'schedule' | 'timeZone'>;
|
|
342
463
|
/** What its runs start: `<registry>/<repository>@<digest>`. */
|
|
343
464
|
readonly pinnedImage: string;
|
|
344
465
|
/** Where its runs go: the Job's homeSite, else the Project's oldest Database's, else the default Site. */
|
|
@@ -400,6 +521,39 @@ export interface DatabaseRow {
|
|
|
400
521
|
* forwarder there.
|
|
401
522
|
*/
|
|
402
523
|
readonly tunnelHostname?: string;
|
|
524
|
+
/**
|
|
525
|
+
* The Postgres server the Database is on (decision 189): the operator
|
|
526
|
+
* renders one Cluster per server, from its rows together. The sizes and
|
|
527
|
+
* Home site on `database` are the server's.
|
|
528
|
+
*/
|
|
529
|
+
readonly server?: RowServer;
|
|
530
|
+
/** The Database had its setup (`oup.setup()`, ADR-0015 section 3a); absent while it waits for it. */
|
|
531
|
+
readonly setUp?: boolean;
|
|
532
|
+
}
|
|
533
|
+
/** A Postgres server as the operator needs it, on each row of its Databases. */
|
|
534
|
+
export interface RowServer {
|
|
535
|
+
readonly id: Id;
|
|
536
|
+
readonly name: string;
|
|
537
|
+
/** `app`: a server from before, with its one Database; `databases`: the per-Database layout. */
|
|
538
|
+
readonly layout: 'app' | 'databases';
|
|
539
|
+
/** The Postgres database its bootstrap created, named in the Cluster for good; absent with the layout `app`. */
|
|
540
|
+
readonly initdbName?: string;
|
|
541
|
+
/** The names of its deleted Databases, whose roles are kept absent. */
|
|
542
|
+
readonly retiredPostgresNames: readonly string[];
|
|
543
|
+
/**
|
|
544
|
+
* The server it is a copy of, while that restore has not finished: its
|
|
545
|
+
* archive is read (ADR-0015 section 5), under `serverName`
|
|
546
|
+
* (archiveServerName; absent: the source's Cluster name).
|
|
547
|
+
*/
|
|
548
|
+
readonly restoringFrom?: {
|
|
549
|
+
readonly serverId: Id;
|
|
550
|
+
readonly targetTime?: string;
|
|
551
|
+
readonly serverName?: string;
|
|
552
|
+
};
|
|
553
|
+
/** The major whose backups are archived under the Cluster's own name (archiveServerName); absent: its postgresVersion. */
|
|
554
|
+
readonly archiveVersion?: number;
|
|
555
|
+
/** Decision 201; absent from a control plane before tiers: `production`. */
|
|
556
|
+
readonly tier?: PostgresTier;
|
|
403
557
|
}
|
|
404
558
|
/**
|
|
405
559
|
* The platform's own Account, Project and Databases: the control plane's
|
|
@@ -423,33 +577,42 @@ export declare const PLATFORM: {
|
|
|
423
577
|
};
|
|
424
578
|
readonly database: {
|
|
425
579
|
readonly id: "00000000-0000-4000-8000-000000000003";
|
|
580
|
+
readonly serverId: "00000000-0000-4000-8000-000000000003";
|
|
426
581
|
readonly projectId: "00000000-0000-4000-8000-000000000002";
|
|
427
582
|
readonly name: "control-plane";
|
|
428
583
|
readonly memoryMb: 512;
|
|
429
584
|
readonly storageGb: 5;
|
|
430
585
|
readonly autoGrow: true;
|
|
431
586
|
readonly maxStorageGb: null;
|
|
587
|
+
readonly tier: "production";
|
|
588
|
+
readonly postgresVersion: 17;
|
|
432
589
|
readonly createdAt: "2026-10-17T00:00:00Z";
|
|
433
590
|
};
|
|
434
591
|
readonly authDatabase: {
|
|
435
592
|
readonly id: "00000000-0000-4000-8000-000000000004";
|
|
593
|
+
readonly serverId: "00000000-0000-4000-8000-000000000004";
|
|
436
594
|
readonly projectId: "00000000-0000-4000-8000-000000000002";
|
|
437
595
|
readonly name: "auth";
|
|
438
596
|
readonly memoryMb: 512;
|
|
439
597
|
readonly storageGb: 2;
|
|
440
598
|
readonly autoGrow: true;
|
|
441
599
|
readonly maxStorageGb: null;
|
|
600
|
+
readonly tier: "production";
|
|
601
|
+
readonly postgresVersion: 17;
|
|
442
602
|
readonly createdAt: "2026-10-17T00:00:00Z";
|
|
443
603
|
};
|
|
444
604
|
/** The billing service's state; seeded only where a billing service runs (BILLING_CALLERS). */
|
|
445
605
|
readonly billingDatabase: {
|
|
446
606
|
readonly id: "00000000-0000-4000-8000-000000000005";
|
|
607
|
+
readonly serverId: "00000000-0000-4000-8000-000000000005";
|
|
447
608
|
readonly projectId: "00000000-0000-4000-8000-000000000002";
|
|
448
609
|
readonly name: "billing";
|
|
449
610
|
readonly memoryMb: 512;
|
|
450
611
|
readonly storageGb: 2;
|
|
451
612
|
readonly autoGrow: true;
|
|
452
613
|
readonly maxStorageGb: null;
|
|
614
|
+
readonly tier: "production";
|
|
615
|
+
readonly postgresVersion: 17;
|
|
453
616
|
readonly createdAt: "2026-10-20T00:00:00Z";
|
|
454
617
|
};
|
|
455
618
|
};
|
package/dist/internal.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DEFAULT_CPU_BURST, DEFAULT_SERVICE_ROLLOUT } from './model.js';
|
|
1
2
|
/**
|
|
2
3
|
* Kubernetes names, by id (ARCHITECTURE.md, decision 42): the operators
|
|
3
4
|
* create these objects, the control plane reads and deletes them.
|
|
@@ -56,8 +57,8 @@ export const databaseAppVerifierSecret = (database) => `${clusterName(database)}
|
|
|
56
57
|
export const databaseConnection = (database) => ({
|
|
57
58
|
host: `${poolerName(database)}.${projectNamespace(database.projectId)}.svc.cluster.local`,
|
|
58
59
|
port: 5432,
|
|
59
|
-
database:
|
|
60
|
-
user:
|
|
60
|
+
database: postgresNamesOf(database).database,
|
|
61
|
+
user: postgresNamesOf(database).owner,
|
|
61
62
|
});
|
|
62
63
|
/**
|
|
63
64
|
* Where they reach its standby, for queries that must not load the primary
|
|
@@ -68,9 +69,10 @@ export const databaseReadConnection = (database) => ({
|
|
|
68
69
|
...databaseConnection(database),
|
|
69
70
|
host: `${readPoolerName(database)}.${projectNamespace(database.projectId)}.svc.cluster.local`,
|
|
70
71
|
});
|
|
71
|
-
/** The Kubernetes Secret with the values of the Secrets a Service's or
|
|
72
|
+
/** The Kubernetes Secret with the values of the Secrets a Service's, Job's or Function's definition names (decision 170); it exists only while the definition names one. */
|
|
72
73
|
export const serviceEnvSecret = (service) => `svc-${service.id}-env`;
|
|
73
74
|
export const jobEnvSecret = (job) => `job-${job.id}-env`;
|
|
75
|
+
export const functionEnvSecret = (fn) => `fn-${fn.id}-env`;
|
|
74
76
|
/** `DATABASE_URL_<NAME>`'s suffix: the Database's name upper-cased, `-` as `_`. */
|
|
75
77
|
export const databaseEnvSuffix = (database) => database.name.toUpperCase().replaceAll('-', '_');
|
|
76
78
|
/**
|
|
@@ -98,12 +100,25 @@ export const serviceObjectName = (service) => `svc-${service.id}`;
|
|
|
98
100
|
export const jobObjectName = (job) => `job-${job.id}`;
|
|
99
101
|
/** On a Service's Deployment and its pods: the Service's id, by which the control plane finds the pods for its logs. */
|
|
100
102
|
export const SERVICE_ID_LABEL = 'openupstream.io/service-id';
|
|
103
|
+
/** The one container of a Service's pods (and the name the memory sizing pass resizes, decision 193). */
|
|
104
|
+
export const SERVICE_CONTAINER = 'app';
|
|
101
105
|
/** On a Job's CronJob and its runs: the Job's id, by which the control plane lists the runs. */
|
|
102
106
|
export const JOB_ID_LABEL = 'openupstream.io/job-id';
|
|
103
107
|
/** On a run the control plane started (a One-off job): `api`. Scheduled runs do not have it. */
|
|
104
108
|
export const RUN_TRIGGER_LABEL = 'openupstream.io/trigger';
|
|
105
109
|
/** The folder under the backup bucket that holds one Database's base backups and WAL. */
|
|
106
110
|
export const backupPrefix = (projectId, databaseId) => `${projectNamespace(projectId)}/${clusterName({ id: databaseId })}/`;
|
|
111
|
+
/**
|
|
112
|
+
* The server name its backups of `version` are archived under in its
|
|
113
|
+
* ObjectStore (Barman's `serverName`, decision 220): the Cluster's name for
|
|
114
|
+
* the major it was created with (`archiveVersion`), `<cluster>-pg<major>`
|
|
115
|
+
* for each major it was upgraded to. `pg_upgrade` makes a new system with
|
|
116
|
+
* timeline 1, whose WAL would mix with, and could overwrite, the old
|
|
117
|
+
* major's in one folder.
|
|
118
|
+
*/
|
|
119
|
+
export const archiveServerName = (server, version, archiveVersion) => version === archiveVersion ? clusterName(server) : `${clusterName(server)}-pg${version}`;
|
|
120
|
+
/** The folder under the backup bucket of one server's archive under `serverName` (archiveServerName). */
|
|
121
|
+
export const archivePrefix = (projectId, serverName) => `${projectNamespace(projectId)}/${serverName}/`;
|
|
107
122
|
/** Ids are lowercase UUIDs, as Postgres prints them; usable in DNS names. */
|
|
108
123
|
export const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
109
124
|
/** Project and Database names, and label values: a DNS label (the schema checks the same). */
|
|
@@ -125,6 +140,8 @@ export const INTERNAL_ROUTES_PATH = '/internal/v1/routes';
|
|
|
125
140
|
export const INTERNAL_SERVICES_PATH = '/internal/v1/services';
|
|
126
141
|
/** `GET` lists every Job with its Project, for the Jobs operator. */
|
|
127
142
|
export const INTERNAL_JOBS_PATH = '/internal/v1/jobs';
|
|
143
|
+
/** `GET` lists every Function of a live Project, for the Functions operator (FunctionRow). */
|
|
144
|
+
export const INTERNAL_FUNCTIONS_PATH = '/internal/v1/functions';
|
|
128
145
|
/**
|
|
129
146
|
* For the madAuth sidecar, which passes on madAuth's events (decision 143):
|
|
130
147
|
* `DELETE <path>/<user id>` removes a user madAuth deleted from every
|
|
@@ -137,15 +154,54 @@ export const INTERNAL_USERS_PATH = '/internal/v1/users';
|
|
|
137
154
|
export const MADAUTH_ID = /^[A-Za-z0-9_-]{1,128}$/;
|
|
138
155
|
export const internalUserPath = (subject) => `${INTERNAL_USERS_PATH}/${subject}`;
|
|
139
156
|
export const internalApiKeyPath = (subject, apiKeyId) => `${INTERNAL_USERS_PATH}/${subject}/api-keys/${apiKeyId}`;
|
|
157
|
+
/**
|
|
158
|
+
* Whether an address has a pending invitation (decision 142), which lets it
|
|
159
|
+
* sign up while sign-up is closed: madAuth's sidecar asks before a new user
|
|
160
|
+
* is created. The address goes as the hex SHA-256 of its lowercased form,
|
|
161
|
+
* so no address is in a URL.
|
|
162
|
+
*/
|
|
163
|
+
export const INTERNAL_INVITED_PATH = '/internal/v1/invited';
|
|
164
|
+
export const internalInvitedPath = (emailSha256Hex) => `${INTERNAL_INVITED_PATH}/${emailSha256Hex}`;
|
|
140
165
|
/** An Account's usage of one month: `${INTERNAL_ACCOUNTS_PATH}/{id}/usage?month=YYYY-MM`, for the billing service. */
|
|
141
166
|
export const internalUsagePath = (accountId, month) => `${INTERNAL_ACCOUNTS_PATH}/${accountId}/usage?month=${month}`;
|
|
167
|
+
/** The short form of each kind of Resource a Route targets in Kubernetes names. */
|
|
168
|
+
const ROUTED_KIND_LABEL = { bucket: 'bucket', service: 'svc', function: 'fn' };
|
|
142
169
|
/**
|
|
143
170
|
* The Traefik IngressRoute that serves one Resource under one Domain, in its
|
|
144
|
-
* Project's namespace (decision 114): `domain-<id>-bucket-<id
|
|
145
|
-
* `domain-<id>-svc-<id>`. Traefik names each
|
|
146
|
-
* metering reads the Resource from them.
|
|
171
|
+
* Project's namespace (decision 114): `domain-<id>-bucket-<id>`,
|
|
172
|
+
* `domain-<id>-svc-<id>` or `domain-<id>-fn-<id>`. Traefik names each
|
|
173
|
+
* rule's metrics after it, so metering reads the Resource from them.
|
|
174
|
+
*/
|
|
175
|
+
export const ingressRouteName = (domainId, resource) => `domain-${domainId}-${ROUTED_KIND_LABEL[resource.kind]}-${resource.id}`;
|
|
176
|
+
const isRecord = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
177
|
+
const isFunctionRowOrigin = (value) => isRecord(value) &&
|
|
178
|
+
typeof value['name'] === 'string' &&
|
|
179
|
+
((value['kind'] === 'bucket' && typeof value['bucketId'] === 'string' && typeof value['bucketName'] === 'string') ||
|
|
180
|
+
(value['kind'] === 'service' && typeof value['serviceId'] === 'string' && typeof value['port'] === 'number'));
|
|
181
|
+
/** Only the shape a Functions operator relies on; the control plane checked the values when it stored them. */
|
|
182
|
+
export const isFunctionRow = (value) => isRecord(value) &&
|
|
183
|
+
typeof value['id'] === 'string' &&
|
|
184
|
+
typeof value['projectId'] === 'string' &&
|
|
185
|
+
typeof value['componentDigest'] === 'string' &&
|
|
186
|
+
typeof value['memoryMb'] === 'number' &&
|
|
187
|
+
typeof value['cpuMs'] === 'number' &&
|
|
188
|
+
typeof value['timeoutMs'] === 'number' &&
|
|
189
|
+
Array.isArray(value['secrets']) &&
|
|
190
|
+
value['secrets'].every((name) => typeof name === 'string') &&
|
|
191
|
+
isRecord(value['variables']) &&
|
|
192
|
+
Object.values(value['variables']).every((text) => typeof text === 'string') &&
|
|
193
|
+
typeof value['envVersion'] === 'string' &&
|
|
194
|
+
Array.isArray(value['origins']) &&
|
|
195
|
+
value['origins'].every(isFunctionRowOrigin);
|
|
196
|
+
/** Whether a body of `INTERNAL_FUNCTIONS_PATH` has the shape of its rows. */
|
|
197
|
+
export const isFunctionRows = (body) => Array.isArray(body) && body.every(isFunctionRow);
|
|
198
|
+
/**
|
|
199
|
+
* The control plane's port that serves Functions' components to the runner
|
|
200
|
+
* (`GET componentPath(…)`, `application/wasm`): no authentication, so only
|
|
201
|
+
* the runner's namespace may reach it (control-plane/deploy).
|
|
147
202
|
*/
|
|
148
|
-
export const
|
|
203
|
+
export const COMPONENTS_PORT = 8085;
|
|
204
|
+
export const componentPath = (projectId, digest) => `/components/${projectId}/${digest}`;
|
|
149
205
|
/** The audience of the token a pod presents to the key API (decision 168); the Kubernetes API accepts no such token. */
|
|
150
206
|
export const KEYS_AUDIENCE = 'openupstream-keys';
|
|
151
207
|
/** The key API's port on the control plane's pods and its Kubernetes Service. */
|
|
@@ -166,6 +222,17 @@ export const keysUrl = () => `http://${CONTROL_PLANE_NAME}.${projectNamespace(PL
|
|
|
166
222
|
export const definitionRoleName = (definition) => `${definition.kind === 'service' ? 'svc' : 'job'}_${definition.name.replaceAll('-', '_')}`;
|
|
167
223
|
/** The group role a Service's or Job's own role is a member of, which lets it connect (made at a Database's creation). */
|
|
168
224
|
export const CONNECT_GROUP_ROLE = 'oup_connect';
|
|
225
|
+
/** A new Database's `postgresName`: its name with `-` as `_` (decision 189). */
|
|
226
|
+
export const postgresNameFor = (name) => name.replaceAll('-', '_');
|
|
227
|
+
export const postgresNamesOf = (database) => database.postgresName === undefined
|
|
228
|
+
? { database: 'app', owner: 'app', connect: CONNECT_GROUP_ROLE, read: 'oup_read', write: 'oup_write' }
|
|
229
|
+
: {
|
|
230
|
+
database: database.postgresName,
|
|
231
|
+
owner: `oup_owner_${database.postgresName}`,
|
|
232
|
+
connect: `oup_connect_${database.postgresName}`,
|
|
233
|
+
read: `oup_read_${database.postgresName}`,
|
|
234
|
+
write: `oup_write_${database.postgresName}`,
|
|
235
|
+
};
|
|
169
236
|
/** The role the control plane connects as to delete a deleted Service's or Job's role: it may call the cleanup function and nothing else. */
|
|
170
237
|
export const ADMIN_ROLE = 'oup_admin';
|
|
171
238
|
/** The role the cleanup function runs as: a member of the owner and of every Service's and Job's role, without a login. */
|
|
@@ -209,6 +276,12 @@ export const serviceSpecVersion = (row) => [
|
|
|
209
276
|
...row.databases.map(rowDatabaseVersion),
|
|
210
277
|
// Only when set, so a Service without a grant keeps the version an operator from before Keys computes.
|
|
211
278
|
...(row.keyAccess === true ? ['keys'] : []),
|
|
279
|
+
// Only when set, so a Service whose request is its limit keeps the version it had.
|
|
280
|
+
...(row.memoryRequestMb === undefined ? [] : [`request:${row.memoryRequestMb}`]),
|
|
281
|
+
// Only when not the default, so a Service that bursts 2× keeps the version it had.
|
|
282
|
+
...(row.service.cpuBurst === DEFAULT_CPU_BURST ? [] : [`burst:${row.service.cpuBurst}`]),
|
|
283
|
+
// Only when not the default, so a Service that overlaps keeps the version it had.
|
|
284
|
+
...(row.service.rollout === undefined || row.service.rollout === DEFAULT_SERVICE_ROLLOUT ? [] : [`rollout:${row.service.rollout}`]),
|
|
212
285
|
].join('|');
|
|
213
286
|
/**
|
|
214
287
|
* Everything of a Job's row that its CronJob is rendered from. The Jobs
|
|
@@ -231,6 +304,8 @@ export const jobSpecVersion = (row) => JSON.stringify([
|
|
|
231
304
|
// Only when set, as in serviceSpecVersion.
|
|
232
305
|
...(row.keyAccess === true ? ['keys'] : []),
|
|
233
306
|
{ secrets: row.secrets, variables: sortedEntries(row.variables) },
|
|
307
|
+
// Only when not the default, as in serviceSpecVersion.
|
|
308
|
+
...(row.job.cpuBurst === DEFAULT_CPU_BURST ? [] : [{ burst: row.job.cpuBurst }]),
|
|
234
309
|
]);
|
|
235
310
|
/**
|
|
236
311
|
* The platform's own Account, Project and Databases: the control plane's
|
|
@@ -254,33 +329,43 @@ export const PLATFORM = {
|
|
|
254
329
|
},
|
|
255
330
|
database: {
|
|
256
331
|
id: '00000000-0000-4000-8000-000000000003',
|
|
332
|
+
serverId: '00000000-0000-4000-8000-000000000003',
|
|
257
333
|
projectId: '00000000-0000-4000-8000-000000000002',
|
|
258
334
|
name: 'control-plane',
|
|
259
335
|
memoryMb: 512,
|
|
260
336
|
storageGb: 5,
|
|
261
337
|
autoGrow: true,
|
|
262
338
|
maxStorageGb: null,
|
|
339
|
+
tier: 'production',
|
|
340
|
+
// The platform's own servers stay on the major they were made with; upgrading one is a runbook's step.
|
|
341
|
+
postgresVersion: 17,
|
|
263
342
|
createdAt: '2026-10-17T00:00:00Z',
|
|
264
343
|
},
|
|
265
344
|
authDatabase: {
|
|
266
345
|
id: '00000000-0000-4000-8000-000000000004',
|
|
346
|
+
serverId: '00000000-0000-4000-8000-000000000004',
|
|
267
347
|
projectId: '00000000-0000-4000-8000-000000000002',
|
|
268
348
|
name: 'auth',
|
|
269
349
|
memoryMb: 512,
|
|
270
350
|
storageGb: 2,
|
|
271
351
|
autoGrow: true,
|
|
272
352
|
maxStorageGb: null,
|
|
353
|
+
tier: 'production',
|
|
354
|
+
postgresVersion: 17,
|
|
273
355
|
createdAt: '2026-10-17T00:00:00Z',
|
|
274
356
|
},
|
|
275
357
|
/** The billing service's state; seeded only where a billing service runs (BILLING_CALLERS). */
|
|
276
358
|
billingDatabase: {
|
|
277
359
|
id: '00000000-0000-4000-8000-000000000005',
|
|
360
|
+
serverId: '00000000-0000-4000-8000-000000000005',
|
|
278
361
|
projectId: '00000000-0000-4000-8000-000000000002',
|
|
279
362
|
name: 'billing',
|
|
280
363
|
memoryMb: 512,
|
|
281
364
|
storageGb: 2,
|
|
282
365
|
autoGrow: true,
|
|
283
366
|
maxStorageGb: null,
|
|
367
|
+
tier: 'production',
|
|
368
|
+
postgresVersion: 17,
|
|
284
369
|
createdAt: '2026-10-20T00:00:00Z',
|
|
285
370
|
},
|
|
286
371
|
};
|
package/dist/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAa,EAAU,EAAE,CAAC,WAAW,SAAS,EAAE,CAAC;AAElF,qGAAqG;AACrG,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAA8B,EAAU,EAAE,CAAC,MAAM,QAAQ,CAAC,EAAE,EAAE,CAAC;AAE3F,kGAAkG;AAClG,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAA8B,EAAU,EAAE,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC;AAExG;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAA8B,EAAU,EAAE,CAAC,GAAG,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC;AAEvG;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAE/C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,QAAgB,EAAU,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,GAAG,2BAA2B,CAAC,GAAG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