@serve.zone/interfaces 32.50.0 → 32.52.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 +69 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/clusternode.d.ts +7 -0
- package/dist_ts/data/clusternode.js +1 -1
- package/dist_ts/data/clusternodehostname.d.ts +63 -0
- package/dist_ts/data/clusternodehostname.js +122 -0
- package/dist_ts/data/deploymentlegacyimport.d.ts +120 -6
- package/dist_ts/data/deploymentlegacyimport.js +289 -5
- package/dist_ts/data/index.d.ts +1 -0
- package/dist_ts/data/index.js +2 -1
- package/dist_ts/data/sparknodereport.d.ts +60 -0
- package/dist_ts/data/sparknodereport.js +66 -3
- package/dist_ts/requests/node.d.ts +59 -0
- package/dist_ts/requests/service.d.ts +9 -5
- package/package.json +2 -2
- package/readme.md +19 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/clusternode.ts +8 -0
- package/ts/data/clusternodehostname.ts +153 -0
- package/ts/data/deploymentlegacyimport.ts +413 -13
- package/ts/data/index.ts +1 -0
- package/ts/data/sparknodereport.ts +112 -2
- package/ts/requests/node.ts +67 -0
- package/ts/requests/service.ts +12 -5
package/ts/requests/node.ts
CHANGED
|
@@ -150,6 +150,13 @@ export interface IReq_Any_Cloudly_CreateNodeJumpCommand extends plugins.typedreq
|
|
|
150
150
|
role?: IClusterNode['data']['role'];
|
|
151
151
|
nodeType?: IClusterNode['data']['nodeType'];
|
|
152
152
|
ttlMs?: number;
|
|
153
|
+
/**
|
|
154
|
+
* The new node's name (`data.isClusterNodeName`). The setup command names the host
|
|
155
|
+
* `cloudly-worker-<nodeName>` (`data.deriveDefaultClusterNodeHostname`) before it enrolls, so
|
|
156
|
+
* the node enrolls under its default hostname. Absent, the node keeps the hostname it has and
|
|
157
|
+
* its name is proposed from that (`data.proposeClusterNodeName`).
|
|
158
|
+
*/
|
|
159
|
+
nodeName?: string;
|
|
153
160
|
};
|
|
154
161
|
response: {
|
|
155
162
|
jumpCode: string;
|
|
@@ -356,6 +363,66 @@ export interface IReq_Any_Cloudly_SetClusterNodeCorestoreDatabaseEndpoint extend
|
|
|
356
363
|
};
|
|
357
364
|
}
|
|
358
365
|
|
|
366
|
+
/**
|
|
367
|
+
* An administrator renames a node: the static hostname Cloudly wants it to carry
|
|
368
|
+
* (`IClusterNode.data.hostnameIntent.hostname`).
|
|
369
|
+
*
|
|
370
|
+
* The node's name stays as it is: the new intent keeps the name of the node's current intent. A
|
|
371
|
+
* node without an intent takes the name `data.proposeClusterNodeName(hostname)` (`foo` names the
|
|
372
|
+
* node `foo`, `cloudly-worker-grasberg` names it `grasberg`), and is refused `name-invalid` when
|
|
373
|
+
* that is `null`.
|
|
374
|
+
*
|
|
375
|
+
* Cloudly records the intent and answers at once; Spark applies the intent of the latest
|
|
376
|
+
* generation on the host and the node has converged when its report states the new hostname. A new
|
|
377
|
+
* intent may replace one the node has not converged to, whether it is still applying, failed or
|
|
378
|
+
* never reached the node. `expectedGeneration` is the generation of the node's current intent, `0`
|
|
379
|
+
* when it has none, and serializes concurrent changes. Every refusal is one of
|
|
380
|
+
* `data.clusterNodeHostnameRefusals` and changes nothing.
|
|
381
|
+
*/
|
|
382
|
+
export interface IReq_Any_Cloudly_SetClusterNodeHostname extends plugins.typedrequestInterfaces.implementsTR<
|
|
383
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
384
|
+
IReq_Any_Cloudly_SetClusterNodeHostname
|
|
385
|
+
> {
|
|
386
|
+
method: 'setClusterNodeHostname';
|
|
387
|
+
request: {
|
|
388
|
+
identity: IIdentity;
|
|
389
|
+
nodeId: string;
|
|
390
|
+
expectedGeneration: number;
|
|
391
|
+
/** One lowercase RFC 1123 label (`data.isClusterNodeHostname`). */
|
|
392
|
+
hostname: string;
|
|
393
|
+
};
|
|
394
|
+
response: {
|
|
395
|
+
/** The node as it now stands, carrying the new intent. */
|
|
396
|
+
node: IClusterNode;
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* An administrator resets a node to the default scheme: hostname `cloudly-worker-<name>`
|
|
402
|
+
* (`data.deriveDefaultClusterNodeHostname`).
|
|
403
|
+
*
|
|
404
|
+
* `name` replaces the node's name when stated; absent, the name of the node's current intent is
|
|
405
|
+
* used, and a node without an intent is refused `name-invalid`. Recorded, applied and replaceable
|
|
406
|
+
* exactly like `setClusterNodeHostname`, with the same refusals.
|
|
407
|
+
*/
|
|
408
|
+
export interface IReq_Any_Cloudly_ResetClusterNodeHostname extends plugins.typedrequestInterfaces.implementsTR<
|
|
409
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
410
|
+
IReq_Any_Cloudly_ResetClusterNodeHostname
|
|
411
|
+
> {
|
|
412
|
+
method: 'resetClusterNodeHostname';
|
|
413
|
+
request: {
|
|
414
|
+
identity: IIdentity;
|
|
415
|
+
nodeId: string;
|
|
416
|
+
expectedGeneration: number;
|
|
417
|
+
/** The node's name (`data.isClusterNodeName`). */
|
|
418
|
+
name?: string;
|
|
419
|
+
};
|
|
420
|
+
response: {
|
|
421
|
+
/** The node as it now stands, carrying the new intent. */
|
|
422
|
+
node: IClusterNode;
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
|
|
359
426
|
export interface IReq_Any_Cloudly_CreateNodeAction extends plugins.typedrequestInterfaces.implementsTR<
|
|
360
427
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
361
428
|
IReq_Any_Cloudly_CreateNodeAction
|
package/ts/requests/service.ts
CHANGED
|
@@ -17,7 +17,10 @@ import type {
|
|
|
17
17
|
IServiceDeploymentStatus,
|
|
18
18
|
} from '../data/deploymentoperation.js';
|
|
19
19
|
import type { TSha256Digest } from '../data/immutableimage.js';
|
|
20
|
-
import type {
|
|
20
|
+
import type {
|
|
21
|
+
ILegacyServiceHostObservation,
|
|
22
|
+
ILegacyServiceRuntimeAttestation,
|
|
23
|
+
} from '../data/deploymentlegacyimport.js';
|
|
21
24
|
import type { IProtocolOffer } from '../protocol.js';
|
|
22
25
|
import type {
|
|
23
26
|
IRuntimeAssignmentLogAttemptPage,
|
|
@@ -330,10 +333,13 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
330
333
|
}
|
|
331
334
|
|
|
332
335
|
/**
|
|
333
|
-
* Captures durable evidence that a legacy `deployOnPush` service runs exactly
|
|
334
|
-
*
|
|
335
|
-
*
|
|
336
|
-
*
|
|
336
|
+
* Captures durable evidence that a legacy `deployOnPush` service runs exactly one registry root of
|
|
337
|
+
* its own repository, from an administrator's observation of its Swarm service and containers on
|
|
338
|
+
* the hosts that run them (`hostObservation`). Cloudly judges the observation itself
|
|
339
|
+
* (`data.judgeLegacyServiceHostObservation`): every desired replica running, healthy or without a
|
|
340
|
+
* healthcheck, on one root that is whole in Cloudly's own registry, its platform manifests read
|
|
341
|
+
* from there. The source tag need not still name that root. Administrators only, and only while
|
|
342
|
+
* the legacy runtime still runs — incomplete evidence is refused, never stored.
|
|
337
343
|
*
|
|
338
344
|
* `expectedRuntimeDigest`, when stated, is an assertion the observed digest must equal. Capturing
|
|
339
345
|
* again for an unchanged digest returns the attestation already stored.
|
|
@@ -348,6 +354,7 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
348
354
|
identity: IIdentityCredential;
|
|
349
355
|
legacyServiceId: string;
|
|
350
356
|
expectedRuntimeDigest?: TSha256Digest;
|
|
357
|
+
hostObservation: ILegacyServiceHostObservation;
|
|
351
358
|
};
|
|
352
359
|
response: {
|
|
353
360
|
attestation: ILegacyServiceRuntimeAttestation;
|