@cat-factory/contracts 0.283.0 → 0.284.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/environments-kubernetes.d.ts +720 -0
- package/dist/environments-kubernetes.d.ts.map +1 -0
- package/dist/environments-kubernetes.js +306 -0
- package/dist/environments-kubernetes.js.map +1 -0
- package/dist/environments.d.ts +113 -1517
- package/dist/environments.d.ts.map +1 -1
- package/dist/environments.js +41 -267
- package/dist/environments.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/primitives.d.ts +12 -0
- package/dist/primitives.d.ts.map +1 -1
- package/dist/primitives.js +11 -0
- package/dist/primitives.js.map +1 -1
- package/dist/reserved-env-keys.d.ts.map +1 -1
- package/dist/reserved-env-keys.js +5 -0
- package/dist/reserved-env-keys.js.map +1 -1
- package/dist/routes/environmentUserHandlers.d.ts +3 -3
- package/dist/routes/environments.d.ts +20 -20
- package/dist/runners.js +2 -2
- package/dist/runners.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environments-kubernetes.d.ts","sourceRoot":"","sources":["../src/environments-kubernetes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AA0B5B,4FAA4F;AAC5F,eAAO,MAAM,+BAA+B,aAAa,CAAA;AAmBzD;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,mDAAmC,CAAA;AACxE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE/E;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B;;IAGvC,8EAA8E;;;;;IAM9E,0CAA0C;;IAE1C,sEAAsE;;IAEtE,wDAAwD;;;0BAI1D,CAAA;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC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GAAoG;;;;IAgEtG;;;OAGG;;IAEH,kEAAkE;;IAElE;;;;OAIG;;IAEH,sEAAsE;;IAEtE,kDAAkD;;IAqJlD,iGAAiG;;QA9H/F,gGAAgG;;QAEhG,6EAA6E;;QAE7E,kGAAkG;;QAElG,2DAA2D;;;;;;;;;;;;;IA0H7D,qGAAqG;;QAzFrG,oBAAoB;;QAEpB,8EAA8E;;QAE9E,sDAAsD;;QAEtD,mGAAmG;;QAEnG,gFAAgF;;QAEhF,mCAAmC;;QAEnC,mCAAmC;;YA1BnC,4DAA4D;;YAE5D,oDAAoD;;;QA0BpD,yFAAyF;;;;;;;;;IA6EzF,uFAAuF;;;QAnCrF,2CAA2C;;QAE3C,wCAAwC;;;YAjCxC,+CAA+C;;YAE/C,oEAAoE;;;;YAEpE,gEAAgE;;;;;;;;;;;QAmChE;;;;WAIG;;;YA3CH,+CAA+C;;YAE/C,oEAAoE;;;;YAEpE,gEAAgE;;;;;;;;;;aA4ElE,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE/E;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;IArNpC,uEAAuE;;IAEvE,4FAA4F;;IAE5F,sFAAsF;;aAoNtF,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA"}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { eksClusterFieldsSchema, environmentSecretRefSchema, nonEmpty, urlString, } from './primitives.js';
|
|
3
|
+
// The native Kubernetes ephemeral-environment backend's wire contracts, plus the EKS superset
|
|
4
|
+
// that reuses every one of them. Split out of `environments.ts`, which had grown past its size
|
|
5
|
+
// budget: this is the one block in it that is about a SINGLE backend's config rather than about
|
|
6
|
+
// the environment model every backend shares, and `environments.ts` re-exports nothing of it —
|
|
7
|
+
// the package index exports both files, so an importer sees one surface either way.
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
// Kubernetes ephemeral-environment backend.
|
|
10
|
+
//
|
|
11
|
+
// A native backend that deploys an operator-authored set of k3s/Kubernetes
|
|
12
|
+
// manifests into a per-PR namespace, reached over the kube-apiserver via HTTPS
|
|
13
|
+
// (the same client the Kubernetes RUNNER backend uses). Unlike the manifest
|
|
14
|
+
// HTTP provider, this is NOT a declarative HTTP template: the apiserver is driven
|
|
15
|
+
// directly. The ServiceAccount bearer token lives in the encrypted secret bundle
|
|
16
|
+
// (key `apiToken`, shared with the runner backend); everything non-secret is
|
|
17
|
+
// config here.
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
/** The secret-bundle key the Kubernetes env backend reads the ServiceAccount token from. */
|
|
20
|
+
export const KUBERNETES_ENV_TOKEN_SECRET_KEY = 'apiToken';
|
|
21
|
+
/** A `{{var}}`-templated string rendered against the provision vars. */
|
|
22
|
+
const templateString = v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(500));
|
|
23
|
+
/**
|
|
24
|
+
* A PINNED helm chart version: an exact SemVer (optionally `v`-prefixed, with optional
|
|
25
|
+
* pre-release / build metadata). Floating tags (`latest`, `*`, `^1.0`, `1.x`, ranges) are
|
|
26
|
+
* rejected so provisioning is deterministic.
|
|
27
|
+
*/
|
|
28
|
+
const pinnedChartVersion = v.pipe(v.string(), v.trim(), v.regex(/^v?\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/, 'version must be a pinned semver (e.g. 1.2.3), not a floating tag like latest or ^1.0.'));
|
|
29
|
+
/**
|
|
30
|
+
* How the manifests at `path` are turned into apiserver-ready resources. `raw` (the
|
|
31
|
+
* default, and the only one the in-Worker native REST adapter handles) treats `path` as
|
|
32
|
+
* a single manifest file or a flat directory of already-valid YAML docs. `kustomize`
|
|
33
|
+
* treats `path` as an overlay directory (`kustomization.yaml` + `resources`/`components`/
|
|
34
|
+
* `bases`) that must be `kustomize build`-rendered before apply — which only the
|
|
35
|
+
* container-backed deploy adapter can do (it shells out to real `kustomize`/`helm`).
|
|
36
|
+
*/
|
|
37
|
+
export const kubernetesRendererSchema = v.picklist(['raw', 'kustomize']);
|
|
38
|
+
/**
|
|
39
|
+
* Where the per-PR manifests are read from. `colocated` reads them from the block's
|
|
40
|
+
* own repo at the PR head branch; `separate` reads them from a different repo (the
|
|
41
|
+
* Kubernetes definition often lives outside the service repo). `renderer` (absent ⇒
|
|
42
|
+
* `raw`) selects how `path` is turned into resources; `kustomize` requires the
|
|
43
|
+
* container-backed deploy adapter.
|
|
44
|
+
*/
|
|
45
|
+
export const kubernetesManifestSourceSchema = v.variant('type', [
|
|
46
|
+
v.object({
|
|
47
|
+
type: v.literal('colocated'),
|
|
48
|
+
/** File or directory path within the PR repo (read at the PR head branch). */
|
|
49
|
+
path: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(500)),
|
|
50
|
+
renderer: v.optional(kubernetesRendererSchema),
|
|
51
|
+
}),
|
|
52
|
+
v.object({
|
|
53
|
+
type: v.literal('separate'),
|
|
54
|
+
/** `owner/repo` of the manifests repo. */
|
|
55
|
+
repo: v.pipe(v.string(), v.trim(), v.regex(/^[^/\s]+\/[^/\s]+$/, 'must be "owner/repo"')),
|
|
56
|
+
/** Branch/tag/sha to read at; absent ⇒ that repo's default branch. */
|
|
57
|
+
ref: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1))),
|
|
58
|
+
/** File or directory path within the manifests repo. */
|
|
59
|
+
path: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(500)),
|
|
60
|
+
renderer: v.optional(kubernetesRendererSchema),
|
|
61
|
+
}),
|
|
62
|
+
]);
|
|
63
|
+
/** How the environment URL is derived once the manifests are applied. */
|
|
64
|
+
export const kubernetesUrlSourceSchema = v.variant('source', [
|
|
65
|
+
v.object({
|
|
66
|
+
source: v.literal('ingressTemplate'),
|
|
67
|
+
/** Host template, e.g. `{{branch}}.preview.example.com`; rendered with the provision vars. */
|
|
68
|
+
hostTemplate: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(500)),
|
|
69
|
+
scheme: v.optional(v.picklist(['http', 'https'])),
|
|
70
|
+
}),
|
|
71
|
+
v.object({
|
|
72
|
+
source: v.literal('ingressStatus'),
|
|
73
|
+
/** Ingress object to read `.status.loadBalancer` from; absent ⇒ the only Ingress applied. */
|
|
74
|
+
ingressName: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1))),
|
|
75
|
+
scheme: v.optional(v.picklist(['http', 'https'])),
|
|
76
|
+
}),
|
|
77
|
+
v.object({
|
|
78
|
+
source: v.literal('serviceStatus'),
|
|
79
|
+
/** Service object to read `.status.loadBalancer` (k3s ServiceLB) from. */
|
|
80
|
+
serviceName: v.pipe(v.string(), v.trim(), v.minLength(1)),
|
|
81
|
+
port: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(65535))),
|
|
82
|
+
scheme: v.optional(v.picklist(['http', 'https'])),
|
|
83
|
+
}),
|
|
84
|
+
v.object({
|
|
85
|
+
source: v.literal('gatewayStatus'),
|
|
86
|
+
/** Gateway-API `Gateway` to read `.status.addresses[]` from; absent ⇒ the only one applied. */
|
|
87
|
+
gatewayName: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1))),
|
|
88
|
+
scheme: v.optional(v.picklist(['http', 'https'])),
|
|
89
|
+
}),
|
|
90
|
+
v.object({
|
|
91
|
+
source: v.literal('httpRouteStatus'),
|
|
92
|
+
/** `HTTPRoute` whose `parentRefs` resolve to the Gateway address; absent ⇒ the only one applied. */
|
|
93
|
+
httpRouteName: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1))),
|
|
94
|
+
scheme: v.optional(v.picklist(['http', 'https'])),
|
|
95
|
+
}),
|
|
96
|
+
]);
|
|
97
|
+
/**
|
|
98
|
+
* Whether a stored value is still a `source` this build knows how to derive a URL from —
|
|
99
|
+
* DERIVED from the variant's own members, so it cannot drift from them the way a second
|
|
100
|
+
* hand-written list would (the {@link isBinaryModality} treatment, for the same reason).
|
|
101
|
+
*
|
|
102
|
+
* The discriminant is a closed vocabulary that is nonetheless PERSISTED, on every stored
|
|
103
|
+
* Kubernetes environment config. A reader that maps it through an exhaustive `switch` is
|
|
104
|
+
* therefore total against the TYPE and partial against the DATA: a config written by a
|
|
105
|
+
* deployment that knows a source this one does not falls off the end of every branch. Narrow
|
|
106
|
+
* with this before assigning a stored value anywhere the exhaustive switch will see it.
|
|
107
|
+
*/
|
|
108
|
+
export function isKubernetesUrlSource(value) {
|
|
109
|
+
return typeof value === 'string' && KUBERNETES_URL_SOURCES.has(value);
|
|
110
|
+
}
|
|
111
|
+
const KUBERNETES_URL_SOURCES = new Set(kubernetesUrlSourceSchema.options.map((option) => option.entries.source.literal));
|
|
112
|
+
/**
|
|
113
|
+
* What it takes to REACH a cluster's apiserver, split out of the full config below.
|
|
114
|
+
*
|
|
115
|
+
* Standing an environment up needs the whole config; reclaiming one needs only this. That
|
|
116
|
+
* split is load-bearing rather than cosmetic: a stored config is re-parsed on the way out
|
|
117
|
+
* ({@link parseStoredProviderConfig}), so a `manifestSource` or `url` block that stopped
|
|
118
|
+
* matching the contract would otherwise refuse the teardown too, and an environment nobody
|
|
119
|
+
* can reclaim goes on costing money until a human notices. Teardown validates what it uses
|
|
120
|
+
* and nothing else, so drift in the provisioning half can never strand a live namespace.
|
|
121
|
+
*
|
|
122
|
+
* `apiServerUrl` is not in that forgiving set, deliberately: it stays REQUIRED because there is
|
|
123
|
+
* no safe default for "which cluster", and a DELETE aimed at a guessed one is worse than a
|
|
124
|
+
* refusal.
|
|
125
|
+
*/
|
|
126
|
+
export const kubernetesConnectionConfigSchema = v.object({
|
|
127
|
+
/** kube-apiserver root URL, e.g. `https://my-cluster.example:6443`. */
|
|
128
|
+
apiServerUrl: urlString,
|
|
129
|
+
/** PEM CA bundle to verify the apiserver TLS cert (omit only for a publicly-trusted CA). */
|
|
130
|
+
caCertPem: v.optional(v.string()),
|
|
131
|
+
/** Skip apiserver TLS verification — strongly discouraged; kind/dev clusters only. */
|
|
132
|
+
insecureSkipTlsVerify: v.optional(v.boolean()),
|
|
133
|
+
});
|
|
134
|
+
export const kubernetesEnvironmentConfigSchema = v.object({
|
|
135
|
+
...kubernetesConnectionConfigSchema.entries,
|
|
136
|
+
/** Human label for the connection (shown in the UI). */
|
|
137
|
+
label: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(120)),
|
|
138
|
+
/**
|
|
139
|
+
* Namespace name template for the per-PR environment, e.g. `cf-env-{{pullNumber}}`.
|
|
140
|
+
* Rendered with the provision vars then sanitized to an RFC1123 label; absent ⇒ a
|
|
141
|
+
* default derived from the PR number / block id.
|
|
142
|
+
*/
|
|
143
|
+
namespaceTemplate: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(200))),
|
|
144
|
+
/** Where the manifests are read from (co-located in the PR repo, or a separate repo). */
|
|
145
|
+
manifestSource: kubernetesManifestSourceSchema,
|
|
146
|
+
/** How the environment URL is derived once applied. */
|
|
147
|
+
url: kubernetesUrlSourceSchema,
|
|
148
|
+
/**
|
|
149
|
+
* Optional image reference made available to the manifests as `{{image}}` (e.g. a
|
|
150
|
+
* CI-built image tagged by branch/sha). Itself a template over the provision vars.
|
|
151
|
+
*/
|
|
152
|
+
imageTemplate: v.optional(v.pipe(v.string(), v.trim(), v.maxLength(500))),
|
|
153
|
+
/** Fallback TTL (ms) after which the env is swept + torn down. */
|
|
154
|
+
defaultTtlMs: v.optional(v.pipe(v.number(), v.minValue(60000))),
|
|
155
|
+
/**
|
|
156
|
+
* How long (seconds) the container deploy adapter waits for each Deployment to roll out
|
|
157
|
+
* before reporting the env still `provisioning` (the backend keeps polling). Only the
|
|
158
|
+
* container-backed render path honors it; absent ⇒ the harness default (180s).
|
|
159
|
+
*/
|
|
160
|
+
rolloutTimeoutSeconds: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1))),
|
|
161
|
+
/** Extra labels stamped on the namespace + every applied resource. */
|
|
162
|
+
labels: v.optional(v.record(v.string(), v.string())),
|
|
163
|
+
/** Extra annotations stamped on the namespace. */
|
|
164
|
+
annotations: v.optional(v.record(v.string(), v.string())),
|
|
165
|
+
});
|
|
166
|
+
// ---------------------------------------------------------------------------
|
|
167
|
+
// Kustomize / Helm render inputs (container-backed deploy adapter only).
|
|
168
|
+
//
|
|
169
|
+
// These ride a service's provisioning (the "what/where") and are consumed by the
|
|
170
|
+
// container deploy adapter, which runs real `kubectl`/`kustomize`/`helm`. The native
|
|
171
|
+
// in-Worker REST adapter ignores them (raw manifests only). Values for any `secretRef`
|
|
172
|
+
// resolve from the workspace encrypted bundle at provision time — the config carries
|
|
173
|
+
// secret KEYS, never values (the same invariant the manifest-HTTP provider enforces).
|
|
174
|
+
// ---------------------------------------------------------------------------
|
|
175
|
+
/**
|
|
176
|
+
* A structured image override (the kustomize `images:` equivalent, generalizing the
|
|
177
|
+
* legacy `{{image}}` text substitution). Matches a container image by `name` and
|
|
178
|
+
* overrides its repo and/or tag/digest; the override values are templated over the
|
|
179
|
+
* provision vars (e.g. `newTagTemplate: '{{branch}}'`).
|
|
180
|
+
*/
|
|
181
|
+
export const kubernetesImageOverrideSchema = v.pipe(v.object({
|
|
182
|
+
/** The image to match (the `name:` in a kustomization `images:` entry), e.g. `registry/app`. */
|
|
183
|
+
name: nonEmpty,
|
|
184
|
+
/** Optional replacement repo, templated; absent ⇒ keep the original repo. */
|
|
185
|
+
newNameTemplate: v.optional(templateString),
|
|
186
|
+
/** Replacement tag, templated (e.g. `{{branch}}` / `{{sha}}`); mutually exclusive with digest. */
|
|
187
|
+
newTagTemplate: v.optional(templateString),
|
|
188
|
+
/** Replacement digest, templated; alternative to a tag. */
|
|
189
|
+
digestTemplate: v.optional(templateString),
|
|
190
|
+
}), v.check((o) => o.newNameTemplate !== undefined ||
|
|
191
|
+
o.newTagTemplate !== undefined ||
|
|
192
|
+
o.digestTemplate !== undefined, 'an image override must set at least one of newNameTemplate, newTagTemplate, or digestTemplate.'), v.check((o) => !(o.newTagTemplate !== undefined && o.digestTemplate !== undefined), 'newTagTemplate and digestTemplate are mutually exclusive on an image override.'));
|
|
193
|
+
/** A single templated `--set path=value` for a helm release. */
|
|
194
|
+
export const kubernetesHelmSetSchema = v.object({
|
|
195
|
+
/** Dotted `--set` path, e.g. `config.rateLimit.enabled`. */
|
|
196
|
+
path: nonEmpty,
|
|
197
|
+
/** The value, templated over the provision vars. */
|
|
198
|
+
valueTemplate: v.pipe(v.string(), v.trim(), v.maxLength(2000)),
|
|
199
|
+
});
|
|
200
|
+
/**
|
|
201
|
+
* A helm release the deploy adapter installs/upgrades (`helm upgrade --install`).
|
|
202
|
+
* `scope: 'shared'` is a cluster singleton (installed once, never torn down per-PR —
|
|
203
|
+
* e.g. an ingress/gateway controller); `per-environment` (the default) re-installs in
|
|
204
|
+
* each per-PR namespace. The `version` pin is required so provisioning is deterministic.
|
|
205
|
+
*/
|
|
206
|
+
export const kubernetesHelmReleaseSchema = v.object({
|
|
207
|
+
/** Release name. */
|
|
208
|
+
name: nonEmpty,
|
|
209
|
+
/** Chart ref: an OCI ref (`oci://…`) or, with `repo`, a `repo/chart` name. */
|
|
210
|
+
chart: nonEmpty,
|
|
211
|
+
/** Chart repo URL; absent ⇒ `chart` is an OCI ref. */
|
|
212
|
+
repo: v.optional(urlString),
|
|
213
|
+
/** PINNED chart version, e.g. `1.2.3` / `v1.2.3` (floating tags like `latest`/`^1.0` rejected). */
|
|
214
|
+
version: pinnedChartVersion,
|
|
215
|
+
/** Namespace to install into, templated; absent ⇒ the environment namespace. */
|
|
216
|
+
namespaceTemplate: v.optional(templateString),
|
|
217
|
+
/** Inline `--values` overrides. */
|
|
218
|
+
values: v.optional(v.record(v.string(), v.unknown())),
|
|
219
|
+
/** Templated `--set` overrides. */
|
|
220
|
+
set: v.optional(v.array(kubernetesHelmSetSchema)),
|
|
221
|
+
/** Secret-bundle-backed values folded in at provision time (`--set <path>=<secret>`). */
|
|
222
|
+
valuesSecretRefs: v.optional(v.array(v.object({ path: nonEmpty, secretRef: environmentSecretRefSchema }))),
|
|
223
|
+
scope: v.optional(v.picklist(['per-environment', 'shared'])),
|
|
224
|
+
});
|
|
225
|
+
/** One entry inside an injected Secret: a logical key mapped to a secret-bundle ref OR a templated value. */
|
|
226
|
+
export const kubernetesSecretEntrySchema = v.pipe(v.object({
|
|
227
|
+
/** Key inside the rendered Secret / `.env`. */
|
|
228
|
+
key: v.pipe(v.string(), v.regex(/^[A-Za-z0-9_.-]+$/), v.minLength(1), v.maxLength(256)),
|
|
229
|
+
/** Resolve the value from the workspace encrypted bundle by key. */
|
|
230
|
+
secretRef: v.optional(environmentSecretRefSchema),
|
|
231
|
+
/** OR a non-secret value, templated over the provision vars. */
|
|
232
|
+
valueTemplate: v.optional(v.pipe(v.string(), v.maxLength(2000))),
|
|
233
|
+
}), v.check((e) => (e.secretRef === undefined) !== (e.valueTemplate === undefined), 'a secret entry must set exactly one of secretRef or valueTemplate.'));
|
|
234
|
+
/**
|
|
235
|
+
* How the deploy adapter feeds resolved secret values in before apply, discriminated by
|
|
236
|
+
* `mode`. The mapping of logical keys is in-repo intent; the values resolve from the
|
|
237
|
+
* encrypted bundle at provision time (the config carries secret KEYS, never values).
|
|
238
|
+
*
|
|
239
|
+
* - `secret`: materialize a `Secret` resource named `secretName` directly in the namespace.
|
|
240
|
+
* - `generatorEnvFile`: write the entries as a `KEY=value` `.env` file at `envFilePath`
|
|
241
|
+
* (repo-relative, inside the overlay tree) BEFORE `kustomize build`, so the overlay's own
|
|
242
|
+
* existing `secretGenerator` consumes it. This is the common ephemeral-environment shape
|
|
243
|
+
* where a Component declares `secretGenerator: { envs: ['.env'] }`, the Secret is named by
|
|
244
|
+
* the overlay, and the real `.env` is supplied at deploy time (e.g. from a secrets manager).
|
|
245
|
+
* Use this instead of `secret` when the manifests already declare a `secretGenerator`, so
|
|
246
|
+
* the two don't collide.
|
|
247
|
+
*/
|
|
248
|
+
export const kubernetesSecretInjectionSchema = v.variant('mode', [
|
|
249
|
+
v.object({
|
|
250
|
+
mode: v.literal('secret'),
|
|
251
|
+
/** Target Secret name in the namespace. */
|
|
252
|
+
secretName: nonEmpty,
|
|
253
|
+
/** Secret `type`; absent ⇒ `Opaque`. */
|
|
254
|
+
secretType: v.optional(nonEmpty),
|
|
255
|
+
entries: v.array(kubernetesSecretEntrySchema),
|
|
256
|
+
}),
|
|
257
|
+
v.object({
|
|
258
|
+
mode: v.literal('generatorEnvFile'),
|
|
259
|
+
/**
|
|
260
|
+
* Repo-relative path within the overlay tree to write the `KEY=value` env file the
|
|
261
|
+
* overlay's `secretGenerator` reads (e.g. `overlays/<env>/<component>/.env`). The
|
|
262
|
+
* overlay names the Secret.
|
|
263
|
+
*/
|
|
264
|
+
envFilePath: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(500)),
|
|
265
|
+
entries: v.array(kubernetesSecretEntrySchema),
|
|
266
|
+
}),
|
|
267
|
+
]);
|
|
268
|
+
/**
|
|
269
|
+
* The full Kubernetes provision config the deploy adapter consumes: the combined cluster +
|
|
270
|
+
* URL + manifest-source config PLUS the kustomize/helm render inputs (image overrides, helm
|
|
271
|
+
* releases, secret injections). It is assembled at provision time by MERGING the workspace
|
|
272
|
+
* kube engine config (the "how": apiserver, sizing, shared helm releases) with the service's
|
|
273
|
+
* own provisioning (the "what/where": manifest source, per-environment helm releases, image
|
|
274
|
+
* overrides, secret injections) — so the provider reads everything it needs from one place.
|
|
275
|
+
* The native in-Worker REST adapter ignores the render fields (raw manifests only); the
|
|
276
|
+
* container-backed deploy adapter consumes them. Carries secret KEYS, never values.
|
|
277
|
+
*/
|
|
278
|
+
export const kubernetesProvisionConfigSchema = v.object({
|
|
279
|
+
...kubernetesEnvironmentConfigSchema.entries,
|
|
280
|
+
/** Structured image overrides (the kustomize `images:` shape), templated over provision vars. */
|
|
281
|
+
images: v.optional(v.array(kubernetesImageOverrideSchema)),
|
|
282
|
+
/** Helm releases to install — workspace-shared singletons merged with the service's per-env ones. */
|
|
283
|
+
helmReleases: v.optional(v.array(kubernetesHelmReleaseSchema)),
|
|
284
|
+
/** Secrets fed in before apply (a `Secret` resource or a `secretGenerator` `.env`). */
|
|
285
|
+
secretInjections: v.optional(v.array(kubernetesSecretInjectionSchema)),
|
|
286
|
+
});
|
|
287
|
+
/**
|
|
288
|
+
* The AWS EKS provision config: the full Kubernetes provision config (an EKS apiserver is a
|
|
289
|
+
* standard apiserver, so per-PR namespaces + manifest apply are identical) PLUS the AWS
|
|
290
|
+
* `region` + `clusterName` needed to mint the IAM apiserver token. The AWS credentials ride
|
|
291
|
+
* the secret bundle; the SigV4/STS minting lives in `@cat-factory/eks`.
|
|
292
|
+
*/
|
|
293
|
+
export const eksProvisionConfigSchema = v.object({
|
|
294
|
+
...kubernetesProvisionConfigSchema.entries,
|
|
295
|
+
...eksClusterFieldsSchema.entries,
|
|
296
|
+
});
|
|
297
|
+
/**
|
|
298
|
+
* The EKS counterpart of {@link kubernetesConnectionConfigSchema}: what it takes to reach the
|
|
299
|
+
* cluster, which on EKS includes the AWS coordinates the apiserver token is minted against.
|
|
300
|
+
* Same split, same reason — a reclaim validates the connection and not the provisioning recipe.
|
|
301
|
+
*/
|
|
302
|
+
export const eksConnectionConfigSchema = v.object({
|
|
303
|
+
...kubernetesConnectionConfigSchema.entries,
|
|
304
|
+
...eksClusterFieldsSchema.entries,
|
|
305
|
+
});
|
|
306
|
+
//# sourceMappingURL=environments-kubernetes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environments-kubernetes.js","sourceRoot":"","sources":["../src/environments-kubernetes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,QAAQ,EACR,SAAS,GACV,MAAM,iBAAiB,CAAA;AAExB,8FAA8F;AAC9F,+FAA+F;AAC/F,gGAAgG;AAChG,+FAA+F;AAC/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