alasio 4.0.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.
Files changed (72) hide show
  1. package/dist/cli/src/cluster/docker.js +219 -0
  2. package/dist/cli/src/cluster/docker.js.map +1 -0
  3. package/dist/cli/src/cluster/local.js +392 -0
  4. package/dist/cli/src/cluster/local.js.map +1 -0
  5. package/dist/cli/src/commands/common.js +108 -0
  6. package/dist/cli/src/commands/common.js.map +1 -0
  7. package/dist/cli/src/commands/down.js +26 -0
  8. package/dist/cli/src/commands/down.js.map +1 -0
  9. package/dist/cli/src/commands/init.js +314 -0
  10. package/dist/cli/src/commands/init.js.map +1 -0
  11. package/dist/cli/src/commands/lake.js +33 -0
  12. package/dist/cli/src/commands/lake.js.map +1 -0
  13. package/dist/cli/src/commands/login.js +38 -0
  14. package/dist/cli/src/commands/login.js.map +1 -0
  15. package/dist/cli/src/commands/logs.js +27 -0
  16. package/dist/cli/src/commands/logs.js.map +1 -0
  17. package/dist/cli/src/commands/restart.js +23 -0
  18. package/dist/cli/src/commands/restart.js.map +1 -0
  19. package/dist/cli/src/commands/status.js +58 -0
  20. package/dist/cli/src/commands/status.js.map +1 -0
  21. package/dist/cli/src/commands/uninstall.js +47 -0
  22. package/dist/cli/src/commands/uninstall.js.map +1 -0
  23. package/dist/cli/src/commands/up.js +33 -0
  24. package/dist/cli/src/commands/up.js.map +1 -0
  25. package/dist/cli/src/commands/upgrade.js +50 -0
  26. package/dist/cli/src/commands/upgrade.js.map +1 -0
  27. package/dist/cli/src/commands.js +16 -0
  28. package/dist/cli/src/commands.js.map +1 -0
  29. package/dist/cli/src/config.js +169 -0
  30. package/dist/cli/src/config.js.map +1 -0
  31. package/dist/cli/src/images.js +7 -0
  32. package/dist/cli/src/images.js.map +1 -0
  33. package/dist/cli/src/install.js +39 -0
  34. package/dist/cli/src/install.js.map +1 -0
  35. package/dist/cli/src/kube/api.js +231 -0
  36. package/dist/cli/src/kube/api.js.map +1 -0
  37. package/dist/cli/src/kube/apply.js +98 -0
  38. package/dist/cli/src/kube/apply.js.map +1 -0
  39. package/dist/cli/src/kube/rollout.js +166 -0
  40. package/dist/cli/src/kube/rollout.js.map +1 -0
  41. package/dist/cli/src/main.js +30 -0
  42. package/dist/cli/src/main.js.map +1 -0
  43. package/dist/cli/src/manifests/agent-sandbox.js +89 -0
  44. package/dist/cli/src/manifests/agent-sandbox.js.map +1 -0
  45. package/dist/cli/src/manifests/alasio.js +367 -0
  46. package/dist/cli/src/manifests/alasio.js.map +1 -0
  47. package/dist/cli/src/manifests/common.js +157 -0
  48. package/dist/cli/src/manifests/common.js.map +1 -0
  49. package/dist/cli/src/manifests/config.js +283 -0
  50. package/dist/cli/src/manifests/config.js.map +1 -0
  51. package/dist/cli/src/manifests/index.js +20 -0
  52. package/dist/cli/src/manifests/index.js.map +1 -0
  53. package/dist/cli/src/manifests/lake.js +56 -0
  54. package/dist/cli/src/manifests/lake.js.map +1 -0
  55. package/dist/cli/src/manifests/neon.js +656 -0
  56. package/dist/cli/src/manifests/neon.js.map +1 -0
  57. package/dist/cli/src/manifests/network-policies.js +86 -0
  58. package/dist/cli/src/manifests/network-policies.js.map +1 -0
  59. package/dist/cli/src/manifests/object-store.js +204 -0
  60. package/dist/cli/src/manifests/object-store.js.map +1 -0
  61. package/dist/cli/src/manifests/sandboxes.agents.x-k8s.io.json +6295 -0
  62. package/dist/cli/src/release.js +15 -0
  63. package/dist/cli/src/release.js.map +1 -0
  64. package/dist/cli/src/secrets.js +49 -0
  65. package/dist/cli/src/secrets.js.map +1 -0
  66. package/dist/cli/src/target.js +55 -0
  67. package/dist/cli/src/target.js.map +1 -0
  68. package/dist/cli/src/telegram.js +27 -0
  69. package/dist/cli/src/telegram.js.map +1 -0
  70. package/dist/src/kube/config.js +99 -0
  71. package/dist/src/kube/config.js.map +1 -0
  72. package/package.json +32 -0
