From c5c2f8a93b2b32e42ef0fa8ffddde14c12540263 Mon Sep 17 00:00:00 2001 From: Aarnav Tale Date: Fri, 28 Feb 2025 11:29:31 -0500 Subject: [PATCH] fix: use context for k8s config --- app/utils/integration/kubernetes.ts | 4 ++-- server/context/parser.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/utils/integration/kubernetes.ts b/app/utils/integration/kubernetes.ts index c961a10..c29b1b7 100644 --- a/app/utils/integration/kubernetes.ts +++ b/app/utils/integration/kubernetes.ts @@ -58,10 +58,10 @@ export default class KubernetesIntegration extends Integration { ); // Some very ugly nesting but it's necessary - if (process.env.HEADSCALE_INTEGRATION_UNSTRICT === 'true') { + if (this.context.validate_manifest === false) { log.warn('INTG', 'Skipping strict Pod status check'); } else { - const pod = process.env.POD_NAME; + const pod = this.context.pod_name; if (!pod) { log.error('INTG', 'Missing POD_NAME variable'); return false; diff --git a/server/context/parser.ts b/server/context/parser.ts index a7d5ba0..da9d246 100644 --- a/server/context/parser.ts +++ b/server/context/parser.ts @@ -37,6 +37,7 @@ const dockerConfig = type({ const kubernetesConfig = type({ enabled: stringToBool, + pod_name: 'string', validate_manifest: stringToBool, });