@@ -29,7 +29,9 @@ class ManagedSupervisor {
2929 private readonly warmStartUrl = env . TRIGGER_WARM_START_URL ;
3030
3131 constructor ( ) {
32- const workerApiUrl = `http://${ env . WORKER_HOST_IP } :${ env . TRIGGER_WORKLOAD_API_PORT_EXTERNAL } ` ;
32+ const workloadApiProtocol = env . TRIGGER_WORKLOAD_API_PROTOCOL ;
33+ const workloadApiDomain = env . TRIGGER_WORKLOAD_API_DOMAIN ;
34+ const workloadApiPortExternal = env . TRIGGER_WORKLOAD_API_PORT_EXTERNAL ;
3335
3436 if ( this . warmStartUrl ) {
3537 this . logger . log ( "[ManagedWorker] 🔥 Warm starts enabled" , {
@@ -40,13 +42,17 @@ class ManagedSupervisor {
4042 if ( this . isKubernetes ) {
4143 this . resourceMonitor = new KubernetesResourceMonitor ( createK8sApi ( ) , "" ) ;
4244 this . workloadManager = new KubernetesWorkloadManager ( {
43- workerApiUrl,
45+ workloadApiProtocol,
46+ workloadApiDomain,
47+ workloadApiPort : workloadApiPortExternal ,
4448 warmStartUrl : this . warmStartUrl ,
4549 } ) ;
4650 } else {
4751 this . resourceMonitor = new DockerResourceMonitor ( new Docker ( ) ) ;
4852 this . workloadManager = new DockerWorkloadManager ( {
49- workerApiUrl,
53+ workloadApiProtocol,
54+ workloadApiDomain,
55+ workloadApiPort : workloadApiPortExternal ,
5056 warmStartUrl : this . warmStartUrl ,
5157 } ) ;
5258 }
@@ -57,6 +63,8 @@ class ManagedSupervisor {
5763 instanceName : env . TRIGGER_WORKER_INSTANCE_NAME ,
5864 managedWorkerSecret : env . MANAGED_WORKER_SECRET ,
5965 dequeueIntervalMs : env . TRIGGER_DEQUEUE_INTERVAL_MS ,
66+ queueConsumerEnabled : env . TRIGGER_DEQUEUE_ENABLED ,
67+ runNotificationsEnabled : env . TRIGGER_WORKLOAD_API_ENABLED ,
6068 preDequeue : async ( ) => {
6169 if ( this . isKubernetes ) {
6270 // TODO: Test k8s resource monitor and remove this
@@ -180,7 +188,7 @@ class ManagedSupervisor {
180188
181189 // Responds to workload requests only
182190 this . workloadServer = new WorkloadServer ( {
183- port : env . TRIGGER_WORKLOAD_API_PORT ,
191+ port : env . TRIGGER_WORKLOAD_API_PORT_INTERNAL ,
184192 workerClient : this . workerSession . httpClient ,
185193 checkpointClient : this . checkpointClient ,
186194 } ) ;
0 commit comments