@cat-factory/contracts 0.63.0 → 0.64.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.d.ts +1850 -0
- package/dist/environments.d.ts.map +1 -1
- package/dist/environments.js +51 -0
- package/dist/environments.js.map +1 -1
- package/dist/routes/environmentUserHandlers.d.ts +1135 -0
- package/dist/routes/environmentUserHandlers.d.ts.map +1 -0
- package/dist/routes/environmentUserHandlers.js +41 -0
- package/dist/routes/environmentUserHandlers.js.map +1 -0
- package/dist/routes/environments.d.ts +1587 -0
- package/dist/routes/environments.d.ts.map +1 -1
- package/dist/routes/environments.js +47 -1
- package/dist/routes/environments.js.map +1 -1
- package/dist/routes/index.d.ts +1 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +1 -0
- package/dist/routes/index.js.map +1 -1
- package/package.json +1 -1
package/dist/environments.d.ts
CHANGED
|
@@ -1622,6 +1622,1856 @@ export declare const upsertCustomManifestTypeSchema: v.ObjectSchema<{
|
|
|
1622
1622
|
readonly description: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
1623
1623
|
}, undefined>;
|
|
1624
1624
|
export type UpsertCustomManifestTypeInput = v.InferOutput<typeof upsertCustomManifestTypeSchema>;
|
|
1625
|
+
/** One registered infra handler, as exposed to clients (never secret VALUES). */
|
|
1626
|
+
export declare const environmentHandlerViewSchema: v.ObjectSchema<{
|
|
1627
|
+
readonly provisionType: v.PicklistSchema<["kubernetes", "docker-compose", "custom", "infraless"], undefined>;
|
|
1628
|
+
/** For `custom`: the manifest id this handler is keyed to; `null` otherwise. */
|
|
1629
|
+
readonly manifestId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1630
|
+
readonly engine: v.PicklistSchema<["local-docker", "local-k3s", "remote-kubernetes", "remote-custom", "none"], undefined>;
|
|
1631
|
+
readonly providerId: v.StringSchema<undefined>;
|
|
1632
|
+
readonly label: v.StringSchema<undefined>;
|
|
1633
|
+
readonly baseUrl: v.StringSchema<undefined>;
|
|
1634
|
+
readonly connectedAt: v.NumberSchema<undefined>;
|
|
1635
|
+
/** Which secret keys are set (names only), so the UI can show completeness. */
|
|
1636
|
+
readonly secretKeys: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1637
|
+
/** For `remote-custom`: the manifest id this provider accepts; `null` otherwise. */
|
|
1638
|
+
readonly acceptsManifestId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1639
|
+
/** The stored handler config, sans secrets, for connect-form prefill on edit. */
|
|
1640
|
+
readonly config: v.OptionalSchema<v.VariantSchema<"engine", [v.ObjectSchema<{
|
|
1641
|
+
readonly engine: v.LiteralSchema<"local-docker", undefined>;
|
|
1642
|
+
readonly manifest: v.ObjectSchema<{
|
|
1643
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1644
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
1645
|
+
/** Management API root; provision/status/teardown paths are appended to it. */
|
|
1646
|
+
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1647
|
+
readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1648
|
+
readonly type: v.LiteralSchema<"none", undefined>;
|
|
1649
|
+
}, undefined>, v.ObjectSchema<{
|
|
1650
|
+
readonly type: v.LiteralSchema<"api_key", undefined>;
|
|
1651
|
+
readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1652
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1653
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1654
|
+
}, undefined>;
|
|
1655
|
+
/** Optional prefix prepended to the secret value, e.g. `Token `. */
|
|
1656
|
+
readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1657
|
+
}, undefined>, v.ObjectSchema<{
|
|
1658
|
+
readonly type: v.LiteralSchema<"bearer", undefined>;
|
|
1659
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1660
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1661
|
+
}, undefined>;
|
|
1662
|
+
}, undefined>, v.ObjectSchema<{
|
|
1663
|
+
readonly type: v.LiteralSchema<"basic", undefined>;
|
|
1664
|
+
readonly usernameSecretRef: v.ObjectSchema<{
|
|
1665
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1666
|
+
}, undefined>;
|
|
1667
|
+
readonly passwordSecretRef: v.ObjectSchema<{
|
|
1668
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1669
|
+
}, undefined>;
|
|
1670
|
+
}, undefined>, v.ObjectSchema<{
|
|
1671
|
+
readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
|
|
1672
|
+
readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1673
|
+
readonly clientIdSecretRef: v.ObjectSchema<{
|
|
1674
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1675
|
+
}, undefined>;
|
|
1676
|
+
readonly clientSecretSecretRef: v.ObjectSchema<{
|
|
1677
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1678
|
+
}, undefined>;
|
|
1679
|
+
readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1680
|
+
readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1681
|
+
}, undefined>, v.ObjectSchema<{
|
|
1682
|
+
readonly type: v.LiteralSchema<"custom_headers", undefined>;
|
|
1683
|
+
readonly headers: v.ArraySchema<v.ObjectSchema<{
|
|
1684
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1685
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1686
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1687
|
+
}, undefined>;
|
|
1688
|
+
}, undefined>, undefined>;
|
|
1689
|
+
}, undefined>], undefined>;
|
|
1690
|
+
readonly provision: v.ObjectSchema<{
|
|
1691
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1692
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1693
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1694
|
+
readonly key: v.StringSchema<undefined>;
|
|
1695
|
+
readonly value: v.StringSchema<undefined>;
|
|
1696
|
+
}, undefined>, undefined>, undefined>;
|
|
1697
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1698
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1699
|
+
readonly value: v.StringSchema<undefined>;
|
|
1700
|
+
}, undefined>, undefined>, undefined>;
|
|
1701
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1702
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
1703
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1704
|
+
}, undefined>;
|
|
1705
|
+
/** Optional: polled to observe async provisioning progress. */
|
|
1706
|
+
readonly status: v.OptionalSchema<v.ObjectSchema<{
|
|
1707
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1708
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1709
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1710
|
+
readonly key: v.StringSchema<undefined>;
|
|
1711
|
+
readonly value: v.StringSchema<undefined>;
|
|
1712
|
+
}, undefined>, undefined>, undefined>;
|
|
1713
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1714
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1715
|
+
readonly value: v.StringSchema<undefined>;
|
|
1716
|
+
}, undefined>, undefined>, undefined>;
|
|
1717
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1718
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
1719
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1720
|
+
}, undefined>, undefined>;
|
|
1721
|
+
/** Optional: called to destroy the environment (manual or on TTL expiry). */
|
|
1722
|
+
readonly teardown: v.OptionalSchema<v.ObjectSchema<{
|
|
1723
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
1724
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1725
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1726
|
+
readonly key: v.StringSchema<undefined>;
|
|
1727
|
+
readonly value: v.StringSchema<undefined>;
|
|
1728
|
+
}, undefined>, undefined>, undefined>;
|
|
1729
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1730
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1731
|
+
readonly value: v.StringSchema<undefined>;
|
|
1732
|
+
}, undefined>, undefined>, undefined>;
|
|
1733
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1734
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
1735
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
1736
|
+
}, undefined>, undefined>;
|
|
1737
|
+
readonly response: v.ObjectSchema<{
|
|
1738
|
+
readonly urlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1739
|
+
readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1740
|
+
readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1741
|
+
readonly from: v.StringSchema<undefined>;
|
|
1742
|
+
readonly to: v.PicklistSchema<["provisioning", "ready", "failed", "expired", "tearing_down", "torn_down"], undefined>;
|
|
1743
|
+
}, undefined>, undefined>, undefined>;
|
|
1744
|
+
readonly expiresAtPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1745
|
+
readonly externalIdPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1746
|
+
readonly access: v.OptionalSchema<v.ObjectSchema<{
|
|
1747
|
+
readonly scheme: v.PicklistSchema<["none", "bearer", "basic", "custom_header"], undefined>;
|
|
1748
|
+
readonly tokenPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1749
|
+
readonly usernamePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1750
|
+
readonly passwordPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1751
|
+
readonly headerName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1752
|
+
readonly headerValuePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1753
|
+
}, undefined>, undefined>;
|
|
1754
|
+
}, undefined>;
|
|
1755
|
+
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
1756
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
1757
|
+
/**
|
|
1758
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
1759
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
1760
|
+
* entirely; a custom backend — registered by reference into the app-owned
|
|
1761
|
+
* `EnvironmentBackendRegistry` (see `backend/docs/native-environment-adapter.md`) — reads
|
|
1762
|
+
* + validates it off the per-call
|
|
1763
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
1764
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
1765
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
1766
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
1767
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
1768
|
+
*/
|
|
1769
|
+
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
1770
|
+
}, undefined>;
|
|
1771
|
+
}, undefined>, v.ObjectSchema<{
|
|
1772
|
+
readonly engine: v.LiteralSchema<"local-k3s", undefined>;
|
|
1773
|
+
readonly kubernetes: v.ObjectSchema<{
|
|
1774
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
1775
|
+
/** kube-apiserver root URL, e.g. `https://my-cluster.example:6443`. */
|
|
1776
|
+
readonly apiServerUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1777
|
+
/** PEM CA bundle to verify the apiserver TLS cert (omit only for a publicly-trusted CA). */
|
|
1778
|
+
readonly caCertPem: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1779
|
+
/** Skip apiserver TLS verification — strongly discouraged; kind/dev clusters only. */
|
|
1780
|
+
readonly insecureSkipTlsVerify: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1781
|
+
/**
|
|
1782
|
+
* Namespace name template for the per-PR environment, e.g. `cf-env-{{pullNumber}}`. With
|
|
1783
|
+
* `renderer: 'kustomize'`, ABSENT ⇒ honor the overlay's own `namespace:` when it pins one
|
|
1784
|
+
* (the shared-namespace ephemeral-env shape, where base + overlay name a fixed namespace);
|
|
1785
|
+
* SET ⇒ override it (the adapter sets the namespace at build time) for true per-PR
|
|
1786
|
+
* isolation. For raw manifests, absent ⇒ a default derived from the PR number / block id.
|
|
1787
|
+
*/
|
|
1788
|
+
readonly namespaceTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
1789
|
+
/** How the environment URL is derived once applied. */
|
|
1790
|
+
readonly url: v.VariantSchema<"source", [v.ObjectSchema<{
|
|
1791
|
+
readonly source: v.LiteralSchema<"ingressTemplate", undefined>;
|
|
1792
|
+
/** Host template, e.g. `{{branch}}.preview.example.com`; rendered with the provision vars. */
|
|
1793
|
+
readonly hostTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
|
|
1794
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
1795
|
+
}, undefined>, v.ObjectSchema<{
|
|
1796
|
+
readonly source: v.LiteralSchema<"ingressStatus", undefined>;
|
|
1797
|
+
/** Ingress object to read `.status.loadBalancer` from; absent ⇒ the only Ingress applied. */
|
|
1798
|
+
readonly ingressName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
1799
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
1800
|
+
}, undefined>, v.ObjectSchema<{
|
|
1801
|
+
readonly source: v.LiteralSchema<"serviceStatus", undefined>;
|
|
1802
|
+
/** Service object to read `.status.loadBalancer` (k3s ServiceLB) from. */
|
|
1803
|
+
readonly serviceName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
1804
|
+
readonly port: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65535, undefined>]>, undefined>;
|
|
1805
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
1806
|
+
}, undefined>, v.ObjectSchema<{
|
|
1807
|
+
readonly source: v.LiteralSchema<"gatewayStatus", undefined>;
|
|
1808
|
+
/** Gateway-API `Gateway` to read `.status.addresses[]` from; absent ⇒ the only one applied. */
|
|
1809
|
+
readonly gatewayName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
1810
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
1811
|
+
}, undefined>, v.ObjectSchema<{
|
|
1812
|
+
readonly source: v.LiteralSchema<"httpRouteStatus", undefined>;
|
|
1813
|
+
/** `HTTPRoute` whose `parentRefs` resolve to the Gateway address; absent ⇒ the only one applied. */
|
|
1814
|
+
readonly httpRouteName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
1815
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
1816
|
+
}, undefined>], undefined>;
|
|
1817
|
+
/** Optional image reference made available to the manifests as `{{image}}`. */
|
|
1818
|
+
readonly imageTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
1819
|
+
/** Fallback TTL (ms) after which the env is swept + torn down. */
|
|
1820
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
1821
|
+
/** Extra labels stamped on the namespace + every applied resource. */
|
|
1822
|
+
readonly labels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
1823
|
+
/** Extra annotations stamped on the namespace. */
|
|
1824
|
+
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
1825
|
+
/**
|
|
1826
|
+
* Workspace-level (cluster-singleton) helm releases the deploy adapter ensures before
|
|
1827
|
+
* applying a service's manifests — e.g. an ingress/gateway controller shared by every
|
|
1828
|
+
* per-PR env. Use `scope: 'shared'`; installed once, never torn down per-PR. Merged
|
|
1829
|
+
* with the service's own (per-environment) `helmReleases` at provision time.
|
|
1830
|
+
*/
|
|
1831
|
+
readonly helmReleases: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1832
|
+
/** Release name. */
|
|
1833
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1834
|
+
/** Chart ref: an OCI ref (`oci://…`) or, with `repo`, a `repo/chart` name. */
|
|
1835
|
+
readonly chart: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1836
|
+
/** Chart repo URL; absent ⇒ `chart` is an OCI ref. */
|
|
1837
|
+
readonly repo: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
1838
|
+
/** PINNED chart version, e.g. `1.2.3` / `v1.2.3` (floating tags like `latest`/`^1.0` rejected). */
|
|
1839
|
+
readonly version: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "version must be a pinned semver (e.g. 1.2.3), not a floating tag like latest or ^1.0.">]>;
|
|
1840
|
+
/** Namespace to install into, templated; absent ⇒ the environment namespace. */
|
|
1841
|
+
readonly namespaceTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
1842
|
+
/** Inline `--values` overrides. */
|
|
1843
|
+
readonly values: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
1844
|
+
/** Templated `--set` overrides. */
|
|
1845
|
+
readonly set: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1846
|
+
/** Dotted `--set` path, e.g. `config.rateLimit.enabled`. */
|
|
1847
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1848
|
+
/** The value, templated over the provision vars. */
|
|
1849
|
+
readonly valueTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1850
|
+
}, undefined>, undefined>, undefined>;
|
|
1851
|
+
/** Secret-bundle-backed values folded in at provision time (`--set <path>=<secret>`). */
|
|
1852
|
+
readonly valuesSecretRefs: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1853
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1854
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1855
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1856
|
+
}, undefined>;
|
|
1857
|
+
}, undefined>, undefined>, undefined>;
|
|
1858
|
+
readonly scope: v.OptionalSchema<v.PicklistSchema<["per-environment", "shared"], undefined>, undefined>;
|
|
1859
|
+
}, undefined>, undefined>, undefined>;
|
|
1860
|
+
}, undefined>;
|
|
1861
|
+
}, undefined>, v.ObjectSchema<{
|
|
1862
|
+
readonly engine: v.LiteralSchema<"remote-kubernetes", undefined>;
|
|
1863
|
+
readonly kubernetes: v.ObjectSchema<{
|
|
1864
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
1865
|
+
/** kube-apiserver root URL, e.g. `https://my-cluster.example:6443`. */
|
|
1866
|
+
readonly apiServerUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1867
|
+
/** PEM CA bundle to verify the apiserver TLS cert (omit only for a publicly-trusted CA). */
|
|
1868
|
+
readonly caCertPem: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1869
|
+
/** Skip apiserver TLS verification — strongly discouraged; kind/dev clusters only. */
|
|
1870
|
+
readonly insecureSkipTlsVerify: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1871
|
+
/**
|
|
1872
|
+
* Namespace name template for the per-PR environment, e.g. `cf-env-{{pullNumber}}`. With
|
|
1873
|
+
* `renderer: 'kustomize'`, ABSENT ⇒ honor the overlay's own `namespace:` when it pins one
|
|
1874
|
+
* (the shared-namespace ephemeral-env shape, where base + overlay name a fixed namespace);
|
|
1875
|
+
* SET ⇒ override it (the adapter sets the namespace at build time) for true per-PR
|
|
1876
|
+
* isolation. For raw manifests, absent ⇒ a default derived from the PR number / block id.
|
|
1877
|
+
*/
|
|
1878
|
+
readonly namespaceTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
1879
|
+
/** How the environment URL is derived once applied. */
|
|
1880
|
+
readonly url: v.VariantSchema<"source", [v.ObjectSchema<{
|
|
1881
|
+
readonly source: v.LiteralSchema<"ingressTemplate", undefined>;
|
|
1882
|
+
/** Host template, e.g. `{{branch}}.preview.example.com`; rendered with the provision vars. */
|
|
1883
|
+
readonly hostTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
|
|
1884
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
1885
|
+
}, undefined>, v.ObjectSchema<{
|
|
1886
|
+
readonly source: v.LiteralSchema<"ingressStatus", undefined>;
|
|
1887
|
+
/** Ingress object to read `.status.loadBalancer` from; absent ⇒ the only Ingress applied. */
|
|
1888
|
+
readonly ingressName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
1889
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
1890
|
+
}, undefined>, v.ObjectSchema<{
|
|
1891
|
+
readonly source: v.LiteralSchema<"serviceStatus", undefined>;
|
|
1892
|
+
/** Service object to read `.status.loadBalancer` (k3s ServiceLB) from. */
|
|
1893
|
+
readonly serviceName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
1894
|
+
readonly port: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65535, undefined>]>, undefined>;
|
|
1895
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
1896
|
+
}, undefined>, v.ObjectSchema<{
|
|
1897
|
+
readonly source: v.LiteralSchema<"gatewayStatus", undefined>;
|
|
1898
|
+
/** Gateway-API `Gateway` to read `.status.addresses[]` from; absent ⇒ the only one applied. */
|
|
1899
|
+
readonly gatewayName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
1900
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
1901
|
+
}, undefined>, v.ObjectSchema<{
|
|
1902
|
+
readonly source: v.LiteralSchema<"httpRouteStatus", undefined>;
|
|
1903
|
+
/** `HTTPRoute` whose `parentRefs` resolve to the Gateway address; absent ⇒ the only one applied. */
|
|
1904
|
+
readonly httpRouteName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
1905
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
1906
|
+
}, undefined>], undefined>;
|
|
1907
|
+
/** Optional image reference made available to the manifests as `{{image}}`. */
|
|
1908
|
+
readonly imageTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
1909
|
+
/** Fallback TTL (ms) after which the env is swept + torn down. */
|
|
1910
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
1911
|
+
/** Extra labels stamped on the namespace + every applied resource. */
|
|
1912
|
+
readonly labels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
1913
|
+
/** Extra annotations stamped on the namespace. */
|
|
1914
|
+
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
1915
|
+
/**
|
|
1916
|
+
* Workspace-level (cluster-singleton) helm releases the deploy adapter ensures before
|
|
1917
|
+
* applying a service's manifests — e.g. an ingress/gateway controller shared by every
|
|
1918
|
+
* per-PR env. Use `scope: 'shared'`; installed once, never torn down per-PR. Merged
|
|
1919
|
+
* with the service's own (per-environment) `helmReleases` at provision time.
|
|
1920
|
+
*/
|
|
1921
|
+
readonly helmReleases: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1922
|
+
/** Release name. */
|
|
1923
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1924
|
+
/** Chart ref: an OCI ref (`oci://…`) or, with `repo`, a `repo/chart` name. */
|
|
1925
|
+
readonly chart: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1926
|
+
/** Chart repo URL; absent ⇒ `chart` is an OCI ref. */
|
|
1927
|
+
readonly repo: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
1928
|
+
/** PINNED chart version, e.g. `1.2.3` / `v1.2.3` (floating tags like `latest`/`^1.0` rejected). */
|
|
1929
|
+
readonly version: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "version must be a pinned semver (e.g. 1.2.3), not a floating tag like latest or ^1.0.">]>;
|
|
1930
|
+
/** Namespace to install into, templated; absent ⇒ the environment namespace. */
|
|
1931
|
+
readonly namespaceTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
1932
|
+
/** Inline `--values` overrides. */
|
|
1933
|
+
readonly values: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
1934
|
+
/** Templated `--set` overrides. */
|
|
1935
|
+
readonly set: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1936
|
+
/** Dotted `--set` path, e.g. `config.rateLimit.enabled`. */
|
|
1937
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1938
|
+
/** The value, templated over the provision vars. */
|
|
1939
|
+
readonly valueTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1940
|
+
}, undefined>, undefined>, undefined>;
|
|
1941
|
+
/** Secret-bundle-backed values folded in at provision time (`--set <path>=<secret>`). */
|
|
1942
|
+
readonly valuesSecretRefs: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1943
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1944
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1945
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1946
|
+
}, undefined>;
|
|
1947
|
+
}, undefined>, undefined>, undefined>;
|
|
1948
|
+
readonly scope: v.OptionalSchema<v.PicklistSchema<["per-environment", "shared"], undefined>, undefined>;
|
|
1949
|
+
}, undefined>, undefined>, undefined>;
|
|
1950
|
+
}, undefined>;
|
|
1951
|
+
}, undefined>, v.ObjectSchema<{
|
|
1952
|
+
readonly engine: v.LiteralSchema<"remote-custom", undefined>;
|
|
1953
|
+
readonly manifest: v.ObjectSchema<{
|
|
1954
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1955
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
1956
|
+
/** Management API root; provision/status/teardown paths are appended to it. */
|
|
1957
|
+
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1958
|
+
readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1959
|
+
readonly type: v.LiteralSchema<"none", undefined>;
|
|
1960
|
+
}, undefined>, v.ObjectSchema<{
|
|
1961
|
+
readonly type: v.LiteralSchema<"api_key", undefined>;
|
|
1962
|
+
readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1963
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1964
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1965
|
+
}, undefined>;
|
|
1966
|
+
/** Optional prefix prepended to the secret value, e.g. `Token `. */
|
|
1967
|
+
readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1968
|
+
}, undefined>, v.ObjectSchema<{
|
|
1969
|
+
readonly type: v.LiteralSchema<"bearer", undefined>;
|
|
1970
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1971
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1972
|
+
}, undefined>;
|
|
1973
|
+
}, undefined>, v.ObjectSchema<{
|
|
1974
|
+
readonly type: v.LiteralSchema<"basic", undefined>;
|
|
1975
|
+
readonly usernameSecretRef: v.ObjectSchema<{
|
|
1976
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1977
|
+
}, undefined>;
|
|
1978
|
+
readonly passwordSecretRef: v.ObjectSchema<{
|
|
1979
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1980
|
+
}, undefined>;
|
|
1981
|
+
}, undefined>, v.ObjectSchema<{
|
|
1982
|
+
readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
|
|
1983
|
+
readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
1984
|
+
readonly clientIdSecretRef: v.ObjectSchema<{
|
|
1985
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1986
|
+
}, undefined>;
|
|
1987
|
+
readonly clientSecretSecretRef: v.ObjectSchema<{
|
|
1988
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1989
|
+
}, undefined>;
|
|
1990
|
+
readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1991
|
+
readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1992
|
+
}, undefined>, v.ObjectSchema<{
|
|
1993
|
+
readonly type: v.LiteralSchema<"custom_headers", undefined>;
|
|
1994
|
+
readonly headers: v.ArraySchema<v.ObjectSchema<{
|
|
1995
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1996
|
+
readonly secretRef: v.ObjectSchema<{
|
|
1997
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1998
|
+
}, undefined>;
|
|
1999
|
+
}, undefined>, undefined>;
|
|
2000
|
+
}, undefined>], undefined>;
|
|
2001
|
+
readonly provision: v.ObjectSchema<{
|
|
2002
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
2003
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2004
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2005
|
+
readonly key: v.StringSchema<undefined>;
|
|
2006
|
+
readonly value: v.StringSchema<undefined>;
|
|
2007
|
+
}, undefined>, undefined>, undefined>;
|
|
2008
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2009
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2010
|
+
readonly value: v.StringSchema<undefined>;
|
|
2011
|
+
}, undefined>, undefined>, undefined>;
|
|
2012
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2013
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
2014
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
2015
|
+
}, undefined>;
|
|
2016
|
+
/** Optional: polled to observe async provisioning progress. */
|
|
2017
|
+
readonly status: v.OptionalSchema<v.ObjectSchema<{
|
|
2018
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
2019
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2020
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2021
|
+
readonly key: v.StringSchema<undefined>;
|
|
2022
|
+
readonly value: v.StringSchema<undefined>;
|
|
2023
|
+
}, undefined>, undefined>, undefined>;
|
|
2024
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2025
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2026
|
+
readonly value: v.StringSchema<undefined>;
|
|
2027
|
+
}, undefined>, undefined>, undefined>;
|
|
2028
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2029
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
2030
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
2031
|
+
}, undefined>, undefined>;
|
|
2032
|
+
/** Optional: called to destroy the environment (manual or on TTL expiry). */
|
|
2033
|
+
readonly teardown: v.OptionalSchema<v.ObjectSchema<{
|
|
2034
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
2035
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2036
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2037
|
+
readonly key: v.StringSchema<undefined>;
|
|
2038
|
+
readonly value: v.StringSchema<undefined>;
|
|
2039
|
+
}, undefined>, undefined>, undefined>;
|
|
2040
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2041
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2042
|
+
readonly value: v.StringSchema<undefined>;
|
|
2043
|
+
}, undefined>, undefined>, undefined>;
|
|
2044
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2045
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
2046
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
2047
|
+
}, undefined>, undefined>;
|
|
2048
|
+
readonly response: v.ObjectSchema<{
|
|
2049
|
+
readonly urlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2050
|
+
readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2051
|
+
readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2052
|
+
readonly from: v.StringSchema<undefined>;
|
|
2053
|
+
readonly to: v.PicklistSchema<["provisioning", "ready", "failed", "expired", "tearing_down", "torn_down"], undefined>;
|
|
2054
|
+
}, undefined>, undefined>, undefined>;
|
|
2055
|
+
readonly expiresAtPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2056
|
+
readonly externalIdPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2057
|
+
readonly access: v.OptionalSchema<v.ObjectSchema<{
|
|
2058
|
+
readonly scheme: v.PicklistSchema<["none", "bearer", "basic", "custom_header"], undefined>;
|
|
2059
|
+
readonly tokenPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2060
|
+
readonly usernamePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2061
|
+
readonly passwordPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2062
|
+
readonly headerName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2063
|
+
readonly headerValuePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2064
|
+
}, undefined>, undefined>;
|
|
2065
|
+
}, undefined>;
|
|
2066
|
+
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
2067
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
2068
|
+
/**
|
|
2069
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
2070
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
2071
|
+
* entirely; a custom backend — registered by reference into the app-owned
|
|
2072
|
+
* `EnvironmentBackendRegistry` (see `backend/docs/native-environment-adapter.md`) — reads
|
|
2073
|
+
* + validates it off the per-call
|
|
2074
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
2075
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
2076
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
2077
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
2078
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
2079
|
+
*/
|
|
2080
|
+
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
2081
|
+
}, undefined>;
|
|
2082
|
+
/** Which custom manifest shape this remote provider consumes — matched to a service's `manifestId`. */
|
|
2083
|
+
readonly acceptsManifestId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2084
|
+
}, undefined>], undefined>, undefined>;
|
|
2085
|
+
}, undefined>;
|
|
2086
|
+
export type EnvironmentHandlerView = v.InferOutput<typeof environmentHandlerViewSchema>;
|
|
2087
|
+
/**
|
|
2088
|
+
* Register (or replace) one per-type infra handler: the engine connection config + its
|
|
2089
|
+
* secret bundle (write-only). `manifestId` keys a `custom` handler to a specific manifest
|
|
2090
|
+
* id; `backendKind` pins the registry backend that builds the provider (else resolved from
|
|
2091
|
+
* the engine). Every secret key the chosen backend references must be supplied.
|
|
2092
|
+
*/
|
|
2093
|
+
export declare const registerEnvironmentHandlerSchema: v.ObjectSchema<{
|
|
2094
|
+
readonly provisionType: v.PicklistSchema<["kubernetes", "docker-compose", "custom", "infraless"], undefined>;
|
|
2095
|
+
readonly manifestId: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>, undefined>;
|
|
2096
|
+
readonly config: v.VariantSchema<"engine", [v.ObjectSchema<{
|
|
2097
|
+
readonly engine: v.LiteralSchema<"local-docker", undefined>;
|
|
2098
|
+
readonly manifest: v.ObjectSchema<{
|
|
2099
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2100
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
2101
|
+
/** Management API root; provision/status/teardown paths are appended to it. */
|
|
2102
|
+
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2103
|
+
readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
2104
|
+
readonly type: v.LiteralSchema<"none", undefined>;
|
|
2105
|
+
}, undefined>, v.ObjectSchema<{
|
|
2106
|
+
readonly type: v.LiteralSchema<"api_key", undefined>;
|
|
2107
|
+
readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2108
|
+
readonly secretRef: v.ObjectSchema<{
|
|
2109
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2110
|
+
}, undefined>;
|
|
2111
|
+
/** Optional prefix prepended to the secret value, e.g. `Token `. */
|
|
2112
|
+
readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2113
|
+
}, undefined>, v.ObjectSchema<{
|
|
2114
|
+
readonly type: v.LiteralSchema<"bearer", undefined>;
|
|
2115
|
+
readonly secretRef: v.ObjectSchema<{
|
|
2116
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2117
|
+
}, undefined>;
|
|
2118
|
+
}, undefined>, v.ObjectSchema<{
|
|
2119
|
+
readonly type: v.LiteralSchema<"basic", undefined>;
|
|
2120
|
+
readonly usernameSecretRef: v.ObjectSchema<{
|
|
2121
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2122
|
+
}, undefined>;
|
|
2123
|
+
readonly passwordSecretRef: v.ObjectSchema<{
|
|
2124
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2125
|
+
}, undefined>;
|
|
2126
|
+
}, undefined>, v.ObjectSchema<{
|
|
2127
|
+
readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
|
|
2128
|
+
readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2129
|
+
readonly clientIdSecretRef: v.ObjectSchema<{
|
|
2130
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2131
|
+
}, undefined>;
|
|
2132
|
+
readonly clientSecretSecretRef: v.ObjectSchema<{
|
|
2133
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2134
|
+
}, undefined>;
|
|
2135
|
+
readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2136
|
+
readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2137
|
+
}, undefined>, v.ObjectSchema<{
|
|
2138
|
+
readonly type: v.LiteralSchema<"custom_headers", undefined>;
|
|
2139
|
+
readonly headers: v.ArraySchema<v.ObjectSchema<{
|
|
2140
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2141
|
+
readonly secretRef: v.ObjectSchema<{
|
|
2142
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2143
|
+
}, undefined>;
|
|
2144
|
+
}, undefined>, undefined>;
|
|
2145
|
+
}, undefined>], undefined>;
|
|
2146
|
+
readonly provision: v.ObjectSchema<{
|
|
2147
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
2148
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2149
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2150
|
+
readonly key: v.StringSchema<undefined>;
|
|
2151
|
+
readonly value: v.StringSchema<undefined>;
|
|
2152
|
+
}, undefined>, undefined>, undefined>;
|
|
2153
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2154
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2155
|
+
readonly value: v.StringSchema<undefined>;
|
|
2156
|
+
}, undefined>, undefined>, undefined>;
|
|
2157
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2158
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
2159
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
2160
|
+
}, undefined>;
|
|
2161
|
+
/** Optional: polled to observe async provisioning progress. */
|
|
2162
|
+
readonly status: v.OptionalSchema<v.ObjectSchema<{
|
|
2163
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
2164
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2165
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2166
|
+
readonly key: v.StringSchema<undefined>;
|
|
2167
|
+
readonly value: v.StringSchema<undefined>;
|
|
2168
|
+
}, undefined>, undefined>, undefined>;
|
|
2169
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2170
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2171
|
+
readonly value: v.StringSchema<undefined>;
|
|
2172
|
+
}, undefined>, undefined>, undefined>;
|
|
2173
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2174
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
2175
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
2176
|
+
}, undefined>, undefined>;
|
|
2177
|
+
/** Optional: called to destroy the environment (manual or on TTL expiry). */
|
|
2178
|
+
readonly teardown: v.OptionalSchema<v.ObjectSchema<{
|
|
2179
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
2180
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2181
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2182
|
+
readonly key: v.StringSchema<undefined>;
|
|
2183
|
+
readonly value: v.StringSchema<undefined>;
|
|
2184
|
+
}, undefined>, undefined>, undefined>;
|
|
2185
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2186
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2187
|
+
readonly value: v.StringSchema<undefined>;
|
|
2188
|
+
}, undefined>, undefined>, undefined>;
|
|
2189
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2190
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
2191
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
2192
|
+
}, undefined>, undefined>;
|
|
2193
|
+
readonly response: v.ObjectSchema<{
|
|
2194
|
+
readonly urlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2195
|
+
readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2196
|
+
readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2197
|
+
readonly from: v.StringSchema<undefined>;
|
|
2198
|
+
readonly to: v.PicklistSchema<["provisioning", "ready", "failed", "expired", "tearing_down", "torn_down"], undefined>;
|
|
2199
|
+
}, undefined>, undefined>, undefined>;
|
|
2200
|
+
readonly expiresAtPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2201
|
+
readonly externalIdPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2202
|
+
readonly access: v.OptionalSchema<v.ObjectSchema<{
|
|
2203
|
+
readonly scheme: v.PicklistSchema<["none", "bearer", "basic", "custom_header"], undefined>;
|
|
2204
|
+
readonly tokenPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2205
|
+
readonly usernamePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2206
|
+
readonly passwordPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2207
|
+
readonly headerName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2208
|
+
readonly headerValuePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2209
|
+
}, undefined>, undefined>;
|
|
2210
|
+
}, undefined>;
|
|
2211
|
+
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
2212
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
2213
|
+
/**
|
|
2214
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
2215
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
2216
|
+
* entirely; a custom backend — registered by reference into the app-owned
|
|
2217
|
+
* `EnvironmentBackendRegistry` (see `backend/docs/native-environment-adapter.md`) — reads
|
|
2218
|
+
* + validates it off the per-call
|
|
2219
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
2220
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
2221
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
2222
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
2223
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
2224
|
+
*/
|
|
2225
|
+
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
2226
|
+
}, undefined>;
|
|
2227
|
+
}, undefined>, v.ObjectSchema<{
|
|
2228
|
+
readonly engine: v.LiteralSchema<"local-k3s", undefined>;
|
|
2229
|
+
readonly kubernetes: v.ObjectSchema<{
|
|
2230
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
2231
|
+
/** kube-apiserver root URL, e.g. `https://my-cluster.example:6443`. */
|
|
2232
|
+
readonly apiServerUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2233
|
+
/** PEM CA bundle to verify the apiserver TLS cert (omit only for a publicly-trusted CA). */
|
|
2234
|
+
readonly caCertPem: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2235
|
+
/** Skip apiserver TLS verification — strongly discouraged; kind/dev clusters only. */
|
|
2236
|
+
readonly insecureSkipTlsVerify: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2237
|
+
/**
|
|
2238
|
+
* Namespace name template for the per-PR environment, e.g. `cf-env-{{pullNumber}}`. With
|
|
2239
|
+
* `renderer: 'kustomize'`, ABSENT ⇒ honor the overlay's own `namespace:` when it pins one
|
|
2240
|
+
* (the shared-namespace ephemeral-env shape, where base + overlay name a fixed namespace);
|
|
2241
|
+
* SET ⇒ override it (the adapter sets the namespace at build time) for true per-PR
|
|
2242
|
+
* isolation. For raw manifests, absent ⇒ a default derived from the PR number / block id.
|
|
2243
|
+
*/
|
|
2244
|
+
readonly namespaceTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
2245
|
+
/** How the environment URL is derived once applied. */
|
|
2246
|
+
readonly url: v.VariantSchema<"source", [v.ObjectSchema<{
|
|
2247
|
+
readonly source: v.LiteralSchema<"ingressTemplate", undefined>;
|
|
2248
|
+
/** Host template, e.g. `{{branch}}.preview.example.com`; rendered with the provision vars. */
|
|
2249
|
+
readonly hostTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
|
|
2250
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2251
|
+
}, undefined>, v.ObjectSchema<{
|
|
2252
|
+
readonly source: v.LiteralSchema<"ingressStatus", undefined>;
|
|
2253
|
+
/** Ingress object to read `.status.loadBalancer` from; absent ⇒ the only Ingress applied. */
|
|
2254
|
+
readonly ingressName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
2255
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2256
|
+
}, undefined>, v.ObjectSchema<{
|
|
2257
|
+
readonly source: v.LiteralSchema<"serviceStatus", undefined>;
|
|
2258
|
+
/** Service object to read `.status.loadBalancer` (k3s ServiceLB) from. */
|
|
2259
|
+
readonly serviceName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
2260
|
+
readonly port: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65535, undefined>]>, undefined>;
|
|
2261
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2262
|
+
}, undefined>, v.ObjectSchema<{
|
|
2263
|
+
readonly source: v.LiteralSchema<"gatewayStatus", undefined>;
|
|
2264
|
+
/** Gateway-API `Gateway` to read `.status.addresses[]` from; absent ⇒ the only one applied. */
|
|
2265
|
+
readonly gatewayName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
2266
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2267
|
+
}, undefined>, v.ObjectSchema<{
|
|
2268
|
+
readonly source: v.LiteralSchema<"httpRouteStatus", undefined>;
|
|
2269
|
+
/** `HTTPRoute` whose `parentRefs` resolve to the Gateway address; absent ⇒ the only one applied. */
|
|
2270
|
+
readonly httpRouteName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
2271
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2272
|
+
}, undefined>], undefined>;
|
|
2273
|
+
/** Optional image reference made available to the manifests as `{{image}}`. */
|
|
2274
|
+
readonly imageTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
2275
|
+
/** Fallback TTL (ms) after which the env is swept + torn down. */
|
|
2276
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
2277
|
+
/** Extra labels stamped on the namespace + every applied resource. */
|
|
2278
|
+
readonly labels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
2279
|
+
/** Extra annotations stamped on the namespace. */
|
|
2280
|
+
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
2281
|
+
/**
|
|
2282
|
+
* Workspace-level (cluster-singleton) helm releases the deploy adapter ensures before
|
|
2283
|
+
* applying a service's manifests — e.g. an ingress/gateway controller shared by every
|
|
2284
|
+
* per-PR env. Use `scope: 'shared'`; installed once, never torn down per-PR. Merged
|
|
2285
|
+
* with the service's own (per-environment) `helmReleases` at provision time.
|
|
2286
|
+
*/
|
|
2287
|
+
readonly helmReleases: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2288
|
+
/** Release name. */
|
|
2289
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2290
|
+
/** Chart ref: an OCI ref (`oci://…`) or, with `repo`, a `repo/chart` name. */
|
|
2291
|
+
readonly chart: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2292
|
+
/** Chart repo URL; absent ⇒ `chart` is an OCI ref. */
|
|
2293
|
+
readonly repo: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
2294
|
+
/** PINNED chart version, e.g. `1.2.3` / `v1.2.3` (floating tags like `latest`/`^1.0` rejected). */
|
|
2295
|
+
readonly version: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "version must be a pinned semver (e.g. 1.2.3), not a floating tag like latest or ^1.0.">]>;
|
|
2296
|
+
/** Namespace to install into, templated; absent ⇒ the environment namespace. */
|
|
2297
|
+
readonly namespaceTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
2298
|
+
/** Inline `--values` overrides. */
|
|
2299
|
+
readonly values: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
2300
|
+
/** Templated `--set` overrides. */
|
|
2301
|
+
readonly set: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2302
|
+
/** Dotted `--set` path, e.g. `config.rateLimit.enabled`. */
|
|
2303
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2304
|
+
/** The value, templated over the provision vars. */
|
|
2305
|
+
readonly valueTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2306
|
+
}, undefined>, undefined>, undefined>;
|
|
2307
|
+
/** Secret-bundle-backed values folded in at provision time (`--set <path>=<secret>`). */
|
|
2308
|
+
readonly valuesSecretRefs: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2309
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2310
|
+
readonly secretRef: v.ObjectSchema<{
|
|
2311
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2312
|
+
}, undefined>;
|
|
2313
|
+
}, undefined>, undefined>, undefined>;
|
|
2314
|
+
readonly scope: v.OptionalSchema<v.PicklistSchema<["per-environment", "shared"], undefined>, undefined>;
|
|
2315
|
+
}, undefined>, undefined>, undefined>;
|
|
2316
|
+
}, undefined>;
|
|
2317
|
+
}, undefined>, v.ObjectSchema<{
|
|
2318
|
+
readonly engine: v.LiteralSchema<"remote-kubernetes", undefined>;
|
|
2319
|
+
readonly kubernetes: v.ObjectSchema<{
|
|
2320
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
2321
|
+
/** kube-apiserver root URL, e.g. `https://my-cluster.example:6443`. */
|
|
2322
|
+
readonly apiServerUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2323
|
+
/** PEM CA bundle to verify the apiserver TLS cert (omit only for a publicly-trusted CA). */
|
|
2324
|
+
readonly caCertPem: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2325
|
+
/** Skip apiserver TLS verification — strongly discouraged; kind/dev clusters only. */
|
|
2326
|
+
readonly insecureSkipTlsVerify: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2327
|
+
/**
|
|
2328
|
+
* Namespace name template for the per-PR environment, e.g. `cf-env-{{pullNumber}}`. With
|
|
2329
|
+
* `renderer: 'kustomize'`, ABSENT ⇒ honor the overlay's own `namespace:` when it pins one
|
|
2330
|
+
* (the shared-namespace ephemeral-env shape, where base + overlay name a fixed namespace);
|
|
2331
|
+
* SET ⇒ override it (the adapter sets the namespace at build time) for true per-PR
|
|
2332
|
+
* isolation. For raw manifests, absent ⇒ a default derived from the PR number / block id.
|
|
2333
|
+
*/
|
|
2334
|
+
readonly namespaceTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
2335
|
+
/** How the environment URL is derived once applied. */
|
|
2336
|
+
readonly url: v.VariantSchema<"source", [v.ObjectSchema<{
|
|
2337
|
+
readonly source: v.LiteralSchema<"ingressTemplate", undefined>;
|
|
2338
|
+
/** Host template, e.g. `{{branch}}.preview.example.com`; rendered with the provision vars. */
|
|
2339
|
+
readonly hostTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
|
|
2340
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2341
|
+
}, undefined>, v.ObjectSchema<{
|
|
2342
|
+
readonly source: v.LiteralSchema<"ingressStatus", undefined>;
|
|
2343
|
+
/** Ingress object to read `.status.loadBalancer` from; absent ⇒ the only Ingress applied. */
|
|
2344
|
+
readonly ingressName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
2345
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2346
|
+
}, undefined>, v.ObjectSchema<{
|
|
2347
|
+
readonly source: v.LiteralSchema<"serviceStatus", undefined>;
|
|
2348
|
+
/** Service object to read `.status.loadBalancer` (k3s ServiceLB) from. */
|
|
2349
|
+
readonly serviceName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
2350
|
+
readonly port: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65535, undefined>]>, undefined>;
|
|
2351
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2352
|
+
}, undefined>, v.ObjectSchema<{
|
|
2353
|
+
readonly source: v.LiteralSchema<"gatewayStatus", undefined>;
|
|
2354
|
+
/** Gateway-API `Gateway` to read `.status.addresses[]` from; absent ⇒ the only one applied. */
|
|
2355
|
+
readonly gatewayName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
2356
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2357
|
+
}, undefined>, v.ObjectSchema<{
|
|
2358
|
+
readonly source: v.LiteralSchema<"httpRouteStatus", undefined>;
|
|
2359
|
+
/** `HTTPRoute` whose `parentRefs` resolve to the Gateway address; absent ⇒ the only one applied. */
|
|
2360
|
+
readonly httpRouteName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
2361
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2362
|
+
}, undefined>], undefined>;
|
|
2363
|
+
/** Optional image reference made available to the manifests as `{{image}}`. */
|
|
2364
|
+
readonly imageTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
2365
|
+
/** Fallback TTL (ms) after which the env is swept + torn down. */
|
|
2366
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
2367
|
+
/** Extra labels stamped on the namespace + every applied resource. */
|
|
2368
|
+
readonly labels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
2369
|
+
/** Extra annotations stamped on the namespace. */
|
|
2370
|
+
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
2371
|
+
/**
|
|
2372
|
+
* Workspace-level (cluster-singleton) helm releases the deploy adapter ensures before
|
|
2373
|
+
* applying a service's manifests — e.g. an ingress/gateway controller shared by every
|
|
2374
|
+
* per-PR env. Use `scope: 'shared'`; installed once, never torn down per-PR. Merged
|
|
2375
|
+
* with the service's own (per-environment) `helmReleases` at provision time.
|
|
2376
|
+
*/
|
|
2377
|
+
readonly helmReleases: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2378
|
+
/** Release name. */
|
|
2379
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2380
|
+
/** Chart ref: an OCI ref (`oci://…`) or, with `repo`, a `repo/chart` name. */
|
|
2381
|
+
readonly chart: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2382
|
+
/** Chart repo URL; absent ⇒ `chart` is an OCI ref. */
|
|
2383
|
+
readonly repo: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
2384
|
+
/** PINNED chart version, e.g. `1.2.3` / `v1.2.3` (floating tags like `latest`/`^1.0` rejected). */
|
|
2385
|
+
readonly version: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "version must be a pinned semver (e.g. 1.2.3), not a floating tag like latest or ^1.0.">]>;
|
|
2386
|
+
/** Namespace to install into, templated; absent ⇒ the environment namespace. */
|
|
2387
|
+
readonly namespaceTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
2388
|
+
/** Inline `--values` overrides. */
|
|
2389
|
+
readonly values: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
2390
|
+
/** Templated `--set` overrides. */
|
|
2391
|
+
readonly set: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2392
|
+
/** Dotted `--set` path, e.g. `config.rateLimit.enabled`. */
|
|
2393
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2394
|
+
/** The value, templated over the provision vars. */
|
|
2395
|
+
readonly valueTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2396
|
+
}, undefined>, undefined>, undefined>;
|
|
2397
|
+
/** Secret-bundle-backed values folded in at provision time (`--set <path>=<secret>`). */
|
|
2398
|
+
readonly valuesSecretRefs: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2399
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2400
|
+
readonly secretRef: v.ObjectSchema<{
|
|
2401
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2402
|
+
}, undefined>;
|
|
2403
|
+
}, undefined>, undefined>, undefined>;
|
|
2404
|
+
readonly scope: v.OptionalSchema<v.PicklistSchema<["per-environment", "shared"], undefined>, undefined>;
|
|
2405
|
+
}, undefined>, undefined>, undefined>;
|
|
2406
|
+
}, undefined>;
|
|
2407
|
+
}, undefined>, v.ObjectSchema<{
|
|
2408
|
+
readonly engine: v.LiteralSchema<"remote-custom", undefined>;
|
|
2409
|
+
readonly manifest: v.ObjectSchema<{
|
|
2410
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2411
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
2412
|
+
/** Management API root; provision/status/teardown paths are appended to it. */
|
|
2413
|
+
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2414
|
+
readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
2415
|
+
readonly type: v.LiteralSchema<"none", undefined>;
|
|
2416
|
+
}, undefined>, v.ObjectSchema<{
|
|
2417
|
+
readonly type: v.LiteralSchema<"api_key", undefined>;
|
|
2418
|
+
readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2419
|
+
readonly secretRef: v.ObjectSchema<{
|
|
2420
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2421
|
+
}, undefined>;
|
|
2422
|
+
/** Optional prefix prepended to the secret value, e.g. `Token `. */
|
|
2423
|
+
readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2424
|
+
}, undefined>, v.ObjectSchema<{
|
|
2425
|
+
readonly type: v.LiteralSchema<"bearer", undefined>;
|
|
2426
|
+
readonly secretRef: v.ObjectSchema<{
|
|
2427
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2428
|
+
}, undefined>;
|
|
2429
|
+
}, undefined>, v.ObjectSchema<{
|
|
2430
|
+
readonly type: v.LiteralSchema<"basic", undefined>;
|
|
2431
|
+
readonly usernameSecretRef: v.ObjectSchema<{
|
|
2432
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2433
|
+
}, undefined>;
|
|
2434
|
+
readonly passwordSecretRef: v.ObjectSchema<{
|
|
2435
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2436
|
+
}, undefined>;
|
|
2437
|
+
}, undefined>, v.ObjectSchema<{
|
|
2438
|
+
readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
|
|
2439
|
+
readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2440
|
+
readonly clientIdSecretRef: v.ObjectSchema<{
|
|
2441
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2442
|
+
}, undefined>;
|
|
2443
|
+
readonly clientSecretSecretRef: v.ObjectSchema<{
|
|
2444
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2445
|
+
}, undefined>;
|
|
2446
|
+
readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2447
|
+
readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2448
|
+
}, undefined>, v.ObjectSchema<{
|
|
2449
|
+
readonly type: v.LiteralSchema<"custom_headers", undefined>;
|
|
2450
|
+
readonly headers: v.ArraySchema<v.ObjectSchema<{
|
|
2451
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2452
|
+
readonly secretRef: v.ObjectSchema<{
|
|
2453
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2454
|
+
}, undefined>;
|
|
2455
|
+
}, undefined>, undefined>;
|
|
2456
|
+
}, undefined>], undefined>;
|
|
2457
|
+
readonly provision: v.ObjectSchema<{
|
|
2458
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
2459
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2460
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2461
|
+
readonly key: v.StringSchema<undefined>;
|
|
2462
|
+
readonly value: v.StringSchema<undefined>;
|
|
2463
|
+
}, undefined>, undefined>, undefined>;
|
|
2464
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2465
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2466
|
+
readonly value: v.StringSchema<undefined>;
|
|
2467
|
+
}, undefined>, undefined>, undefined>;
|
|
2468
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2469
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
2470
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
2471
|
+
}, undefined>;
|
|
2472
|
+
/** Optional: polled to observe async provisioning progress. */
|
|
2473
|
+
readonly status: v.OptionalSchema<v.ObjectSchema<{
|
|
2474
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
2475
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2476
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2477
|
+
readonly key: v.StringSchema<undefined>;
|
|
2478
|
+
readonly value: v.StringSchema<undefined>;
|
|
2479
|
+
}, undefined>, undefined>, undefined>;
|
|
2480
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2481
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2482
|
+
readonly value: v.StringSchema<undefined>;
|
|
2483
|
+
}, undefined>, undefined>, undefined>;
|
|
2484
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2485
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
2486
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
2487
|
+
}, undefined>, undefined>;
|
|
2488
|
+
/** Optional: called to destroy the environment (manual or on TTL expiry). */
|
|
2489
|
+
readonly teardown: v.OptionalSchema<v.ObjectSchema<{
|
|
2490
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
2491
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2492
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2493
|
+
readonly key: v.StringSchema<undefined>;
|
|
2494
|
+
readonly value: v.StringSchema<undefined>;
|
|
2495
|
+
}, undefined>, undefined>, undefined>;
|
|
2496
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2497
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2498
|
+
readonly value: v.StringSchema<undefined>;
|
|
2499
|
+
}, undefined>, undefined>, undefined>;
|
|
2500
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2501
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
2502
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
2503
|
+
}, undefined>, undefined>;
|
|
2504
|
+
readonly response: v.ObjectSchema<{
|
|
2505
|
+
readonly urlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2506
|
+
readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2507
|
+
readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2508
|
+
readonly from: v.StringSchema<undefined>;
|
|
2509
|
+
readonly to: v.PicklistSchema<["provisioning", "ready", "failed", "expired", "tearing_down", "torn_down"], undefined>;
|
|
2510
|
+
}, undefined>, undefined>, undefined>;
|
|
2511
|
+
readonly expiresAtPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2512
|
+
readonly externalIdPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2513
|
+
readonly access: v.OptionalSchema<v.ObjectSchema<{
|
|
2514
|
+
readonly scheme: v.PicklistSchema<["none", "bearer", "basic", "custom_header"], undefined>;
|
|
2515
|
+
readonly tokenPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2516
|
+
readonly usernamePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2517
|
+
readonly passwordPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2518
|
+
readonly headerName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2519
|
+
readonly headerValuePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2520
|
+
}, undefined>, undefined>;
|
|
2521
|
+
}, undefined>;
|
|
2522
|
+
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
2523
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
2524
|
+
/**
|
|
2525
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
2526
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
2527
|
+
* entirely; a custom backend — registered by reference into the app-owned
|
|
2528
|
+
* `EnvironmentBackendRegistry` (see `backend/docs/native-environment-adapter.md`) — reads
|
|
2529
|
+
* + validates it off the per-call
|
|
2530
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
2531
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
2532
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
2533
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
2534
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
2535
|
+
*/
|
|
2536
|
+
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
2537
|
+
}, undefined>;
|
|
2538
|
+
/** Which custom manifest shape this remote provider consumes — matched to a service's `manifestId`. */
|
|
2539
|
+
readonly acceptsManifestId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2540
|
+
}, undefined>], undefined>;
|
|
2541
|
+
readonly backendKind: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2542
|
+
readonly secrets: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
|
|
2543
|
+
}, undefined>;
|
|
2544
|
+
export type RegisterEnvironmentHandlerInput = v.InferOutput<typeof registerEnvironmentHandlerSchema>;
|
|
2545
|
+
/**
|
|
2546
|
+
* The body for a per-USER handler override PUT, where the provision type is taken from the
|
|
2547
|
+
* path (`/me/environment-handlers/:workspaceId/:provisionType`) — so the body carries only
|
|
2548
|
+
* the config + secrets (+ optional `manifestId`/`backendKind`), and must NOT re-send a
|
|
2549
|
+
* `provisionType` the handler would ignore.
|
|
2550
|
+
*/
|
|
2551
|
+
export declare const upsertEnvironmentUserHandlerBodySchema: v.ObjectSchema<{
|
|
2552
|
+
readonly manifestId: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>, undefined>;
|
|
2553
|
+
readonly config: v.VariantSchema<"engine", [v.ObjectSchema<{
|
|
2554
|
+
readonly engine: v.LiteralSchema<"local-docker", undefined>;
|
|
2555
|
+
readonly manifest: v.ObjectSchema<{
|
|
2556
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2557
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
2558
|
+
/** Management API root; provision/status/teardown paths are appended to it. */
|
|
2559
|
+
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2560
|
+
readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
2561
|
+
readonly type: v.LiteralSchema<"none", undefined>;
|
|
2562
|
+
}, undefined>, v.ObjectSchema<{
|
|
2563
|
+
readonly type: v.LiteralSchema<"api_key", undefined>;
|
|
2564
|
+
readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2565
|
+
readonly secretRef: v.ObjectSchema<{
|
|
2566
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2567
|
+
}, undefined>;
|
|
2568
|
+
/** Optional prefix prepended to the secret value, e.g. `Token `. */
|
|
2569
|
+
readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2570
|
+
}, undefined>, v.ObjectSchema<{
|
|
2571
|
+
readonly type: v.LiteralSchema<"bearer", undefined>;
|
|
2572
|
+
readonly secretRef: v.ObjectSchema<{
|
|
2573
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2574
|
+
}, undefined>;
|
|
2575
|
+
}, undefined>, v.ObjectSchema<{
|
|
2576
|
+
readonly type: v.LiteralSchema<"basic", undefined>;
|
|
2577
|
+
readonly usernameSecretRef: v.ObjectSchema<{
|
|
2578
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2579
|
+
}, undefined>;
|
|
2580
|
+
readonly passwordSecretRef: v.ObjectSchema<{
|
|
2581
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2582
|
+
}, undefined>;
|
|
2583
|
+
}, undefined>, v.ObjectSchema<{
|
|
2584
|
+
readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
|
|
2585
|
+
readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2586
|
+
readonly clientIdSecretRef: v.ObjectSchema<{
|
|
2587
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2588
|
+
}, undefined>;
|
|
2589
|
+
readonly clientSecretSecretRef: v.ObjectSchema<{
|
|
2590
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2591
|
+
}, undefined>;
|
|
2592
|
+
readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2593
|
+
readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2594
|
+
}, undefined>, v.ObjectSchema<{
|
|
2595
|
+
readonly type: v.LiteralSchema<"custom_headers", undefined>;
|
|
2596
|
+
readonly headers: v.ArraySchema<v.ObjectSchema<{
|
|
2597
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2598
|
+
readonly secretRef: v.ObjectSchema<{
|
|
2599
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2600
|
+
}, undefined>;
|
|
2601
|
+
}, undefined>, undefined>;
|
|
2602
|
+
}, undefined>], undefined>;
|
|
2603
|
+
readonly provision: v.ObjectSchema<{
|
|
2604
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
2605
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2606
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2607
|
+
readonly key: v.StringSchema<undefined>;
|
|
2608
|
+
readonly value: v.StringSchema<undefined>;
|
|
2609
|
+
}, undefined>, undefined>, undefined>;
|
|
2610
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2611
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2612
|
+
readonly value: v.StringSchema<undefined>;
|
|
2613
|
+
}, undefined>, undefined>, undefined>;
|
|
2614
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2615
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
2616
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
2617
|
+
}, undefined>;
|
|
2618
|
+
/** Optional: polled to observe async provisioning progress. */
|
|
2619
|
+
readonly status: v.OptionalSchema<v.ObjectSchema<{
|
|
2620
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
2621
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2622
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2623
|
+
readonly key: v.StringSchema<undefined>;
|
|
2624
|
+
readonly value: v.StringSchema<undefined>;
|
|
2625
|
+
}, undefined>, undefined>, undefined>;
|
|
2626
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2627
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2628
|
+
readonly value: v.StringSchema<undefined>;
|
|
2629
|
+
}, undefined>, undefined>, undefined>;
|
|
2630
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2631
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
2632
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
2633
|
+
}, undefined>, undefined>;
|
|
2634
|
+
/** Optional: called to destroy the environment (manual or on TTL expiry). */
|
|
2635
|
+
readonly teardown: v.OptionalSchema<v.ObjectSchema<{
|
|
2636
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
2637
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2638
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2639
|
+
readonly key: v.StringSchema<undefined>;
|
|
2640
|
+
readonly value: v.StringSchema<undefined>;
|
|
2641
|
+
}, undefined>, undefined>, undefined>;
|
|
2642
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2643
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2644
|
+
readonly value: v.StringSchema<undefined>;
|
|
2645
|
+
}, undefined>, undefined>, undefined>;
|
|
2646
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2647
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
2648
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
2649
|
+
}, undefined>, undefined>;
|
|
2650
|
+
readonly response: v.ObjectSchema<{
|
|
2651
|
+
readonly urlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2652
|
+
readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2653
|
+
readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2654
|
+
readonly from: v.StringSchema<undefined>;
|
|
2655
|
+
readonly to: v.PicklistSchema<["provisioning", "ready", "failed", "expired", "tearing_down", "torn_down"], undefined>;
|
|
2656
|
+
}, undefined>, undefined>, undefined>;
|
|
2657
|
+
readonly expiresAtPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2658
|
+
readonly externalIdPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2659
|
+
readonly access: v.OptionalSchema<v.ObjectSchema<{
|
|
2660
|
+
readonly scheme: v.PicklistSchema<["none", "bearer", "basic", "custom_header"], undefined>;
|
|
2661
|
+
readonly tokenPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2662
|
+
readonly usernamePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2663
|
+
readonly passwordPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2664
|
+
readonly headerName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2665
|
+
readonly headerValuePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2666
|
+
}, undefined>, undefined>;
|
|
2667
|
+
}, undefined>;
|
|
2668
|
+
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
2669
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
2670
|
+
/**
|
|
2671
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
2672
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
2673
|
+
* entirely; a custom backend — registered by reference into the app-owned
|
|
2674
|
+
* `EnvironmentBackendRegistry` (see `backend/docs/native-environment-adapter.md`) — reads
|
|
2675
|
+
* + validates it off the per-call
|
|
2676
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
2677
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
2678
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
2679
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
2680
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
2681
|
+
*/
|
|
2682
|
+
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
2683
|
+
}, undefined>;
|
|
2684
|
+
}, undefined>, v.ObjectSchema<{
|
|
2685
|
+
readonly engine: v.LiteralSchema<"local-k3s", undefined>;
|
|
2686
|
+
readonly kubernetes: v.ObjectSchema<{
|
|
2687
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
2688
|
+
/** kube-apiserver root URL, e.g. `https://my-cluster.example:6443`. */
|
|
2689
|
+
readonly apiServerUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2690
|
+
/** PEM CA bundle to verify the apiserver TLS cert (omit only for a publicly-trusted CA). */
|
|
2691
|
+
readonly caCertPem: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2692
|
+
/** Skip apiserver TLS verification — strongly discouraged; kind/dev clusters only. */
|
|
2693
|
+
readonly insecureSkipTlsVerify: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2694
|
+
/**
|
|
2695
|
+
* Namespace name template for the per-PR environment, e.g. `cf-env-{{pullNumber}}`. With
|
|
2696
|
+
* `renderer: 'kustomize'`, ABSENT ⇒ honor the overlay's own `namespace:` when it pins one
|
|
2697
|
+
* (the shared-namespace ephemeral-env shape, where base + overlay name a fixed namespace);
|
|
2698
|
+
* SET ⇒ override it (the adapter sets the namespace at build time) for true per-PR
|
|
2699
|
+
* isolation. For raw manifests, absent ⇒ a default derived from the PR number / block id.
|
|
2700
|
+
*/
|
|
2701
|
+
readonly namespaceTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
2702
|
+
/** How the environment URL is derived once applied. */
|
|
2703
|
+
readonly url: v.VariantSchema<"source", [v.ObjectSchema<{
|
|
2704
|
+
readonly source: v.LiteralSchema<"ingressTemplate", undefined>;
|
|
2705
|
+
/** Host template, e.g. `{{branch}}.preview.example.com`; rendered with the provision vars. */
|
|
2706
|
+
readonly hostTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
|
|
2707
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2708
|
+
}, undefined>, v.ObjectSchema<{
|
|
2709
|
+
readonly source: v.LiteralSchema<"ingressStatus", undefined>;
|
|
2710
|
+
/** Ingress object to read `.status.loadBalancer` from; absent ⇒ the only Ingress applied. */
|
|
2711
|
+
readonly ingressName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
2712
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2713
|
+
}, undefined>, v.ObjectSchema<{
|
|
2714
|
+
readonly source: v.LiteralSchema<"serviceStatus", undefined>;
|
|
2715
|
+
/** Service object to read `.status.loadBalancer` (k3s ServiceLB) from. */
|
|
2716
|
+
readonly serviceName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
2717
|
+
readonly port: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65535, undefined>]>, undefined>;
|
|
2718
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2719
|
+
}, undefined>, v.ObjectSchema<{
|
|
2720
|
+
readonly source: v.LiteralSchema<"gatewayStatus", undefined>;
|
|
2721
|
+
/** Gateway-API `Gateway` to read `.status.addresses[]` from; absent ⇒ the only one applied. */
|
|
2722
|
+
readonly gatewayName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
2723
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2724
|
+
}, undefined>, v.ObjectSchema<{
|
|
2725
|
+
readonly source: v.LiteralSchema<"httpRouteStatus", undefined>;
|
|
2726
|
+
/** `HTTPRoute` whose `parentRefs` resolve to the Gateway address; absent ⇒ the only one applied. */
|
|
2727
|
+
readonly httpRouteName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
2728
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2729
|
+
}, undefined>], undefined>;
|
|
2730
|
+
/** Optional image reference made available to the manifests as `{{image}}`. */
|
|
2731
|
+
readonly imageTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
2732
|
+
/** Fallback TTL (ms) after which the env is swept + torn down. */
|
|
2733
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
2734
|
+
/** Extra labels stamped on the namespace + every applied resource. */
|
|
2735
|
+
readonly labels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
2736
|
+
/** Extra annotations stamped on the namespace. */
|
|
2737
|
+
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
2738
|
+
/**
|
|
2739
|
+
* Workspace-level (cluster-singleton) helm releases the deploy adapter ensures before
|
|
2740
|
+
* applying a service's manifests — e.g. an ingress/gateway controller shared by every
|
|
2741
|
+
* per-PR env. Use `scope: 'shared'`; installed once, never torn down per-PR. Merged
|
|
2742
|
+
* with the service's own (per-environment) `helmReleases` at provision time.
|
|
2743
|
+
*/
|
|
2744
|
+
readonly helmReleases: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2745
|
+
/** Release name. */
|
|
2746
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2747
|
+
/** Chart ref: an OCI ref (`oci://…`) or, with `repo`, a `repo/chart` name. */
|
|
2748
|
+
readonly chart: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2749
|
+
/** Chart repo URL; absent ⇒ `chart` is an OCI ref. */
|
|
2750
|
+
readonly repo: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
2751
|
+
/** PINNED chart version, e.g. `1.2.3` / `v1.2.3` (floating tags like `latest`/`^1.0` rejected). */
|
|
2752
|
+
readonly version: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "version must be a pinned semver (e.g. 1.2.3), not a floating tag like latest or ^1.0.">]>;
|
|
2753
|
+
/** Namespace to install into, templated; absent ⇒ the environment namespace. */
|
|
2754
|
+
readonly namespaceTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
2755
|
+
/** Inline `--values` overrides. */
|
|
2756
|
+
readonly values: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
2757
|
+
/** Templated `--set` overrides. */
|
|
2758
|
+
readonly set: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2759
|
+
/** Dotted `--set` path, e.g. `config.rateLimit.enabled`. */
|
|
2760
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2761
|
+
/** The value, templated over the provision vars. */
|
|
2762
|
+
readonly valueTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2763
|
+
}, undefined>, undefined>, undefined>;
|
|
2764
|
+
/** Secret-bundle-backed values folded in at provision time (`--set <path>=<secret>`). */
|
|
2765
|
+
readonly valuesSecretRefs: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2766
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2767
|
+
readonly secretRef: v.ObjectSchema<{
|
|
2768
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2769
|
+
}, undefined>;
|
|
2770
|
+
}, undefined>, undefined>, undefined>;
|
|
2771
|
+
readonly scope: v.OptionalSchema<v.PicklistSchema<["per-environment", "shared"], undefined>, undefined>;
|
|
2772
|
+
}, undefined>, undefined>, undefined>;
|
|
2773
|
+
}, undefined>;
|
|
2774
|
+
}, undefined>, v.ObjectSchema<{
|
|
2775
|
+
readonly engine: v.LiteralSchema<"remote-kubernetes", undefined>;
|
|
2776
|
+
readonly kubernetes: v.ObjectSchema<{
|
|
2777
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
2778
|
+
/** kube-apiserver root URL, e.g. `https://my-cluster.example:6443`. */
|
|
2779
|
+
readonly apiServerUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2780
|
+
/** PEM CA bundle to verify the apiserver TLS cert (omit only for a publicly-trusted CA). */
|
|
2781
|
+
readonly caCertPem: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2782
|
+
/** Skip apiserver TLS verification — strongly discouraged; kind/dev clusters only. */
|
|
2783
|
+
readonly insecureSkipTlsVerify: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2784
|
+
/**
|
|
2785
|
+
* Namespace name template for the per-PR environment, e.g. `cf-env-{{pullNumber}}`. With
|
|
2786
|
+
* `renderer: 'kustomize'`, ABSENT ⇒ honor the overlay's own `namespace:` when it pins one
|
|
2787
|
+
* (the shared-namespace ephemeral-env shape, where base + overlay name a fixed namespace);
|
|
2788
|
+
* SET ⇒ override it (the adapter sets the namespace at build time) for true per-PR
|
|
2789
|
+
* isolation. For raw manifests, absent ⇒ a default derived from the PR number / block id.
|
|
2790
|
+
*/
|
|
2791
|
+
readonly namespaceTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
2792
|
+
/** How the environment URL is derived once applied. */
|
|
2793
|
+
readonly url: v.VariantSchema<"source", [v.ObjectSchema<{
|
|
2794
|
+
readonly source: v.LiteralSchema<"ingressTemplate", undefined>;
|
|
2795
|
+
/** Host template, e.g. `{{branch}}.preview.example.com`; rendered with the provision vars. */
|
|
2796
|
+
readonly hostTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
|
|
2797
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2798
|
+
}, undefined>, v.ObjectSchema<{
|
|
2799
|
+
readonly source: v.LiteralSchema<"ingressStatus", undefined>;
|
|
2800
|
+
/** Ingress object to read `.status.loadBalancer` from; absent ⇒ the only Ingress applied. */
|
|
2801
|
+
readonly ingressName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
2802
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2803
|
+
}, undefined>, v.ObjectSchema<{
|
|
2804
|
+
readonly source: v.LiteralSchema<"serviceStatus", undefined>;
|
|
2805
|
+
/** Service object to read `.status.loadBalancer` (k3s ServiceLB) from. */
|
|
2806
|
+
readonly serviceName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
2807
|
+
readonly port: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65535, undefined>]>, undefined>;
|
|
2808
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2809
|
+
}, undefined>, v.ObjectSchema<{
|
|
2810
|
+
readonly source: v.LiteralSchema<"gatewayStatus", undefined>;
|
|
2811
|
+
/** Gateway-API `Gateway` to read `.status.addresses[]` from; absent ⇒ the only one applied. */
|
|
2812
|
+
readonly gatewayName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
2813
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2814
|
+
}, undefined>, v.ObjectSchema<{
|
|
2815
|
+
readonly source: v.LiteralSchema<"httpRouteStatus", undefined>;
|
|
2816
|
+
/** `HTTPRoute` whose `parentRefs` resolve to the Gateway address; absent ⇒ the only one applied. */
|
|
2817
|
+
readonly httpRouteName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
2818
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
2819
|
+
}, undefined>], undefined>;
|
|
2820
|
+
/** Optional image reference made available to the manifests as `{{image}}`. */
|
|
2821
|
+
readonly imageTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
2822
|
+
/** Fallback TTL (ms) after which the env is swept + torn down. */
|
|
2823
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
2824
|
+
/** Extra labels stamped on the namespace + every applied resource. */
|
|
2825
|
+
readonly labels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
2826
|
+
/** Extra annotations stamped on the namespace. */
|
|
2827
|
+
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
2828
|
+
/**
|
|
2829
|
+
* Workspace-level (cluster-singleton) helm releases the deploy adapter ensures before
|
|
2830
|
+
* applying a service's manifests — e.g. an ingress/gateway controller shared by every
|
|
2831
|
+
* per-PR env. Use `scope: 'shared'`; installed once, never torn down per-PR. Merged
|
|
2832
|
+
* with the service's own (per-environment) `helmReleases` at provision time.
|
|
2833
|
+
*/
|
|
2834
|
+
readonly helmReleases: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2835
|
+
/** Release name. */
|
|
2836
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2837
|
+
/** Chart ref: an OCI ref (`oci://…`) or, with `repo`, a `repo/chart` name. */
|
|
2838
|
+
readonly chart: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2839
|
+
/** Chart repo URL; absent ⇒ `chart` is an OCI ref. */
|
|
2840
|
+
readonly repo: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
2841
|
+
/** PINNED chart version, e.g. `1.2.3` / `v1.2.3` (floating tags like `latest`/`^1.0` rejected). */
|
|
2842
|
+
readonly version: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "version must be a pinned semver (e.g. 1.2.3), not a floating tag like latest or ^1.0.">]>;
|
|
2843
|
+
/** Namespace to install into, templated; absent ⇒ the environment namespace. */
|
|
2844
|
+
readonly namespaceTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
2845
|
+
/** Inline `--values` overrides. */
|
|
2846
|
+
readonly values: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
2847
|
+
/** Templated `--set` overrides. */
|
|
2848
|
+
readonly set: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2849
|
+
/** Dotted `--set` path, e.g. `config.rateLimit.enabled`. */
|
|
2850
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2851
|
+
/** The value, templated over the provision vars. */
|
|
2852
|
+
readonly valueTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2853
|
+
}, undefined>, undefined>, undefined>;
|
|
2854
|
+
/** Secret-bundle-backed values folded in at provision time (`--set <path>=<secret>`). */
|
|
2855
|
+
readonly valuesSecretRefs: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2856
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2857
|
+
readonly secretRef: v.ObjectSchema<{
|
|
2858
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2859
|
+
}, undefined>;
|
|
2860
|
+
}, undefined>, undefined>, undefined>;
|
|
2861
|
+
readonly scope: v.OptionalSchema<v.PicklistSchema<["per-environment", "shared"], undefined>, undefined>;
|
|
2862
|
+
}, undefined>, undefined>, undefined>;
|
|
2863
|
+
}, undefined>;
|
|
2864
|
+
}, undefined>, v.ObjectSchema<{
|
|
2865
|
+
readonly engine: v.LiteralSchema<"remote-custom", undefined>;
|
|
2866
|
+
readonly manifest: v.ObjectSchema<{
|
|
2867
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2868
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
2869
|
+
/** Management API root; provision/status/teardown paths are appended to it. */
|
|
2870
|
+
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2871
|
+
readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
2872
|
+
readonly type: v.LiteralSchema<"none", undefined>;
|
|
2873
|
+
}, undefined>, v.ObjectSchema<{
|
|
2874
|
+
readonly type: v.LiteralSchema<"api_key", undefined>;
|
|
2875
|
+
readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2876
|
+
readonly secretRef: v.ObjectSchema<{
|
|
2877
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2878
|
+
}, undefined>;
|
|
2879
|
+
/** Optional prefix prepended to the secret value, e.g. `Token `. */
|
|
2880
|
+
readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2881
|
+
}, undefined>, v.ObjectSchema<{
|
|
2882
|
+
readonly type: v.LiteralSchema<"bearer", undefined>;
|
|
2883
|
+
readonly secretRef: v.ObjectSchema<{
|
|
2884
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2885
|
+
}, undefined>;
|
|
2886
|
+
}, undefined>, v.ObjectSchema<{
|
|
2887
|
+
readonly type: v.LiteralSchema<"basic", undefined>;
|
|
2888
|
+
readonly usernameSecretRef: v.ObjectSchema<{
|
|
2889
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2890
|
+
}, undefined>;
|
|
2891
|
+
readonly passwordSecretRef: v.ObjectSchema<{
|
|
2892
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2893
|
+
}, undefined>;
|
|
2894
|
+
}, undefined>, v.ObjectSchema<{
|
|
2895
|
+
readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
|
|
2896
|
+
readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2897
|
+
readonly clientIdSecretRef: v.ObjectSchema<{
|
|
2898
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2899
|
+
}, undefined>;
|
|
2900
|
+
readonly clientSecretSecretRef: v.ObjectSchema<{
|
|
2901
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2902
|
+
}, undefined>;
|
|
2903
|
+
readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2904
|
+
readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2905
|
+
}, undefined>, v.ObjectSchema<{
|
|
2906
|
+
readonly type: v.LiteralSchema<"custom_headers", undefined>;
|
|
2907
|
+
readonly headers: v.ArraySchema<v.ObjectSchema<{
|
|
2908
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2909
|
+
readonly secretRef: v.ObjectSchema<{
|
|
2910
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2911
|
+
}, undefined>;
|
|
2912
|
+
}, undefined>, undefined>;
|
|
2913
|
+
}, undefined>], undefined>;
|
|
2914
|
+
readonly provision: v.ObjectSchema<{
|
|
2915
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
2916
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2917
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2918
|
+
readonly key: v.StringSchema<undefined>;
|
|
2919
|
+
readonly value: v.StringSchema<undefined>;
|
|
2920
|
+
}, undefined>, undefined>, undefined>;
|
|
2921
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2922
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2923
|
+
readonly value: v.StringSchema<undefined>;
|
|
2924
|
+
}, undefined>, undefined>, undefined>;
|
|
2925
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2926
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
2927
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
2928
|
+
}, undefined>;
|
|
2929
|
+
/** Optional: polled to observe async provisioning progress. */
|
|
2930
|
+
readonly status: v.OptionalSchema<v.ObjectSchema<{
|
|
2931
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
2932
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2933
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2934
|
+
readonly key: v.StringSchema<undefined>;
|
|
2935
|
+
readonly value: v.StringSchema<undefined>;
|
|
2936
|
+
}, undefined>, undefined>, undefined>;
|
|
2937
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2938
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2939
|
+
readonly value: v.StringSchema<undefined>;
|
|
2940
|
+
}, undefined>, undefined>, undefined>;
|
|
2941
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2942
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
2943
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
2944
|
+
}, undefined>, undefined>;
|
|
2945
|
+
/** Optional: called to destroy the environment (manual or on TTL expiry). */
|
|
2946
|
+
readonly teardown: v.OptionalSchema<v.ObjectSchema<{
|
|
2947
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
2948
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
2949
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2950
|
+
readonly key: v.StringSchema<undefined>;
|
|
2951
|
+
readonly value: v.StringSchema<undefined>;
|
|
2952
|
+
}, undefined>, undefined>, undefined>;
|
|
2953
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2954
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2955
|
+
readonly value: v.StringSchema<undefined>;
|
|
2956
|
+
}, undefined>, undefined>, undefined>;
|
|
2957
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2958
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
2959
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
2960
|
+
}, undefined>, undefined>;
|
|
2961
|
+
readonly response: v.ObjectSchema<{
|
|
2962
|
+
readonly urlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2963
|
+
readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2964
|
+
readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2965
|
+
readonly from: v.StringSchema<undefined>;
|
|
2966
|
+
readonly to: v.PicklistSchema<["provisioning", "ready", "failed", "expired", "tearing_down", "torn_down"], undefined>;
|
|
2967
|
+
}, undefined>, undefined>, undefined>;
|
|
2968
|
+
readonly expiresAtPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2969
|
+
readonly externalIdPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2970
|
+
readonly access: v.OptionalSchema<v.ObjectSchema<{
|
|
2971
|
+
readonly scheme: v.PicklistSchema<["none", "bearer", "basic", "custom_header"], undefined>;
|
|
2972
|
+
readonly tokenPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2973
|
+
readonly usernamePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2974
|
+
readonly passwordPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2975
|
+
readonly headerName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2976
|
+
readonly headerValuePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2977
|
+
}, undefined>, undefined>;
|
|
2978
|
+
}, undefined>;
|
|
2979
|
+
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
2980
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
2981
|
+
/**
|
|
2982
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
2983
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
2984
|
+
* entirely; a custom backend — registered by reference into the app-owned
|
|
2985
|
+
* `EnvironmentBackendRegistry` (see `backend/docs/native-environment-adapter.md`) — reads
|
|
2986
|
+
* + validates it off the per-call
|
|
2987
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
2988
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
2989
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
2990
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
2991
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
2992
|
+
*/
|
|
2993
|
+
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
2994
|
+
}, undefined>;
|
|
2995
|
+
/** Which custom manifest shape this remote provider consumes — matched to a service's `manifestId`. */
|
|
2996
|
+
readonly acceptsManifestId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
2997
|
+
}, undefined>], undefined>;
|
|
2998
|
+
readonly backendKind: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2999
|
+
readonly secrets: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
|
|
3000
|
+
}, undefined>;
|
|
3001
|
+
export type UpsertEnvironmentUserHandlerBody = v.InferOutput<typeof upsertEnvironmentUserHandlerBodySchema>;
|
|
3002
|
+
/** The batched per-type handler bundle: every workspace handler + the custom-type catalog. */
|
|
3003
|
+
export declare const environmentHandlersBundleSchema: v.ObjectSchema<{
|
|
3004
|
+
readonly handlers: v.ArraySchema<v.ObjectSchema<{
|
|
3005
|
+
readonly provisionType: v.PicklistSchema<["kubernetes", "docker-compose", "custom", "infraless"], undefined>;
|
|
3006
|
+
/** For `custom`: the manifest id this handler is keyed to; `null` otherwise. */
|
|
3007
|
+
readonly manifestId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
3008
|
+
readonly engine: v.PicklistSchema<["local-docker", "local-k3s", "remote-kubernetes", "remote-custom", "none"], undefined>;
|
|
3009
|
+
readonly providerId: v.StringSchema<undefined>;
|
|
3010
|
+
readonly label: v.StringSchema<undefined>;
|
|
3011
|
+
readonly baseUrl: v.StringSchema<undefined>;
|
|
3012
|
+
readonly connectedAt: v.NumberSchema<undefined>;
|
|
3013
|
+
/** Which secret keys are set (names only), so the UI can show completeness. */
|
|
3014
|
+
readonly secretKeys: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
3015
|
+
/** For `remote-custom`: the manifest id this provider accepts; `null` otherwise. */
|
|
3016
|
+
readonly acceptsManifestId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
3017
|
+
/** The stored handler config, sans secrets, for connect-form prefill on edit. */
|
|
3018
|
+
readonly config: v.OptionalSchema<v.VariantSchema<"engine", [v.ObjectSchema<{
|
|
3019
|
+
readonly engine: v.LiteralSchema<"local-docker", undefined>;
|
|
3020
|
+
readonly manifest: v.ObjectSchema<{
|
|
3021
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3022
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
3023
|
+
/** Management API root; provision/status/teardown paths are appended to it. */
|
|
3024
|
+
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
3025
|
+
readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
3026
|
+
readonly type: v.LiteralSchema<"none", undefined>;
|
|
3027
|
+
}, undefined>, v.ObjectSchema<{
|
|
3028
|
+
readonly type: v.LiteralSchema<"api_key", undefined>;
|
|
3029
|
+
readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3030
|
+
readonly secretRef: v.ObjectSchema<{
|
|
3031
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3032
|
+
}, undefined>;
|
|
3033
|
+
/** Optional prefix prepended to the secret value, e.g. `Token `. */
|
|
3034
|
+
readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3035
|
+
}, undefined>, v.ObjectSchema<{
|
|
3036
|
+
readonly type: v.LiteralSchema<"bearer", undefined>;
|
|
3037
|
+
readonly secretRef: v.ObjectSchema<{
|
|
3038
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3039
|
+
}, undefined>;
|
|
3040
|
+
}, undefined>, v.ObjectSchema<{
|
|
3041
|
+
readonly type: v.LiteralSchema<"basic", undefined>;
|
|
3042
|
+
readonly usernameSecretRef: v.ObjectSchema<{
|
|
3043
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3044
|
+
}, undefined>;
|
|
3045
|
+
readonly passwordSecretRef: v.ObjectSchema<{
|
|
3046
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3047
|
+
}, undefined>;
|
|
3048
|
+
}, undefined>, v.ObjectSchema<{
|
|
3049
|
+
readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
|
|
3050
|
+
readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
3051
|
+
readonly clientIdSecretRef: v.ObjectSchema<{
|
|
3052
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3053
|
+
}, undefined>;
|
|
3054
|
+
readonly clientSecretSecretRef: v.ObjectSchema<{
|
|
3055
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3056
|
+
}, undefined>;
|
|
3057
|
+
readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3058
|
+
readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3059
|
+
}, undefined>, v.ObjectSchema<{
|
|
3060
|
+
readonly type: v.LiteralSchema<"custom_headers", undefined>;
|
|
3061
|
+
readonly headers: v.ArraySchema<v.ObjectSchema<{
|
|
3062
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3063
|
+
readonly secretRef: v.ObjectSchema<{
|
|
3064
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3065
|
+
}, undefined>;
|
|
3066
|
+
}, undefined>, undefined>;
|
|
3067
|
+
}, undefined>], undefined>;
|
|
3068
|
+
readonly provision: v.ObjectSchema<{
|
|
3069
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
3070
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
3071
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3072
|
+
readonly key: v.StringSchema<undefined>;
|
|
3073
|
+
readonly value: v.StringSchema<undefined>;
|
|
3074
|
+
}, undefined>, undefined>, undefined>;
|
|
3075
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3076
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3077
|
+
readonly value: v.StringSchema<undefined>;
|
|
3078
|
+
}, undefined>, undefined>, undefined>;
|
|
3079
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3080
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
3081
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
3082
|
+
}, undefined>;
|
|
3083
|
+
/** Optional: polled to observe async provisioning progress. */
|
|
3084
|
+
readonly status: v.OptionalSchema<v.ObjectSchema<{
|
|
3085
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
3086
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
3087
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3088
|
+
readonly key: v.StringSchema<undefined>;
|
|
3089
|
+
readonly value: v.StringSchema<undefined>;
|
|
3090
|
+
}, undefined>, undefined>, undefined>;
|
|
3091
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3092
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3093
|
+
readonly value: v.StringSchema<undefined>;
|
|
3094
|
+
}, undefined>, undefined>, undefined>;
|
|
3095
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3096
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
3097
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
3098
|
+
}, undefined>, undefined>;
|
|
3099
|
+
/** Optional: called to destroy the environment (manual or on TTL expiry). */
|
|
3100
|
+
readonly teardown: v.OptionalSchema<v.ObjectSchema<{
|
|
3101
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
3102
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
3103
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3104
|
+
readonly key: v.StringSchema<undefined>;
|
|
3105
|
+
readonly value: v.StringSchema<undefined>;
|
|
3106
|
+
}, undefined>, undefined>, undefined>;
|
|
3107
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3108
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3109
|
+
readonly value: v.StringSchema<undefined>;
|
|
3110
|
+
}, undefined>, undefined>, undefined>;
|
|
3111
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3112
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
3113
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
3114
|
+
}, undefined>, undefined>;
|
|
3115
|
+
readonly response: v.ObjectSchema<{
|
|
3116
|
+
readonly urlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3117
|
+
readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3118
|
+
readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3119
|
+
readonly from: v.StringSchema<undefined>;
|
|
3120
|
+
readonly to: v.PicklistSchema<["provisioning", "ready", "failed", "expired", "tearing_down", "torn_down"], undefined>;
|
|
3121
|
+
}, undefined>, undefined>, undefined>;
|
|
3122
|
+
readonly expiresAtPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3123
|
+
readonly externalIdPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3124
|
+
readonly access: v.OptionalSchema<v.ObjectSchema<{
|
|
3125
|
+
readonly scheme: v.PicklistSchema<["none", "bearer", "basic", "custom_header"], undefined>;
|
|
3126
|
+
readonly tokenPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3127
|
+
readonly usernamePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3128
|
+
readonly passwordPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3129
|
+
readonly headerName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3130
|
+
readonly headerValuePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3131
|
+
}, undefined>, undefined>;
|
|
3132
|
+
}, undefined>;
|
|
3133
|
+
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
3134
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
3135
|
+
/**
|
|
3136
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
3137
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
3138
|
+
* entirely; a custom backend — registered by reference into the app-owned
|
|
3139
|
+
* `EnvironmentBackendRegistry` (see `backend/docs/native-environment-adapter.md`) — reads
|
|
3140
|
+
* + validates it off the per-call
|
|
3141
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
3142
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
3143
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
3144
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
3145
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
3146
|
+
*/
|
|
3147
|
+
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
3148
|
+
}, undefined>;
|
|
3149
|
+
}, undefined>, v.ObjectSchema<{
|
|
3150
|
+
readonly engine: v.LiteralSchema<"local-k3s", undefined>;
|
|
3151
|
+
readonly kubernetes: v.ObjectSchema<{
|
|
3152
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
3153
|
+
/** kube-apiserver root URL, e.g. `https://my-cluster.example:6443`. */
|
|
3154
|
+
readonly apiServerUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
3155
|
+
/** PEM CA bundle to verify the apiserver TLS cert (omit only for a publicly-trusted CA). */
|
|
3156
|
+
readonly caCertPem: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3157
|
+
/** Skip apiserver TLS verification — strongly discouraged; kind/dev clusters only. */
|
|
3158
|
+
readonly insecureSkipTlsVerify: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
3159
|
+
/**
|
|
3160
|
+
* Namespace name template for the per-PR environment, e.g. `cf-env-{{pullNumber}}`. With
|
|
3161
|
+
* `renderer: 'kustomize'`, ABSENT ⇒ honor the overlay's own `namespace:` when it pins one
|
|
3162
|
+
* (the shared-namespace ephemeral-env shape, where base + overlay name a fixed namespace);
|
|
3163
|
+
* SET ⇒ override it (the adapter sets the namespace at build time) for true per-PR
|
|
3164
|
+
* isolation. For raw manifests, absent ⇒ a default derived from the PR number / block id.
|
|
3165
|
+
*/
|
|
3166
|
+
readonly namespaceTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
3167
|
+
/** How the environment URL is derived once applied. */
|
|
3168
|
+
readonly url: v.VariantSchema<"source", [v.ObjectSchema<{
|
|
3169
|
+
readonly source: v.LiteralSchema<"ingressTemplate", undefined>;
|
|
3170
|
+
/** Host template, e.g. `{{branch}}.preview.example.com`; rendered with the provision vars. */
|
|
3171
|
+
readonly hostTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
|
|
3172
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
3173
|
+
}, undefined>, v.ObjectSchema<{
|
|
3174
|
+
readonly source: v.LiteralSchema<"ingressStatus", undefined>;
|
|
3175
|
+
/** Ingress object to read `.status.loadBalancer` from; absent ⇒ the only Ingress applied. */
|
|
3176
|
+
readonly ingressName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
3177
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
3178
|
+
}, undefined>, v.ObjectSchema<{
|
|
3179
|
+
readonly source: v.LiteralSchema<"serviceStatus", undefined>;
|
|
3180
|
+
/** Service object to read `.status.loadBalancer` (k3s ServiceLB) from. */
|
|
3181
|
+
readonly serviceName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
3182
|
+
readonly port: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65535, undefined>]>, undefined>;
|
|
3183
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
3184
|
+
}, undefined>, v.ObjectSchema<{
|
|
3185
|
+
readonly source: v.LiteralSchema<"gatewayStatus", undefined>;
|
|
3186
|
+
/** Gateway-API `Gateway` to read `.status.addresses[]` from; absent ⇒ the only one applied. */
|
|
3187
|
+
readonly gatewayName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
3188
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
3189
|
+
}, undefined>, v.ObjectSchema<{
|
|
3190
|
+
readonly source: v.LiteralSchema<"httpRouteStatus", undefined>;
|
|
3191
|
+
/** `HTTPRoute` whose `parentRefs` resolve to the Gateway address; absent ⇒ the only one applied. */
|
|
3192
|
+
readonly httpRouteName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
3193
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
3194
|
+
}, undefined>], undefined>;
|
|
3195
|
+
/** Optional image reference made available to the manifests as `{{image}}`. */
|
|
3196
|
+
readonly imageTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
3197
|
+
/** Fallback TTL (ms) after which the env is swept + torn down. */
|
|
3198
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
3199
|
+
/** Extra labels stamped on the namespace + every applied resource. */
|
|
3200
|
+
readonly labels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
3201
|
+
/** Extra annotations stamped on the namespace. */
|
|
3202
|
+
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
3203
|
+
/**
|
|
3204
|
+
* Workspace-level (cluster-singleton) helm releases the deploy adapter ensures before
|
|
3205
|
+
* applying a service's manifests — e.g. an ingress/gateway controller shared by every
|
|
3206
|
+
* per-PR env. Use `scope: 'shared'`; installed once, never torn down per-PR. Merged
|
|
3207
|
+
* with the service's own (per-environment) `helmReleases` at provision time.
|
|
3208
|
+
*/
|
|
3209
|
+
readonly helmReleases: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3210
|
+
/** Release name. */
|
|
3211
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3212
|
+
/** Chart ref: an OCI ref (`oci://…`) or, with `repo`, a `repo/chart` name. */
|
|
3213
|
+
readonly chart: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3214
|
+
/** Chart repo URL; absent ⇒ `chart` is an OCI ref. */
|
|
3215
|
+
readonly repo: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
3216
|
+
/** PINNED chart version, e.g. `1.2.3` / `v1.2.3` (floating tags like `latest`/`^1.0` rejected). */
|
|
3217
|
+
readonly version: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "version must be a pinned semver (e.g. 1.2.3), not a floating tag like latest or ^1.0.">]>;
|
|
3218
|
+
/** Namespace to install into, templated; absent ⇒ the environment namespace. */
|
|
3219
|
+
readonly namespaceTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
3220
|
+
/** Inline `--values` overrides. */
|
|
3221
|
+
readonly values: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
3222
|
+
/** Templated `--set` overrides. */
|
|
3223
|
+
readonly set: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3224
|
+
/** Dotted `--set` path, e.g. `config.rateLimit.enabled`. */
|
|
3225
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3226
|
+
/** The value, templated over the provision vars. */
|
|
3227
|
+
readonly valueTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
3228
|
+
}, undefined>, undefined>, undefined>;
|
|
3229
|
+
/** Secret-bundle-backed values folded in at provision time (`--set <path>=<secret>`). */
|
|
3230
|
+
readonly valuesSecretRefs: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3231
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3232
|
+
readonly secretRef: v.ObjectSchema<{
|
|
3233
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3234
|
+
}, undefined>;
|
|
3235
|
+
}, undefined>, undefined>, undefined>;
|
|
3236
|
+
readonly scope: v.OptionalSchema<v.PicklistSchema<["per-environment", "shared"], undefined>, undefined>;
|
|
3237
|
+
}, undefined>, undefined>, undefined>;
|
|
3238
|
+
}, undefined>;
|
|
3239
|
+
}, undefined>, v.ObjectSchema<{
|
|
3240
|
+
readonly engine: v.LiteralSchema<"remote-kubernetes", undefined>;
|
|
3241
|
+
readonly kubernetes: v.ObjectSchema<{
|
|
3242
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
3243
|
+
/** kube-apiserver root URL, e.g. `https://my-cluster.example:6443`. */
|
|
3244
|
+
readonly apiServerUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
3245
|
+
/** PEM CA bundle to verify the apiserver TLS cert (omit only for a publicly-trusted CA). */
|
|
3246
|
+
readonly caCertPem: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3247
|
+
/** Skip apiserver TLS verification — strongly discouraged; kind/dev clusters only. */
|
|
3248
|
+
readonly insecureSkipTlsVerify: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
3249
|
+
/**
|
|
3250
|
+
* Namespace name template for the per-PR environment, e.g. `cf-env-{{pullNumber}}`. With
|
|
3251
|
+
* `renderer: 'kustomize'`, ABSENT ⇒ honor the overlay's own `namespace:` when it pins one
|
|
3252
|
+
* (the shared-namespace ephemeral-env shape, where base + overlay name a fixed namespace);
|
|
3253
|
+
* SET ⇒ override it (the adapter sets the namespace at build time) for true per-PR
|
|
3254
|
+
* isolation. For raw manifests, absent ⇒ a default derived from the PR number / block id.
|
|
3255
|
+
*/
|
|
3256
|
+
readonly namespaceTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
3257
|
+
/** How the environment URL is derived once applied. */
|
|
3258
|
+
readonly url: v.VariantSchema<"source", [v.ObjectSchema<{
|
|
3259
|
+
readonly source: v.LiteralSchema<"ingressTemplate", undefined>;
|
|
3260
|
+
/** Host template, e.g. `{{branch}}.preview.example.com`; rendered with the provision vars. */
|
|
3261
|
+
readonly hostTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
|
|
3262
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
3263
|
+
}, undefined>, v.ObjectSchema<{
|
|
3264
|
+
readonly source: v.LiteralSchema<"ingressStatus", undefined>;
|
|
3265
|
+
/** Ingress object to read `.status.loadBalancer` from; absent ⇒ the only Ingress applied. */
|
|
3266
|
+
readonly ingressName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
3267
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
3268
|
+
}, undefined>, v.ObjectSchema<{
|
|
3269
|
+
readonly source: v.LiteralSchema<"serviceStatus", undefined>;
|
|
3270
|
+
/** Service object to read `.status.loadBalancer` (k3s ServiceLB) from. */
|
|
3271
|
+
readonly serviceName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
3272
|
+
readonly port: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65535, undefined>]>, undefined>;
|
|
3273
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
3274
|
+
}, undefined>, v.ObjectSchema<{
|
|
3275
|
+
readonly source: v.LiteralSchema<"gatewayStatus", undefined>;
|
|
3276
|
+
/** Gateway-API `Gateway` to read `.status.addresses[]` from; absent ⇒ the only one applied. */
|
|
3277
|
+
readonly gatewayName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
3278
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
3279
|
+
}, undefined>, v.ObjectSchema<{
|
|
3280
|
+
readonly source: v.LiteralSchema<"httpRouteStatus", undefined>;
|
|
3281
|
+
/** `HTTPRoute` whose `parentRefs` resolve to the Gateway address; absent ⇒ the only one applied. */
|
|
3282
|
+
readonly httpRouteName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
3283
|
+
readonly scheme: v.OptionalSchema<v.PicklistSchema<["http", "https"], undefined>, undefined>;
|
|
3284
|
+
}, undefined>], undefined>;
|
|
3285
|
+
/** Optional image reference made available to the manifests as `{{image}}`. */
|
|
3286
|
+
readonly imageTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
3287
|
+
/** Fallback TTL (ms) after which the env is swept + torn down. */
|
|
3288
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
3289
|
+
/** Extra labels stamped on the namespace + every applied resource. */
|
|
3290
|
+
readonly labels: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
3291
|
+
/** Extra annotations stamped on the namespace. */
|
|
3292
|
+
readonly annotations: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
|
|
3293
|
+
/**
|
|
3294
|
+
* Workspace-level (cluster-singleton) helm releases the deploy adapter ensures before
|
|
3295
|
+
* applying a service's manifests — e.g. an ingress/gateway controller shared by every
|
|
3296
|
+
* per-PR env. Use `scope: 'shared'`; installed once, never torn down per-PR. Merged
|
|
3297
|
+
* with the service's own (per-environment) `helmReleases` at provision time.
|
|
3298
|
+
*/
|
|
3299
|
+
readonly helmReleases: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3300
|
+
/** Release name. */
|
|
3301
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3302
|
+
/** Chart ref: an OCI ref (`oci://…`) or, with `repo`, a `repo/chart` name. */
|
|
3303
|
+
readonly chart: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3304
|
+
/** Chart repo URL; absent ⇒ `chart` is an OCI ref. */
|
|
3305
|
+
readonly repo: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
3306
|
+
/** PINNED chart version, e.g. `1.2.3` / `v1.2.3` (floating tags like `latest`/`^1.0` rejected). */
|
|
3307
|
+
readonly version: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "version must be a pinned semver (e.g. 1.2.3), not a floating tag like latest or ^1.0.">]>;
|
|
3308
|
+
/** Namespace to install into, templated; absent ⇒ the environment namespace. */
|
|
3309
|
+
readonly namespaceTemplate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
3310
|
+
/** Inline `--values` overrides. */
|
|
3311
|
+
readonly values: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
3312
|
+
/** Templated `--set` overrides. */
|
|
3313
|
+
readonly set: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3314
|
+
/** Dotted `--set` path, e.g. `config.rateLimit.enabled`. */
|
|
3315
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3316
|
+
/** The value, templated over the provision vars. */
|
|
3317
|
+
readonly valueTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
3318
|
+
}, undefined>, undefined>, undefined>;
|
|
3319
|
+
/** Secret-bundle-backed values folded in at provision time (`--set <path>=<secret>`). */
|
|
3320
|
+
readonly valuesSecretRefs: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3321
|
+
readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3322
|
+
readonly secretRef: v.ObjectSchema<{
|
|
3323
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3324
|
+
}, undefined>;
|
|
3325
|
+
}, undefined>, undefined>, undefined>;
|
|
3326
|
+
readonly scope: v.OptionalSchema<v.PicklistSchema<["per-environment", "shared"], undefined>, undefined>;
|
|
3327
|
+
}, undefined>, undefined>, undefined>;
|
|
3328
|
+
}, undefined>;
|
|
3329
|
+
}, undefined>, v.ObjectSchema<{
|
|
3330
|
+
readonly engine: v.LiteralSchema<"remote-custom", undefined>;
|
|
3331
|
+
readonly manifest: v.ObjectSchema<{
|
|
3332
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3333
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
3334
|
+
/** Management API root; provision/status/teardown paths are appended to it. */
|
|
3335
|
+
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
3336
|
+
readonly auth: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
3337
|
+
readonly type: v.LiteralSchema<"none", undefined>;
|
|
3338
|
+
}, undefined>, v.ObjectSchema<{
|
|
3339
|
+
readonly type: v.LiteralSchema<"api_key", undefined>;
|
|
3340
|
+
readonly headerName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3341
|
+
readonly secretRef: v.ObjectSchema<{
|
|
3342
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3343
|
+
}, undefined>;
|
|
3344
|
+
/** Optional prefix prepended to the secret value, e.g. `Token `. */
|
|
3345
|
+
readonly valuePrefix: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3346
|
+
}, undefined>, v.ObjectSchema<{
|
|
3347
|
+
readonly type: v.LiteralSchema<"bearer", undefined>;
|
|
3348
|
+
readonly secretRef: v.ObjectSchema<{
|
|
3349
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3350
|
+
}, undefined>;
|
|
3351
|
+
}, undefined>, v.ObjectSchema<{
|
|
3352
|
+
readonly type: v.LiteralSchema<"basic", undefined>;
|
|
3353
|
+
readonly usernameSecretRef: v.ObjectSchema<{
|
|
3354
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3355
|
+
}, undefined>;
|
|
3356
|
+
readonly passwordSecretRef: v.ObjectSchema<{
|
|
3357
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3358
|
+
}, undefined>;
|
|
3359
|
+
}, undefined>, v.ObjectSchema<{
|
|
3360
|
+
readonly type: v.LiteralSchema<"oauth2_client_credentials", undefined>;
|
|
3361
|
+
readonly tokenUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
3362
|
+
readonly clientIdSecretRef: v.ObjectSchema<{
|
|
3363
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3364
|
+
}, undefined>;
|
|
3365
|
+
readonly clientSecretSecretRef: v.ObjectSchema<{
|
|
3366
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3367
|
+
}, undefined>;
|
|
3368
|
+
readonly scope: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3369
|
+
readonly audience: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3370
|
+
}, undefined>, v.ObjectSchema<{
|
|
3371
|
+
readonly type: v.LiteralSchema<"custom_headers", undefined>;
|
|
3372
|
+
readonly headers: v.ArraySchema<v.ObjectSchema<{
|
|
3373
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3374
|
+
readonly secretRef: v.ObjectSchema<{
|
|
3375
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3376
|
+
}, undefined>;
|
|
3377
|
+
}, undefined>, undefined>;
|
|
3378
|
+
}, undefined>], undefined>;
|
|
3379
|
+
readonly provision: v.ObjectSchema<{
|
|
3380
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
3381
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
3382
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3383
|
+
readonly key: v.StringSchema<undefined>;
|
|
3384
|
+
readonly value: v.StringSchema<undefined>;
|
|
3385
|
+
}, undefined>, undefined>, undefined>;
|
|
3386
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3387
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3388
|
+
readonly value: v.StringSchema<undefined>;
|
|
3389
|
+
}, undefined>, undefined>, undefined>;
|
|
3390
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3391
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
3392
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
3393
|
+
}, undefined>;
|
|
3394
|
+
/** Optional: polled to observe async provisioning progress. */
|
|
3395
|
+
readonly status: v.OptionalSchema<v.ObjectSchema<{
|
|
3396
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
3397
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
3398
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3399
|
+
readonly key: v.StringSchema<undefined>;
|
|
3400
|
+
readonly value: v.StringSchema<undefined>;
|
|
3401
|
+
}, undefined>, undefined>, undefined>;
|
|
3402
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3403
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3404
|
+
readonly value: v.StringSchema<undefined>;
|
|
3405
|
+
}, undefined>, undefined>, undefined>;
|
|
3406
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3407
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
3408
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
3409
|
+
}, undefined>, undefined>;
|
|
3410
|
+
/** Optional: called to destroy the environment (manual or on TTL expiry). */
|
|
3411
|
+
readonly teardown: v.OptionalSchema<v.ObjectSchema<{
|
|
3412
|
+
readonly method: v.PicklistSchema<["GET", "POST", "PUT", "PATCH", "DELETE"], undefined>;
|
|
3413
|
+
readonly pathTemplate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
|
|
3414
|
+
readonly query: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3415
|
+
readonly key: v.StringSchema<undefined>;
|
|
3416
|
+
readonly value: v.StringSchema<undefined>;
|
|
3417
|
+
}, undefined>, undefined>, undefined>;
|
|
3418
|
+
readonly headers: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3419
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3420
|
+
readonly value: v.StringSchema<undefined>;
|
|
3421
|
+
}, undefined>, undefined>, undefined>;
|
|
3422
|
+
readonly bodyTemplate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3423
|
+
/** Per-call timeout (ms). Bounded; defaults applied by the adapter. */
|
|
3424
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 60000, undefined>]>, undefined>;
|
|
3425
|
+
}, undefined>, undefined>;
|
|
3426
|
+
readonly response: v.ObjectSchema<{
|
|
3427
|
+
readonly urlPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3428
|
+
readonly statusPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3429
|
+
readonly statusMap: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
3430
|
+
readonly from: v.StringSchema<undefined>;
|
|
3431
|
+
readonly to: v.PicklistSchema<["provisioning", "ready", "failed", "expired", "tearing_down", "torn_down"], undefined>;
|
|
3432
|
+
}, undefined>, undefined>, undefined>;
|
|
3433
|
+
readonly expiresAtPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3434
|
+
readonly externalIdPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3435
|
+
readonly access: v.OptionalSchema<v.ObjectSchema<{
|
|
3436
|
+
readonly scheme: v.PicklistSchema<["none", "bearer", "basic", "custom_header"], undefined>;
|
|
3437
|
+
readonly tokenPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3438
|
+
readonly usernamePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3439
|
+
readonly passwordPath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3440
|
+
readonly headerName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3441
|
+
readonly headerValuePath: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3442
|
+
}, undefined>, undefined>;
|
|
3443
|
+
}, undefined>;
|
|
3444
|
+
/** Fallback TTL (ms) when the response carries no explicit expiry. */
|
|
3445
|
+
readonly defaultTtlMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 60000, undefined>]>, undefined>;
|
|
3446
|
+
/**
|
|
3447
|
+
* Opaque, provider-specific configuration for a CUSTOM backend (e.g. a Kargo project,
|
|
3448
|
+
* link-selection key, status map). The generic HttpEnvironmentProvider ignores it
|
|
3449
|
+
* entirely; a custom backend — registered by reference into the app-owned
|
|
3450
|
+
* `EnvironmentBackendRegistry` (see `backend/docs/native-environment-adapter.md`) — reads
|
|
3451
|
+
* + validates it off the per-call
|
|
3452
|
+
* `manifest`. This is the per-WORKSPACE config carrier: a custom backend rides the generic
|
|
3453
|
+
* manifest member of `environmentBackendConfigSchema`, so its bespoke settings live here and
|
|
3454
|
+
* its credentials in the secret bundle. NOT covered by the manifest URL/SSRF checks (which
|
|
3455
|
+
* only guard `baseUrl`/`tokenUrl`); a backend that puts a URL here must guard it itself
|
|
3456
|
+
* (reuse the exported `UrlSafetyPolicy`).
|
|
3457
|
+
*/
|
|
3458
|
+
readonly providerConfig: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
3459
|
+
}, undefined>;
|
|
3460
|
+
/** Which custom manifest shape this remote provider consumes — matched to a service's `manifestId`. */
|
|
3461
|
+
readonly acceptsManifestId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3462
|
+
}, undefined>], undefined>, undefined>;
|
|
3463
|
+
}, undefined>, undefined>;
|
|
3464
|
+
readonly customTypes: v.ArraySchema<v.ObjectSchema<{
|
|
3465
|
+
readonly manifestId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3466
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
3467
|
+
/** `registered` (from a code provider) or `workspace` (UI-defined). */
|
|
3468
|
+
readonly source: v.PicklistSchema<["registered", "workspace"], undefined>;
|
|
3469
|
+
/** Optional hint describing the input shape the provider expects. */
|
|
3470
|
+
readonly acceptsInputHint: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
3471
|
+
readonly description: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
3472
|
+
}, undefined>, undefined>;
|
|
3473
|
+
}, undefined>;
|
|
3474
|
+
export type EnvironmentHandlersBundle = v.InferOutput<typeof environmentHandlersBundleSchema>;
|
|
1625
3475
|
/** Resolved access creds for a provisioned env, as surfaced to a tester agent. */
|
|
1626
3476
|
export declare const environmentAccessHandleSchema: v.ObjectSchema<{
|
|
1627
3477
|
readonly scheme: v.PicklistSchema<["none", "bearer", "basic", "custom_header"], undefined>;
|