File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
apps/kubernetes-provider/src Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,12 @@ type TaskMonitorOptions = {
30
30
31
31
export class TaskMonitor {
32
32
#enabled = false ;
33
+
33
34
#logger = new SimpleLogger ( "[TaskMonitor]" ) ;
34
35
#taskInformer: ReturnType < typeof k8s . makeInformer < k8s . V1Pod > > ;
35
36
#processedPods = new Map < string , number > ( ) ;
36
37
#queue = new PQueue ( { concurrency : 10 } ) ;
38
+
37
39
#k8sClient: {
38
40
core : k8s . CoreV1Api ;
39
41
kubeConfig : k8s . KubeConfig ;
@@ -44,6 +46,10 @@ export class TaskMonitor {
44
46
private labelSelector = "app in (task-index, task-run)" ;
45
47
46
48
constructor ( private opts : TaskMonitorOptions ) {
49
+ if ( opts . namespace ) {
50
+ this . namespace = opts . namespace ;
51
+ }
52
+
47
53
this . #k8sClient = this . #createK8sClient( ) ;
48
54
49
55
this . #taskInformer = this . #createTaskInformer( ) ;
You can’t perform that action at this time.
0 commit comments