@@ -0,0 +1,157 @@
1
+ /**
2
+ * What the objects of an installation share: their names and labels, image references,
3
+ * security contexts, and the pieces of pod specs several components have alike.
4
+ *
5
+ * Every object is named after the installation, `alasio`, and labelled as Kubernetes
6
+ * recommends, managed by alasio. Names, and the labels that select pods, stay as they
7
+ * are from one version to the next, as a workload's selector cannot change.
8
+ */
9
+ import { createHash } from "node:crypto";
10
+ import { imageReference } from "../images.js";
11
+ import { VERSION } from "../release.js";
12
+ /** The namespace alasio runs in, which its objects are in unless they say another. */
13
+ export const NAMESPACE = "alasio";
14
+ /**
15
+ * The installation's name: alasio's own objects' name (its Deployment, ServiceAccount
16
+ * and volume), the start of every other's, and the instance every object is labelled
17
+ * with.
18
+ */
19
+ export const RELEASE = "alasio";
20
+ /** A component's name: `alasio-<component>`. */
21
+ export function componentName(component) {
22
+ return `${RELEASE}-${component}`;
23
+ }
24
+ /** A Neon service's name: `alasio-neon-<component>`. */
25
+ export function neonName(component) {
26
+ return componentName(`neon-${component}`);
27
+ }
28
+ /** The labels every object of a component carries. */
29
+ export function labels(component) {
30
+ return {
31
+ "app.kubernetes.io/name": "alasio",
32
+ "app.kubernetes.io/instance": RELEASE,
33
+ "app.kubernetes.io/version": VERSION,
34
+ "app.kubernetes.io/managed-by": "alasio",
35
+ "app.kubernetes.io/part-of": "alasio",
36
+ "app.kubernetes.io/component": component,
37
+ };
38
+ }
39
+ /** The labels of a pod of the data stack (Neon, the object store, the lake), which its NetworkPolicy admits each other by. */
40
+ export function stackLabels(component) {
41
+ return { ...labels(component), "alasio.dev/stack": "neon" };
42
+ }
43
+ /** The labels that select a component's pods. */
44
+ export function selectorLabels(component) {
45
+ return { "app.kubernetes.io/name": "alasio", "app.kubernetes.io/instance": RELEASE, "app.kubernetes.io/component": component };
46
+ }
47
+ /** The pod security context of a workload that runs restricted, as `uid` and `gid`. */
48
+ export function restrictedPod(uid, gid) {
49
+ return { runAsNonRoot: true, runAsUser: uid, runAsGroup: gid, fsGroup: gid, seccompProfile: { type: "RuntimeDefault" } };
50
+ }
51
+ /** The security context of a container that runs restricted. */
52
+ export function restrictedContainer() {
53
+ return { allowPrivilegeEscalation: false, capabilities: { drop: ["ALL"] } };
54
+ }
55
+ /** The resources of a short-lived helper container: an init container's, say. */
56
+ export function helperResources() {
57
+ return { resources: { requests: { cpu: "10m", memory: "16Mi" }, limits: { memory: "64Mi" } } };
58
+ }
59
+ /** `{ [key]: value }` when `value` holds anything, so an object says nothing of what was given empty. */
60
+ export function given(key, value) {
61
+ return Object.keys(value).length > 0 ? { [key]: value } : {};
62
+ }
63
+ /** The variables of a record, in the order of their names, so an object lists them alike however they were given. */
64
+ export function envOf(variables) {
65
+ return Object.keys(variables).sort().map((name) => ({ name, value: variables[name] ?? "" }));
66
+ }
67
+ /**
68
+ * OpenTelemetry's standard variables, which alasio, the lake and Neon's compute export
69
+ * with: none when no endpoint is set.
70
+ */
71
+ export function otelEnv({ telemetry }) {
72
+ if (!telemetry.otlpEndpoint)
73
+ return [];
74
+ return [
75
+ { name: "OTEL_EXPORTER_OTLP_ENDPOINT", value: telemetry.otlpEndpoint },
76
+ { name: "OTEL_EXPORTER_OTLP_PROTOCOL", value: telemetry.otlpProtocol },
77
+ ...(telemetry.headersSecret
78
+ ? [{ name: "OTEL_EXPORTER_OTLP_HEADERS", valueFrom: { secretKeyRef: { name: telemetry.headersSecret, key: telemetry.headersKey } } }]
79
+ : []),
80
+ ...(telemetry.resourceAttributes ? [{ name: "OTEL_RESOURCE_ATTRIBUTES", value: telemetry.resourceAttributes }] : []),
81
+ ];
82
+ }
83
+ /** The pull secrets every pod is given. */
84
+ export function imagePullSecrets(config) {
85
+ return given("imagePullSecrets", config.imagePullSecrets.map((name) => ({ name })));
86
+ }
87
+ /** The host profile's mounts, as volumes. */
88
+ export function hostVolumes(config) {
89
+ return config.host.mounts.map((mount) => ({ name: mount.name, hostPath: { path: mount.hostPath, ...(mount.type ? { type: mount.type } : {}) } }));
90
+ }
91
+ /** The host profile's mounts, as volume mounts. */
92
+ export function hostVolumeMounts(config) {
93
+ return config.host.mounts.map((mount) => ({ name: mount.name, mountPath: mount.mountPath, ...(mount.readOnly ? { readOnly: true } : {}) }));
94
+ }
95
+ /** The spec of a claim of `storage`. */
96
+ export function claimSpec(storage) {
97
+ return {
98
+ accessModes: ["ReadWriteOnce"],
99
+ ...(storage.storageClassName ? { storageClassName: storage.storageClassName } : {}),
100
+ resources: { requests: { storage: storage.size } },
101
+ };
102
+ }
103
+ /** The Secret alasio reads its database URL and the lake role's password from. */
104
+ export function databaseSecret(config) {
105
+ return config.neon.enabled ? `${RELEASE}-database` : config.neon.external.existingSecret;
106
+ }
107
+ /** The object store's S3 endpoint, as pods in alasio's namespace reach it. */
108
+ export function s3Endpoint(config) {
109
+ return config.objectStore.bundled.enabled ? `http://${componentName("seaweedfs")}:8333` : config.objectStore.external.endpoint;
110
+ }
111
+ /** What every pod of the data stack has in its spec: pull secrets, Neon's user, and placement. */
112
+ export function stackPodSpec(config) {
113
+ return {
114
+ ...imagePullSecrets(config),
115
+ securityContext: restrictedPod(config.neon.runAsUser, config.neon.runAsGroup),
116
+ ...given("nodeSelector", { ...config.neon.nodeSelector }),
117
+ ...given("tolerations", [...config.neon.tolerations]),
118
+ };
119
+ }
120
+ /** An init container that waits until `url` answers 2xx, with Neon's image's curl. */
121
+ export function waitFor(config, name, url) {
122
+ return {
123
+ name: `wait-for-${name}`,
124
+ image: imageReference(config.neon.image),
125
+ imagePullPolicy: "IfNotPresent",
126
+ command: ["/bin/sh", "-c", 'until curl -fsS -o /dev/null --max-time 5 "$0"; do sleep 2; done', url],
127
+ securityContext: restrictedContainer(),
128
+ ...helperResources(),
129
+ };
130
+ }
131
+ /** Until the bundled object store's buckets exist, nothing that stores in them starts: the init container that waits, if it is bundled. */
132
+ export function waitForObjectStore(config) {
133
+ return config.objectStore.bundled.enabled ? [waitFor(config, "object-store", `http://${componentName("seaweedfs")}:8333/healthz`)] : [];
134
+ }
135
+ /** A shell script of `lines`, one to a line. */
136
+ export function script(...lines) {
137
+ return `${lines.join("\n")}\n`;
138
+ }
139
+ /** Object keys in order, at every depth, as Go's encoding/json writes a map's. */
140
+ function sortedKeys(_key, value) {
141
+ return typeof value === "object" && value !== null && !Array.isArray(value)
142
+ ? Object.fromEntries(Object.entries(value).sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)))
143
+ : value;
144
+ }
145
+ /**
146
+ * `value` as JSON as Go's encoding/json writes it: keys sorted, so a value is always
147
+ * written alike, and its checksum with it; `<`, `>`, `&` and the line separators
148
+ * escaped; and, with `indent`, indented by it.
149
+ */
150
+ export function goJson(value, indent) {
151
+ return JSON.stringify(value, sortedKeys, indent).replace(/[<>&\u2028\u2029]/gu, (char) => `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}`);
152
+ }
153
+ /** The sha256 of `text`, in hex. */
154
+ export function sha256(text) {
155
+ return createHash("sha256").update(text).digest("hex");
156
+ }
157
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/manifests/common.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAczC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,sFAAsF;AACtF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC;AAElC;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC,gDAAgD;AAChD,MAAM,UAAU,aAAa,CAAC,SAAiB;IAC7C,OAAO,GAAG,OAAO,IAAI,SAAS,EAAE,CAAC;AACnC,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,QAAQ,CAAC,SAAiB;IACxC,OAAO,aAAa,CAAC,QAAQ,SAAS,EAAE,CAAC,CAAC;AAC5C,CAAC;AAID,sDAAsD;AACtD,MAAM,UAAU,MAAM,CAAC,SAAiB;IACtC,OAAO;QACL,wBAAwB,EAAE,QA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CAAC,EAAE,CAAC,CAAC;AACtJ,CAAC;AAED,oCAAoC;AACpC,MAAM,UAAU,MAAM,CAAC,IAAY;IACjC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACzD,CAAC"}
@@ -0,0 +1,283 @@
1
+ /**
2
+ * How alasio is installed: the settings an operator chooses, which alasio's command line
3
+ * keeps in its config file as plain JSON, checked here: what is refused is said by its
4
+ * key, and why. Every key may be left out for its default, and alasio's own images
5
+ * default to this package's (../release.ts).
6
+ *
7
+ * A map of quantities given for resources adds to its defaults rather than replacing
8
+ * them, so `{ "limits": { "cpu": "2" } }` keeps the default memory limit.
9
+ */
10
+ import { isIPv4 } from "node:net";
11
+ import { Effect, Predicate, Result, Schema, SchemaGetter, SchemaIssue } from "effect";
12
+ import { IMAGES } from "../release.js";
13
+ /** The install configuration is not what alasio installs from; the message says which key and why. */
14
+ export class InstallConfigError extends Schema.TaggedError()("InstallConfigError", {
15
+ message: Schema.String,
16
+ }) {
17
+ }
18
+ /** `schema`, which is `value` (as the config file would hold it) when its key is left out. */
19
+ export const defaulted = (schema, value) => schema.pipe(Schema.withDecodingDefaultKey(Effect.succeed(value)));
20
+ /** A string that matches `pattern`, which `message` says it must otherwise. */
21
+ export const matching = (pattern, message) => Schema.String.check(Schema.isPattern(pattern, { message }));
22
+ const NAME = /^[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?$/u;
23
+ const Namespace = matching(NAME, "must be a namespace name");
24
+ const SecretName = matching(/^[a-z0-9]([-a-z0-9.]{0,251}[a-z0-9])?$/u, "must be a Secret's name");
25
+ /** A Secret's name, or empty for none. */
26
+ const OptionalSecretName = matching(/^(|[a-z0-9]([-a-z0-9.]{0,251}[a-z0-9])?)$/u, "must be a Secret's name, or empty");
27
+ export const NonEmpty = Schema.String.check(Schema.isMinLength(1, { message: "must not be empty" }));
28
+ export const AbsolutePath = matching(/^\//u, "must be an absolute path");
29
+ /** An http(s) URL, or empty for none. */
30
+ export const OptionalUrl = matching(/^(|https?:\/\/.+)$/u, "must be an http(s) URL, or empty");
31
+ const Id = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0, { message: "must be a user or group id" }));
32
+ const Bucket = matching(/^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/u, "must be a bucket's name");
33
+ const Size = matching(/^[0-9]+(\.[0-9]+)?(Ki|Mi|Gi|Ti|Pi|k|M|G|T|P)?$/u, "must be a storage size, such as 20Gi");
34
+ const PullPolicy = Schema.Literals(["Always", "IfNotPresent", "Never"]);
35
+ /** An image's digest, or empty for an image not pinned. */
36
+ const Digest = matching(/^(|sha256:[0-9a-f]{64})$/u, "must be a sha256 digest, or empty");
37
+ /** A JSON object, which the API server checks as the object it is (a toleration, say) when alasio is applied. */
38
+ const object = () => Schema.declare((value) => Predicate.isObject(value), { message: "must be an object" });
39
+ /** An image: its repository, its tag (this package's version when empty), and its digest, if pinned. */
40
+ const Image = (image) => defaulted(Schema.Struct({
41
+ repository: defaulted(NonEmpty, image.repository),
42
+ tag: defaulted(Schema.String, image.tag),
43
+ digest: defaulted(Digest, image.digest),
44
+ }), {});
45
+ /** A resource quantity; one given as a number (`2` CPUs) is that number's quantity. */
46
+ const Quantity = Schema.Union([Schema.String, Schema.Finite.pipe(Schema.decodeTo(Schema.String, { decode: SchemaGetter.String(), encode: SchemaGetter.Number() }))]);
47
+ const Quantities = Schema.Record(Schema.String, Quantity);
48
+ /** Quantities that add to `defaults`, or replace theirs. */
49
+ const quantities = (defaults) => defaulted(Quantities.pipe(Schema.decodeTo(Schema.Record(Schema.String, Schema.String), {
50
+ decode: SchemaGetter.transform((given) => ({ ...defaults, ...given })),
51
+ encode: SchemaGetter.passthrough(),
52
+ })), {});
53
+ /** A container's resources, its requests and limits over `defaults`. */
54
+ const Resources = (defaults) => defaulted(Schema.Struct({ requests: quantities(defaults.requests), limits: quantities(defaults.limits) }), {});
55
+ /** A volume: its size, and its StorageClass, the cluster's default when empty. */
56
+ const Storage = (size) => defaulted(Schema.Struct({ size: defaulted(Size, size), storageClassName: defaulted(Schema.String, "") }), {});
57
+ const Env = defaulted(Schema.Record(Schema.String, Schema.String), {});
58
+ const NodeSelector = defaulted(Schema.Record(Schema.String, Schema.String), {});
59
+ const Tolerations = defaulted(Schema.Array(object()), []);
60
+ const Affinity = defaulted(object(), {});
61
+ const Ids = defaulted(Schema.Array(Id), []);
62
+ /** A path of the machine the host profile mounts into alasio and each folder's bayma. */
63
+ const HostMount = Schema.Struct({
64
+ name: matching(NAME, "must be a volume name"),
65
+ hostPath: AbsolutePath,
66
+ mountPath: AbsolutePath,
67
+ readOnly: defaulted(Schema.Boolean, false),
68
+ /** What must be at hostPath; empty checks nothing. */
69
+ type: defaulted(Schema.Literals(["", "Directory", "DirectoryOrCreate", "File", "FileOrCreate", "Socket", "CharDevice", "BlockDevice"]), ""),
70
+ });
71
+ const Alasio = Schema.Struct({
72
+ /** The bot's token and who may use it: a Secret with keys `token` and `allowedUserIds`. */
73
+ telegram: Schema.Struct({ existingSecret: SecretName.annotateKey({ messageMissingKey: "is required: the Secret of the bot's token and allowed users" }) })
74
+ .annotateKey({ messageMissingKey: "is required, with existingSecret" }),
75
+ /** The harness a new conversation uses; empty leaves alasio's default. */
76
+ defaultHarness: defaulted(Schema.Literals(["", "claude", "codex"]), ""),
77
+ /** Claude Code's login: a Secret whose `key` holds a token from `claude setup-token`; none finds it in alasio's home. */
78
+ claude: defaulted(Schema.Struct({ existingSecret: defaulted(OptionalSecretName, ""), key: defaulted(NonEmpty, "token") }), {}),
79
+ /** alasio's home and state: a volume of its own, or an existing claim. */
80
+ persistence: defaulted(Schema.Struct({ size: defaulted(Size, "20Gi"), storageClassName: defaulted(Schema.String, ""), existingClaim: defaulted(Schema.String, "") }), {}),
81
+ env: Env,
82
+ envFrom: defaulted(Schema.Array(object()), []),
83
+ resources: Resources({ requests: { cpu: "500m", memory: "1Gi" }, limits: { memory: "8Gi" } }),
84
+ /** Whom alasio runs as, unless the host profile says. */
85
+ runAsUser: defaulted(Id, 1000),
86
+ runAsGroup: defaulted(Id, 1000),
87
+ supplementalGroups: Ids,
88
+ nodeSelector: NodeSelector,
89
+ tolerations: Tolerations,
90
+ affinity: Affinity,
91
+ });
92
+ const Telemetry = Schema.Struct({
93
+ /** Where alasio, its harnesses, bayma, the lake and Neon's collector export to; empty exports nothing. */
94
+ otlpEndpoint: defaulted(OptionalUrl, ""),
95
+ otlpProtocol: defaulted(Schema.Literals(["http/protobuf", "http/json", "grpc"]), "http/protobuf"),
96
+ /** A Secret whose `headersKey` holds OTEL_EXPORTER_OTLP_HEADERS. */
97
+ headersSecret: defaulted(OptionalSecretName, ""),
98
+ headersKey: defaulted(NonEmpty, "headers"),
99
+ resourceAttributes: defaulted(Schema.String, ""),
100
+ /** The port alasio receives session sandboxes' telemetry on. */
101
+ receiverPort: defaulted(Schema.Int.check(Schema.isBetween({ minimum: 1024, maximum: 65535 }, { message: "must be a port from 1024 to 65535" })), 4318),
102
+ });
103
+ const Sessions = Schema.Struct({
104
+ enabled: defaulted(Schema.Boolean, true),
105
+ namespace: defaulted(Namespace, "alasio-sessions"),
106
+ createNamespace: defaulted(Schema.Boolean, true),
107
+ /** The RuntimeClass sessions run under; empty runs them under the cluster's default runtime. */
108
+ runtimeClassName: defaulted(Schema.String, "gvisor"),
109
+ storage: Storage("10Gi"),
110
+ resources: Resources({ requests: { cpu: "250m", memory: "512Mi" }, limits: { cpu: "2", memory: "2Gi" } }),
111
+ /** Whether a session's pod waits until NetworkPolicy confines it. */
112
+ egressGate: defaulted(Schema.Boolean, true),
113
+ /** The resolvers sessions with internet access use. */
114
+ fullModeNameservers: defaulted(Schema.Array(Schema.String.check(Schema.makeFilter((address) => isIPv4(address) || "must be an IPv4 address"))).check(Schema.isMinLength(1, { message: "must list from one to three resolvers" }), Schema.isMaxLength(3, { message: "must list from one to three resolvers" })), ["1.1.1.1", "8.8.8.8"]),
115
+ /** What sessions with internet access may not reach. */
116
+ blockedCidrs: defaulted(Schema.Array(matching(/^[0-9.]+\/[0-9]{1,2}$/u, "must be an IPv4 CIDR")), ["0.0.0.0/8", "10.0.0.0/8", "100.64.0.0/10", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.168.0.0/16", "224.0.0.0/4", "240.0.0.0/4"]),
117
+ nodeSelector: NodeSelector,
118
+ tolerations: Tolerations,
119
+ });
120
+ const Host = Schema.Struct({
121
+ /** The host profile: folder workspaces on the machine's own files. Privileged, for a single-node cluster the operator owns. */
122
+ enabled: defaulted(Schema.Boolean, false),
123
+ namespace: defaulted(Namespace, "alasio-host"),
124
+ createNamespace: defaulted(Schema.Boolean, true),
125
+ baymaImage: Image({
126
+ repository: "ghcr.io/eaucoin/bayma",
127
+ tag: "0.11.0",
128
+ digest: "sha256:91f78d334302fced5c5aecb5bdb1cb99757a8b05d0c9fda5d3b9855ebc6d1236",
129
+ }),
130
+ /** The operator's user and home, which alasio and each folder's bayma run as and in. */
131
+ uid: defaulted(Id, 1000),
132
+ gid: defaulted(Id, 1000),
133
+ supplementalGroups: Ids,
134
+ home: defaulted(AbsolutePath, "/home/operator"),
135
+ /** Where folder workspaces' bayma keeps its state, under a mount. */
136
+ stateRoot: defaulted(AbsolutePath, "/home/operator/.alasio/bayma"),
137
+ mounts: defaulted(Schema.Array(HostMount), []),
138
+ /** The directory folder workspaces are created under, a path of the mounts; empty leaves alasio's default. */
139
+ workspaceRoot: defaulted(matching(/^(|\/.*)$/u, "must be an absolute path, or empty"), ""),
140
+ /** Whether alasio's home is the operator's rather than its volume. */
141
+ alasioHome: defaulted(Schema.Boolean, true),
142
+ env: Env,
143
+ resources: Resources({ requests: { cpu: "100m", memory: "256Mi" }, limits: { memory: "8Gi" } }),
144
+ });
145
+ /** A service of Neon's with a volume. */
146
+ const NeonStored = (size, resources) => defaulted(Schema.Struct({ storage: Storage(size), resources: Resources(resources) }), {});
147
+ /** A service of Neon's without one. */
148
+ const NeonService = (resources) => defaulted(Schema.Struct({ resources: Resources(resources) }), {});
149
+ const Neon = Schema.Struct({
150
+ enabled: defaulted(Schema.Boolean, true),
151
+ /** Without Neon, alasio's database: a Secret with `url` and `lake-password`. */
152
+ external: defaulted(Schema.Struct({ existingSecret: defaulted(OptionalSecretName, "") }), {}),
153
+ image: Image({
154
+ repository: "neondatabase/neon",
155
+ tag: "release-9129",
156
+ digest: "sha256:166022a72bf9983eba96d061d794f4740edbd4c3301e66202c1180acce9a323c",
157
+ }),
158
+ computeImage: Image({
159
+ repository: "neondatabase/compute-node-v17",
160
+ tag: "release-compute-9073",
161
+ digest: "sha256:ed6a613231d7026b4df8b00563444b9f33745370a3b3f0a2183e723f460ba974",
162
+ }),
163
+ controllerDbImage: Image({
164
+ repository: "postgres",
165
+ tag: "17-bookworm",
166
+ digest: "sha256:639ab7ceb90e13123085b741fb31ef493fba25463002f6da665352e7b534b652",
167
+ }),
168
+ /** Whom Neon's services run as, owning their volumes. */
169
+ runAsUser: defaulted(Id, 1000),
170
+ runAsGroup: defaulted(Id, 1000),
171
+ safekeepers: defaulted(Schema.Struct({
172
+ /** How many safekeepers hold each timeline's WAL. */
173
+ replicas: defaulted(Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 7 }, { message: "must be from 1 to 7" })), 3),
174
+ storage: Storage("20Gi"),
175
+ resources: Resources({ requests: { cpu: "100m", memory: "256Mi" }, limits: { memory: "1Gi" } }),
176
+ }), {}),
177
+ pageserver: NeonStored("50Gi", { requests: { cpu: "250m", memory: "512Mi" }, limits: { memory: "4Gi" } }),
178
+ storageController: NeonService({ requests: { cpu: "50m", memory: "128Mi" }, limits: { memory: "512Mi" } }),
179
+ storageBroker: NeonService({ requests: { cpu: "50m", memory: "64Mi" }, limits: { memory: "256Mi" } }),
180
+ controllerDb: NeonStored("2Gi", { requests: { cpu: "50m", memory: "128Mi" }, limits: { memory: "512Mi" } }),
181
+ control: NeonStored("100Mi", { requests: { cpu: "20m", memory: "64Mi" }, limits: { memory: "256Mi" } }),
182
+ compute: NeonService({ requests: { cpu: "500m", memory: "1Gi" }, limits: { memory: "4Gi" } }),
183
+ /** A daily logical dump of alasio's database to the object store, the last `keep` kept. */
184
+ backup: defaulted(Schema.Struct({
185
+ enabled: defaulted(Schema.Boolean, true),
186
+ schedule: defaulted(Schema.String.check(Schema.isMinLength(9, { message: "must be a cron schedule" })), "17 3 * * *"),
187
+ keep: defaulted(Schema.Int.check(Schema.isGreaterThanOrEqualTo(1, { message: "must be at least 1" })), 14),
188
+ }), {}),
189
+ /** The stack's own metrics, scraped and sent where telemetry goes. */
190
+ collector: defaulted(Schema.Struct({
191
+ enabled: defaulted(Schema.Boolean, true),
192
+ image: Image({
193
+ repository: "otel/opentelemetry-collector-contrib",
194
+ tag: "0.161.0",
195
+ digest: "sha256:fd328de2552466ad78385e1b1289c3f2402b1c45f265b252aab1955b42845ac1",
196
+ }),
197
+ /** Where the collector sends to, when not telemetry.otlpEndpoint. */
198
+ otlpEndpoint: defaulted(OptionalUrl, ""),
199
+ resources: Resources({ requests: { cpu: "50m", memory: "128Mi" }, limits: { memory: "512Mi" } }),
200
+ }), {}),
201
+ nodeSelector: NodeSelector,
202
+ tolerations: Tolerations,
203
+ });
204
+ const ObjectStore = Schema.Struct({
205
+ /** SeaweedFS, run beside Neon. */
206
+ bundled: defaulted(Schema.Struct({
207
+ enabled: defaulted(Schema.Boolean, true),
208
+ image: Image({
209
+ repository: "chrislusf/seaweedfs",
210
+ tag: "4.47",
211
+ digest: "sha256:ce9e796f1fe6f06968f4c04bdaf8f678dad9c8acdfef3d244133d71bfa6bf882",
212
+ }),
213
+ storage: Storage("100Gi"),
214
+ /** The most volumes it keeps, each up to 1GiB. */
215
+ volumes: defaulted(Schema.Int.check(Schema.isGreaterThanOrEqualTo(30, { message: "must be at least 30" })), 100),
216
+ /** The disk it leaves free. */
217
+ minFreeSpace: defaulted(matching(/^[0-9]+(KiB|MiB|GiB|TiB)$/u, "must be a size in KiB, MiB, GiB or TiB"), "5GiB"),
218
+ resources: Resources({ requests: { cpu: "100m", memory: "256Mi" }, limits: { memory: "2Gi" } }),
219
+ }), {}),
220
+ /** Or an S3-compatible store of the operator's: its endpoint, region, and a Secret with `accessKey` and `secretKey`. */
221
+ external: defaulted(Schema.Struct({
222
+ endpoint: defaulted(OptionalUrl, ""),
223
+ region: defaulted(NonEmpty, "us-east-1"),
224
+ existingSecret: defaulted(OptionalSecretName, ""),
225
+ }), {}),
226
+ buckets: defaulted(Schema.Struct({ neon: defaulted(Bucket, "neon"), lake: defaulted(Bucket, "lake"), backups: defaulted(Bucket, "backups") }), {}),
227
+ });
228
+ /** agent-sandbox's controller, installed once per cluster; off where the cluster already has it. */
229
+ const AgentSandbox = Schema.Struct({
230
+ enabled: defaulted(Schema.Boolean, true),
231
+ image: defaulted(Schema.Struct({
232
+ repository: defaulted(NonEmpty, "registry.k8s.io/agent-sandbox/agent-sandbox-controller"),
233
+ tag: defaulted(Schema.String, "v1.0.5"),
234
+ digest: defaulted(Digest, "sha256:28a9cbdbfd6ac0a4e5c7e9261ace1aa30ee2da681cb640dccdfed98e8dd9d98b"),
235
+ pullPolicy: defaulted(PullPolicy, "IfNotPresent"),
236
+ }), {}),
237
+ resources: Resources({ requests: { cpu: "50m", memory: "64Mi" }, limits: { memory: "256Mi" } }),
238
+ nodeSelector: NodeSelector,
239
+ tolerations: Tolerations,
240
+ affinity: Affinity,
241
+ });
242
+ /** What a configuration must also hold, given what it turns off: the issue of the first it lacks. */
243
+ function completeness(config) {
244
+ if (!config.neon.enabled && !config.neon.external.existingSecret) {
245
+ return { path: ["neon", "external", "existingSecret"], issue: "is required when neon.enabled is false" };
246
+ }
247
+ if (config.neon.enabled && !config.objectStore.bundled.enabled) {
248
+ if (!config.objectStore.external.endpoint)
249
+ return { path: ["objectStore", "external", "endpoint"], issue: "is required when objectStore.bundled.enabled is false" };
250
+ if (!config.objectStore.external.existingSecret)
251
+ return { path: ["objectStore", "external", "existingSecret"], issue: "is required with an external object store" };
252
+ }
253
+ return undefined;
254
+ }
255
+ const InstallStruct = Schema.Struct({
256
+ images: defaulted(Schema.Struct({ alasio: Image(IMAGES.alasio), agent: Image(IMAGES.agent), lake: Image(IMAGES.lake), pullPolicy: defaulted(PullPolicy, "IfNotPresent") }), {}),
257
+ /** Pull Secrets for private registries, in alasio's namespace and the sessions and host ones. */
258
+ imagePullSecrets: defaulted(Schema.Array(SecretName), []),
259
+ /** alasio itself; its telegram.existingSecret has no default, so every configuration says it. */
260
+ alasio: Alasio.annotateKey({ messageMissingKey: "is required, with telegram.existingSecret" }),
261
+ telemetry: defaulted(Telemetry, {}),
262
+ sessions: defaulted(Sessions, {}),
263
+ host: defaulted(Host, {}),
264
+ neon: defaulted(Neon, {}),
265
+ objectStore: defaulted(ObjectStore, {}),
266
+ /** The analytics lake, loaded from Neon into DuckLake. */
267
+ lake: defaulted(Schema.Struct({ enabled: defaulted(Schema.Boolean, true), resources: Resources({ requests: { cpu: "100m", memory: "512Mi" }, limits: { memory: "1536Mi" } }) }), {}),
268
+ /** NetworkPolicies confining sessions, folder workspaces' bayma and Neon. */
269
+ networkPolicies: defaulted(Schema.Struct({ enabled: defaulted(Schema.Boolean, true) }), {}),
270
+ agentSandbox: defaulted(AgentSandbox, {}),
271
+ });
272
+ /** The install configuration: what the config file holds, every key left out its default. */
273
+ export const InstallConfig = InstallStruct.check(Schema.makeFilter(completeness));
274
+ const formatIssue = SchemaIssue.makeFormatterStandardSchemaV1();
275
+ /** The first thing wrong with a configuration: the key's path, then what it must be. */
276
+ export function describeIssue(issue) {
277
+ const [first] = formatIssue(issue).issues;
278
+ const path = first?.path?.map((segment) => String(Predicate.hasProperty(segment, "key") ? segment.key : segment)).join(".") ?? "";
279
+ return [path, first?.message ?? "is not what alasio installs from"].filter(Boolean).join(" ");
280
+ }
281
+ /** The configuration in `input`, parsed JSON, checked, with its defaults: a key alasio does not know is refused. */
282
+ export const decodeInstallConfig = (input) => Result.mapError(Schema.decodeUnknownResult(InstallConfig)(input, { onExcessProperty: "error" }), (error) => new InstallConfigError({ message: describeIssue(error.issue) }));
283
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/manifests/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAEtF,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,sGAAsG;AACtG,MAAM,OAAO,kBAAmB,SAAQ,MAAM,CAAC,WAAW,EAAsB,CAAC,oBAAoB,EAAE;IACrG,OAAO,EAAE,MAAM,CAAC,MAAM;CACvB,CAAC;CAAG;AAEL,8FAA8F;AAC9F,MAAM,CAAC,MAAM,SAAS,GAAG,CAAuB,MAAS,EAAE,KAAmB,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAErJ,+EAA+E;AAC/E,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAE,OAAe,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;AAE1H,MAAM,IAAI,GAAG,uCAAuC,CAAC;AAErD,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,EAAE,0BAA0B,CAAC,CAAC;AAC7D,MAAM,UAAU,GAAG,QAAQ,CAAC,yCAAyC,EAAE,yBAAyB,CAAC,CAAC;AAClG,0CAA0C;AAC1C,MAAM,kBAAkB,GAAG,QAAQ,CAAC,4CAA4C,EAAE,mCAAmC,CAAC,CAAC;AACvH,MA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EAAE,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC,EAC/E,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,kBAAkB,CAAC,EAAE,OAAO,EAAE,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAC3E,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { agentSandboxObjects } from "./agent-sandbox.js";
2
+ import { alasioObjects } from "./alasio.js";
3
+ import { lakeObjects } from "./lake.js";
4
+ import { neonObjects } from "./neon.js";
5
+ import { networkPolicyObjects } from "./network-policies.js";
6
+ import { objectStoreObjects } from "./object-store.js";
7
+ export { decodeInstallConfig, InstallConfig, InstallConfigError } from "./config.js";
8
+ export { NAMESPACE } from "./common.js";
9
+ /** The objects of the installation `config` describes: agent-sandbox's, alasio's, Neon's, the object store's, the lake's, and the NetworkPolicies. */
10
+ export function manifests(config) {
11
+ return [
12
+ ...agentSandboxObjects(config),
13
+ ...alasioObjects(config),
14
+ ...neonObjects(config),
15
+ ...objectStoreObjects(config),
16
+ ...lakeObjects(config),
17
+ ...networkPolicyObjects(config),
18
+ ];
19
+ }
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/manifests/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,kBAAkB,EAA0B,MAAM,aAAa,CAAC;AAC7G,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,sJAAsJ;AACtJ,MAAM,UAAU,SAAS,CAAC,MAAqB;IAC7C,OAAO;QACL,GAAG,mBAAmB,CAAC,MAAM,CAAC;QAC9B,GAAG,aAAa,CAAC,MAAM,CAAC;QACxB,GAAG,WAAW,CAAC,MAAM,CAAC;QACtB,GAAG,kBAAkB,CAAC,MAAM,CAAC;QAC7B,GAAG,WAAW,CAAC,MAAM,CAAC;QACtB,GAAG,oBAAoB,CAAC,MAAM,CAAC;KAChC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { imageReference } from "../images.js";
2
+ import { componentName, NAMESPACE, neonName, restrictedContainer, s3Endpoint, selectorLabels, stackLabels, stackPodSpec } from "./common.js";
3
+ /** The lake's objects, when it runs, which is beside Neon. */
4
+ export function lakeObjects(config) {
5
+ if (!config.lake.enabled || !config.neon.enabled)
6
+ return [];
7
+ const name = componentName("lake");
8
+ const service = {
9
+ apiVersion: "v1",
10
+ kind: "Service",
11
+ metadata: { name, namespace: NAMESPACE, labels: stackLabels("lake") },
12
+ spec: { selector: selectorLabels("lake"), ports: [{ name: "metrics", port: 9464 }] },
13
+ };
14
+ // Live while its loads are not failing for long; ready once one has made the lake.
15
+ const probe = (path) => ({ httpGet: { path, port: "metrics" } });
16
+ const deployment = {
17
+ apiVersion: "apps/v1",
18
+ kind: "Deployment",
19
+ metadata: { name, namespace: NAMESPACE, labels: stackLabels("lake") },
20
+ spec: {
21
+ replicas: 1,
22
+ // One loader: two would race each other's loads.
23
+ strategy: { type: "Recreate" },
24
+ selector: { matchLabels: selectorLabels("lake") },
25
+ template: {
26
+ metadata: { labels: stackLabels("lake") },
27
+ spec: {
28
+ ...stackPodSpec(config),
29
+ terminationGracePeriodSeconds: 60,
30
+ containers: [{
31
+ name: "lake",
32
+ image: imageReference(config.images.lake),
33
+ imagePullPolicy: config.images.pullPolicy,
34
+ env: [
35
+ { name: "LAKE_DATABASE_HOST", value: neonName("compute") },
36
+ { name: "LAKE_DATABASE_PORT", value: "55433" },
37
+ { name: "LAKE_DATA_PATH", value: `s3://${config.objectStore.buckets.lake}/` },
38
+ { name: "LAKE_S3_ENDPOINT", value: s3Endpoint(config) },
39
+ { name: "HOME", value: "/tmp" },
40
+ ],
41
+ envFrom: [{ secretRef: { name } }],
42
+ ports: [{ name: "metrics", containerPort: 9464 }],
43
+ readinessProbe: { ...probe("/readyz"), periodSeconds: 10 },
44
+ livenessProbe: { ...probe("/healthz"), initialDelaySeconds: 60, periodSeconds: 30, failureThreshold: 3 },
45
+ securityContext: { ...restrictedContainer(), readOnlyRootFilesystem: true },
46
+ resources: config.lake.resources,
47
+ volumeMounts: [{ name: "tmp", mountPath: "/tmp" }],
48
+ }],
49
+ volumes: [{ name: "tmp", emptyDir: { sizeLimit: "4Gi" } }],
50
+ },
51
+ },
52
+ },
53
+ };
54
+ return [service, deployment];
55
+ }
56
+ //# sourceMappingURL=lake.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lake.js","sourceRoot":"","sources":["../../../../src/manifests/lake.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,mBAAmB,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG7I,8DAA8D;AAC9D,MAAM,UAAU,WAAW,CAAC,MAAqB;IAC/C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IAC5D,MAAM,IAAI,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACnC,MAAM,OAAO,GAAc;QACzB,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,CA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