Skip to content

Commit 4c9dbc4

Browse files
committed
fix task monitor namespace override
1 parent f41ae3d commit 4c9dbc4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apps/kubernetes-provider/src/taskMonitor.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ type TaskMonitorOptions = {
3030

3131
export class TaskMonitor {
3232
#enabled = false;
33+
3334
#logger = new SimpleLogger("[TaskMonitor]");
3435
#taskInformer: ReturnType<typeof k8s.makeInformer<k8s.V1Pod>>;
3536
#processedPods = new Map<string, number>();
3637
#queue = new PQueue({ concurrency: 10 });
38+
3739
#k8sClient: {
3840
core: k8s.CoreV1Api;
3941
kubeConfig: k8s.KubeConfig;
@@ -44,6 +46,10 @@ export class TaskMonitor {
4446
private labelSelector = "app in (task-index, task-run)";
4547

4648
constructor(private opts: TaskMonitorOptions) {
49+
if (opts.namespace) {
50+
this.namespace = opts.namespace;
51+
}
52+
4753
this.#k8sClient = this.#createK8sClient();
4854

4955
this.#taskInformer = this.#createTaskInformer();

0 commit comments

Comments
 (0)