From 242ca68fa4e371e0aa0a5ff9d5682ee28fe89fd9 Mon Sep 17 00:00:00 2001 From: dcaputo-harmoni Date: Sat, 30 Mar 2024 14:57:02 -0400 Subject: [PATCH] Update os-config to support custom delta server --- src/features/os-config/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/features/os-config/index.ts b/src/features/os-config/index.ts index 4e5d3ad60..7ddbeaf9c 100644 --- a/src/features/os-config/index.ts +++ b/src/features/os-config/index.ts @@ -4,6 +4,7 @@ import { DEVICE_CONFIG_OPENVPN_CA, DEVICE_CONFIG_OPENVPN_CONFIG, DEVICE_CONFIG_SSH_AUTHORIZED_KEYS, + DELTA_HOST, LOGS_HOST, } from '../../lib/config.js'; import { b64decode } from '../../lib/utils.js'; @@ -27,6 +28,11 @@ const services = { // - A field not found in the whitelist of the os-config schema will be ignored. const config = { overrides: { + ...( + DELTA_HOST != null && + DELTA_HOST !== 'delta.balena-cloud.com' && + { deltaEndpoint: `https://${DELTA_HOST}` } + ), ...(LOGS_HOST != null && { logsEndpoint: `https://${LOGS_HOST}` }), }, };