feat: add JD01 YAML-first deployment support
This commit is contained in:
@@ -117,7 +117,9 @@ export function manifest(sub2api: Sub2ApiConfig, target: Sub2ApiTargetConfig): s
|
||||
const configHash = configHashFor(sub2api, target);
|
||||
const image = targetImage(sub2api, target);
|
||||
const dependencyImages = targetDependencyImages(sub2api, target);
|
||||
const proxyEnv = sub2ApiProxyEnv(target);
|
||||
return template
|
||||
.replaceAll("unidesk.ai/runtime-node: G14", `unidesk.ai/runtime-node: ${target.id}`)
|
||||
.replaceAll("__SUB2API_IMAGE__", imageRef(sub2api, target))
|
||||
.replaceAll("__SUB2API_IMAGE_PULL_POLICY__", image.pullPolicy)
|
||||
.replaceAll("postgres:18-alpine", dependencyImages.postgres)
|
||||
@@ -126,7 +128,22 @@ export function manifest(sub2api: Sub2ApiConfig, target: Sub2ApiTargetConfig): s
|
||||
.replaceAll("__SUB2API_SECURITY_URL_ALLOWLIST_ENABLED__", String(urlAllowlist.enabled))
|
||||
.replaceAll("__SUB2API_SECURITY_URL_ALLOWLIST_ALLOW_INSECURE_HTTP__", String(urlAllowlist.allowInsecureHttp))
|
||||
.replaceAll("__SUB2API_SECURITY_URL_ALLOWLIST_ALLOW_PRIVATE_HOSTS__", String(urlAllowlist.allowPrivateHosts))
|
||||
.replaceAll("__SUB2API_SECURITY_URL_ALLOWLIST_UPSTREAM_HOSTS__", urlAllowlist.upstreamHosts.join(","));
|
||||
.replaceAll("__SUB2API_SECURITY_URL_ALLOWLIST_UPSTREAM_HOSTS__", urlAllowlist.upstreamHosts.join(","))
|
||||
.replaceAll(
|
||||
'UPDATE_PROXY_URL: ""',
|
||||
[
|
||||
`UPDATE_PROXY_URL: "${proxyEnv.httpProxy}"`,
|
||||
` HTTP_PROXY: "${proxyEnv.httpProxy}"`,
|
||||
` HTTPS_PROXY: "${proxyEnv.httpProxy}"`,
|
||||
` ALL_PROXY: "${proxyEnv.httpProxy}"`,
|
||||
` http_proxy: "${proxyEnv.httpProxy}"`,
|
||||
` https_proxy: "${proxyEnv.httpProxy}"`,
|
||||
` all_proxy: "${proxyEnv.httpProxy}"`,
|
||||
` NO_PROXY: "${proxyEnv.noProxy}"`,
|
||||
` no_proxy: "${proxyEnv.noProxy}"`,
|
||||
].join("\n"),
|
||||
)
|
||||
.concat("\n", renderPublicExposureManifest(target), renderEgressProxyManifest(target));
|
||||
}
|
||||
|
||||
export function configHashFor(sub2api: Sub2ApiConfig, target: Sub2ApiTargetConfig): string {
|
||||
|
||||
Reference in New Issue
Block a user