From 13112065d20733df0613417f28bc79cb3516e857 Mon Sep 17 00:00:00 2001 From: Peter Bacsko Date: Wed, 6 Nov 2024 17:06:15 +0100 Subject: [PATCH 1/3] [YUNIKORN-2958] Display foreign allocations on the web UI --- json-db.json | 167 ++++++++++++++++-- .../nodes-view/nodes-view.component.html | 8 + .../nodes-view/nodes-view.component.scss | 4 + .../nodes-view/nodes-view.component.ts | 1 + src/app/models/alloc-info.model.ts | 1 + .../services/scheduler/scheduler.service.ts | 50 +++++- src/app/utils/constants.ts | 2 + src/assets/images/k8s_icon.png | Bin 0 -> 1915 bytes src/assets/images/yunikorn_icon.png | Bin 0 -> 1081 bytes 9 files changed, 206 insertions(+), 27 deletions(-) create mode 100644 src/assets/images/k8s_icon.png create mode 100644 src/assets/images/yunikorn_icon.png diff --git a/json-db.json b/json-db.json index ae207457..60d51ec0 100644 --- a/json-db.json +++ b/json-db.json @@ -772,7 +772,7 @@ "taskGroupName": "", "preempted": false } - ], + ], "schedulable": true, "isReserved": false, "reservations": [] @@ -795,36 +795,165 @@ }, "hostName": "", "rackName": "", - "capacity": { - "ephemeral-storage": 99833802265, + "capacity":{ + "ephemeral-storage":130978910208, "hugepages-1Gi": 0, "hugepages-2Mi": 0, "hugepages-32Mi": 0, "hugepages-64Ki": 0, - "memory": 4110970880, - "pods": 110, - "vcore": 2000 + "memory":16767844352, + "pods":110, + "vcore":12000 }, + "occupied":{ + "memory":178257920, + "pods":7, + "vcore":750 + }, + "available":{ + "ephemeral-storage":130978910208, + "memory":16589586432, + "pods":103, + "vcore":11250 + }, "allocated": { "memory": 0, "pods": 0, "vcore": 0 }, - "occupied": { - "memory": 0, - "pods": 0, - "vcore": 0 + "foreignAllocations":[ + { + "allocationKey":"1d867d76-3811-4142-a648-7d2d7ccc4c0a", + "allocationTags":{ + "creationTime":"1726520417", + "foreign":"static", + "kubernetes.io/label/component":"kube-controller-manager", + "kubernetes.io/label/tier":"control-plane", + "kubernetes.io/meta/namespace":"kube-system", + "kubernetes.io/meta/podName":"kube-controller-manager-minikube" + }, + "allocationTime":1726520417000000000, + "resource":{ + "pods":1, + "vcore":200 + }, + "priority":"2000001000", + "nodeId":"minikube" }, - "available": { - "ephemeral-storage": 99833802265, - "hugepages-1Gi": 0, - "hugepages-2Mi": 0, - "hugepages-32Mi": 0, - "hugepages-64Ki": 0, - "memory": 4110970880, - "pods": 110, - "vcore": 2000 + { + "allocationKey":"c8d066e8-9775-4776-81ad-c13fc812ad12", + "allocationTags":{ + "creationTime":"1726520418", + "foreign":"default", + "kubernetes.io/label/addonmanager.kubernetes.io/mode":"Reconcile", + "kubernetes.io/label/integration-test":"storage-provisioner", + "kubernetes.io/meta/namespace":"kube-system", + "kubernetes.io/meta/podName":"storage-provisioner" + }, + "allocationTime":1726520418000000000, + "resource":{ + "pods":1 + }, + "priority":"0", + "nodeId":"minikube", + "preemptable":true + }, + { + "allocationKey":"6b0721bc-547f-4859-927a-e2f911992630", + "allocationTags":{ + "creationTime":"1726520429", + "foreign":"default", + "kubernetes.io/label/k8s-app":"kube-dns", + "kubernetes.io/label/pod-template-hash":"5dd5756b68", + "kubernetes.io/meta/namespace":"kube-system", + "kubernetes.io/meta/podName":"coredns-5dd5756b68-r82gf" + }, + "allocationTime":1726520429000000000, + "resource":{ + "memory":73400320, + "pods":1, + "vcore":100 + }, + "priority":"2000000000", + "nodeId":"minikube", + "preemptable":true }, + { + "allocationKey":"ef70737e-2ddc-461c-863f-9830b31951bd", + "allocationTags":{ + "creationTime":"1726520429", + "foreign":"default", + "kubernetes.io/label/controller-revision-hash":"dffc744c9", + "kubernetes.io/label/k8s-app":"kube-proxy", + "kubernetes.io/label/pod-template-generation":"1", + "kubernetes.io/meta/namespace":"kube-system", + "kubernetes.io/meta/podName":"kube-proxy-rrkkt", + "yunikorn.apache.org/requiredNode":"minikube" + }, + "allocationTime":1726520429000000000, + "resource":{ + "pods":1 + }, + "priority":"2000001000", + "nodeId":"minikube", + "preemptable":true + }, + { + "allocationKey":"4a6cb95d-a1f2-4623-a7a8-f13c057749e9", + "allocationTags":{ + "creationTime":"1726520417", + "foreign":"static", + "kubernetes.io/label/component":"kube-scheduler", + "kubernetes.io/label/tier":"control-plane", + "kubernetes.io/meta/namespace":"kube-system", + "kubernetes.io/meta/podName":"kube-scheduler-minikube" + }, + "allocationTime":1726520417000000000, + "resource":{ + "pods":1, + "vcore":100 + }, + "priority":"2000001000", + "nodeId":"minikube" + }, + { + "allocationKey":"9ed6ee55-f737-4aa0-b8be-2c0eb27285ee", + "allocationTags":{ + "creationTime":"1726520417", + "foreign":"static", + "kubernetes.io/label/component":"etcd", + "kubernetes.io/label/tier":"control-plane", + "kubernetes.io/meta/namespace":"kube-system", + "kubernetes.io/meta/podName":"etcd-minikube" + }, + "allocationTime":1726520417000000000, + "resource":{ + "memory":104857600, + "pods":1, + "vcore":100 + }, + "priority":"2000001000", + "nodeId":"minikube" + }, + { + "allocationKey":"f8e483e8-0435-4d6f-bd66-36fb13595ec4", + "allocationTags":{ + "creationTime":"1726520417", + "foreign":"static", + "kubernetes.io/label/component":"kube-apiserver", + "kubernetes.io/label/tier":"control-plane", + "kubernetes.io/meta/namespace":"kube-system", + "kubernetes.io/meta/podName":"kube-apiserver-minikube" + }, + "allocationTime":1726520417000000000, + "resource":{ + "pods":1, + "vcore":250 + }, + "priority":"2000001000", + "nodeId":"minikube" + } + ], "utilized": { "memory": 0, "pods": 0, diff --git a/src/app/components/nodes-view/nodes-view.component.html b/src/app/components/nodes-view/nodes-view.component.html index b4b1b897..2f5796ec 100644 --- a/src/app/components/nodes-view/nodes-view.component.html +++ b/src/app/components/nodes-view/nodes-view.component.html @@ -168,6 +168,14 @@

Allocations

+ + + + + + + + {{ element[columnDef.colId] || 'n/a' }} diff --git a/src/app/components/nodes-view/nodes-view.component.scss b/src/app/components/nodes-view/nodes-view.component.scss index eb203bac..2acf5c05 100644 --- a/src/app/components/nodes-view/nodes-view.component.scss +++ b/src/app/components/nodes-view/nodes-view.component.scss @@ -131,6 +131,10 @@ margin-top: 20px; .mat-mdc-table { margin-top: 20px; + .mat-column-type { + flex: none; + width: 60px; + } } } .no-record { diff --git a/src/app/components/nodes-view/nodes-view.component.ts b/src/app/components/nodes-view/nodes-view.component.ts index 6dc52531..b91df4ed 100644 --- a/src/app/components/nodes-view/nodes-view.component.ts +++ b/src/app/components/nodes-view/nodes-view.component.ts @@ -93,6 +93,7 @@ export class NodesViewComponent implements OnInit { this.nodeColumnIds = this.nodeColumnDef.map((col) => col.colId).concat('indicatorIcon'); this.allocColumnDef = [ + { colId: 'type', colName: 'Type' }, { colId: 'displayName', colName: 'Display Name' }, { colId: 'allocationKey', colName: 'Allocation Key' }, { colId: 'resource', colName: 'Resource', colFormatter: CommonUtil.resourceColumnFormatter }, diff --git a/src/app/models/alloc-info.model.ts b/src/app/models/alloc-info.model.ts index 9822819b..4047d778 100644 --- a/src/app/models/alloc-info.model.ts +++ b/src/app/models/alloc-info.model.ts @@ -18,6 +18,7 @@ export class AllocationInfo { constructor( + public type: string, public displayName: string, public allocationKey: string, public allocationTags: null | string, diff --git a/src/app/services/scheduler/scheduler.service.ts b/src/app/services/scheduler/scheduler.service.ts index 9104c3c3..e9ebbde9 100644 --- a/src/app/services/scheduler/scheduler.service.ts +++ b/src/app/services/scheduler/scheduler.service.ts @@ -30,7 +30,7 @@ import {QueueInfo, QueuePropertyItem} from '@app/models/queue-info.model'; import {SchedulerResourceInfo} from '@app/models/resource-info.model'; import {SchedulerHealthInfo} from "@app/models/scheduler-health-info.model"; import {CommonUtil} from '@app/utils/common.util'; -import {NOT_AVAILABLE} from '@app/utils/constants'; +import {NOT_AVAILABLE, ALLOCTYPE_FOREIGN, ALLOCTYPE_YUNIKORN} from '@app/utils/constants'; import {Observable} from 'rxjs'; import {map} from 'rxjs/operators'; import {EnvconfigService} from '../envconfig/envconfig.service'; @@ -122,6 +122,7 @@ export class SchedulerService { appAllocations.push( new AllocationInfo( + ALLOCTYPE_YUNIKORN, alloc['displayName'], alloc['allocationKey'], alloc['allocationTags'], @@ -208,12 +209,11 @@ export class SchedulerService { node['attributes'], ); - const allocations = node['allocations']; + const ykAllocations = node['allocations']; + const allocations: AllocationInfo[] = []; - if (allocations && allocations.length > 0) { - const appAllocations: AllocationInfo[] = []; - - allocations.forEach((alloc: any) => { + if (ykAllocations && ykAllocations.length > 0) { + ykAllocations.forEach((alloc: any) => { if ( alloc.allocationTags && alloc.allocationTags['kubernetes.io/meta/namespace'] && @@ -226,8 +226,9 @@ export class SchedulerService { alloc['displayName'] = ''; } - appAllocations.push( + allocations.push( new AllocationInfo( + ALLOCTYPE_YUNIKORN, alloc['displayName'], alloc['allocationKey'], alloc['allocationTags'], @@ -240,10 +241,43 @@ export class SchedulerService { ) ); }); + } + + const foreignAllocations = node['foreignAllocations']; + if (foreignAllocations && foreignAllocations.length > 0) { + foreignAllocations.forEach((alloc: any) => { + if ( + alloc.allocationTags && + alloc.allocationTags['kubernetes.io/meta/namespace'] && + alloc.allocationTags['kubernetes.io/meta/podName'] + ) { + alloc[ + 'displayName' + ] = `${alloc.allocationTags['kubernetes.io/meta/namespace']}/${alloc.allocationTags['kubernetes.io/meta/podName']}`; + } else { + alloc['displayName'] = ''; + } - nodeInfo.setAllocations(appAllocations); + allocations.push( + new AllocationInfo( + ALLOCTYPE_FOREIGN, + alloc['displayName'], + alloc['allocationKey'], + alloc['allocationTags'], + this.formatResource(alloc['resource'] as SchedulerResourceInfo), + alloc['priority'], + "n/a", + alloc['nodeId'], + "n/a", + alloc['partition'] + ) + ); + }); } + if (allocations.length > 0) { + nodeInfo.setAllocations(allocations); + } result.push(nodeInfo); }); } diff --git a/src/app/utils/constants.ts b/src/app/utils/constants.ts index da3d13de..c079b0f5 100644 --- a/src/app/utils/constants.ts +++ b/src/app/utils/constants.ts @@ -22,3 +22,5 @@ export const NOT_AVAILABLE = 'n/a'; export const PARTITION_DEFAULT = 'default'; export const DEFAULT_BAR_COLOR = 'rgba(66, 133, 244, 1)'; export const CHART_COLORS = ['rgba(66, 133, 244, 1)', 'rgb(219, 68, 55, 1)', 'rgb(244, 180, 0, 1)', 'rgb(15, 157, 88, 1)', 'rgb(255, 109, 0, 1)', 'rgb(57, 73, 171, 1)', 'rgb(250, 204, 84, 1)', 'rgb(38, 187, 240, 1)', 'rgb(204, 97, 100, 1)', 'rgb(96, 206, 165, 1)'] +export const ALLOCTYPE_FOREIGN = "foreign" +export const ALLOCTYPE_YUNIKORN = "yunikorn" diff --git a/src/assets/images/k8s_icon.png b/src/assets/images/k8s_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..25afd08f2f4cc7bb843ffe8e5cba2da8c58326f7 GIT binary patch literal 1915 zcmV->2ZZ>EP)C>lUVq%^$@W~Px8Cg zecaAH*3D0ZUR@{6SWABQjiIQhsI#;4$pC7#x}cz7)2rLcnwaxf9g~h(sWAi?h8UKg zsgwv&+8Rk#qVQ7X`J$qtyLazC9zdm19XobxWx~cYmmL+&PMVpO#Ur^d$)ZAt{Ljbc zns5xBj}!kUMPj^Dw`b2DZ#7c@0)gP>&0Cds!v1sBL9>rZ?U9^hX>=&@?zxGdbHFj! z@SJ%2+KISduCUo`0DyT6>({TJ#MI}m*yqU(05~=uDFA@wpyIl-V>n2!*LyUC=cUzZ zTe{p{KLSTA$McV{lyXe3k!Y3*VpReXhu{GGMyI=?**P@MdP6V_xJUi^vD>ZHY7GVh zc(5TBLPWCw05}4M;{^nA(fq$I*-us5 z7?$6>Mv{{(%_ti7tVtb09je*KJy zis85XefTHK^mcI^bemCJTwG&gBL)CEovyWKx&a;$l1L%L03b4$NM9?#F#rIm2#Ev; z#{eOCX|;H{iUa^02LktPerpe{)9Jv&BArgx`jGbV&}+nU33jw>(lo~IPL-Ybz4Dnz zGQbbR5NMVPkNh^UAj985@rMi(B#yF@q`m+T-5vl00Qc|T&-*f`aO55MtpFq|HW&LYaK2C*sPNPK<_X^GY}n0h)7i5PSv+VbSUxSv*OyD zRAK2@bSN1gE#SDR?d}_4qJFU)Gn>uo5W)*k^@H|9mZ`o+rhU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430522012f740e6fc620db43e91a7 Mon Sep 17 00:00:00 2001 From: Peter Bacsko Date: Tue, 12 Nov 2024 13:05:13 +0100 Subject: [PATCH 2/3] Use simple text instead of icons --- .../nodes-view/nodes-view.component.html | 8 -------- .../nodes-view/nodes-view.component.scss | 4 ---- src/assets/images/k8s_icon.png | Bin 1915 -> 0 bytes src/assets/images/yunikorn_icon.png | Bin 1081 -> 0 bytes 4 files changed, 12 deletions(-) delete mode 100644 src/assets/images/k8s_icon.png delete mode 100644 src/assets/images/yunikorn_icon.png diff --git a/src/app/components/nodes-view/nodes-view.component.html b/src/app/components/nodes-view/nodes-view.component.html index 2f5796ec..b4b1b897 100644 --- a/src/app/components/nodes-view/nodes-view.component.html +++ b/src/app/components/nodes-view/nodes-view.component.html @@ -168,14 +168,6 @@

Allocations

- - - - - - - - {{ element[columnDef.colId] || 'n/a' }} diff --git a/src/app/components/nodes-view/nodes-view.component.scss b/src/app/components/nodes-view/nodes-view.component.scss index 2acf5c05..eb203bac 100644 --- a/src/app/components/nodes-view/nodes-view.component.scss +++ b/src/app/components/nodes-view/nodes-view.component.scss @@ -131,10 +131,6 @@ margin-top: 20px; .mat-mdc-table { margin-top: 20px; - .mat-column-type { - flex: none; - width: 60px; - } } } .no-record { diff --git a/src/assets/images/k8s_icon.png b/src/assets/images/k8s_icon.png deleted file mode 100644 index 25afd08f2f4cc7bb843ffe8e5cba2da8c58326f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1915 zcmV->2ZZ>EP)C>lUVq%^$@W~Px8Cg zecaAH*3D0ZUR@{6SWABQjiIQhsI#;4$pC7#x}cz7)2rLcnwaxf9g~h(sWAi?h8UKg zsgwv&+8Rk#qVQ7X`J$qtyLazC9zdm19XobxWx~cYmmL+&PMVpO#Ur^d$)ZAt{Ljbc zns5xBj}!kUMPj^Dw`b2DZ#7c@0)gP>&0Cds!v1sBL9>rZ?U9^hX>=&@?zxGdbHFj! z@SJ%2+KISduCUo`0DyT6>({TJ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%)FFI}Fn+HC1m>g}#B-7&iaWBmDN`G1$(t69S z3h;WpeW6fKZ||Pb2_d2=%CfBM)d$ct{ptAl8^=3!y{pNj+v6$UOQLCnkZPq+{|t;q zV@r#x(yl1VAK~!y^t2>Ngb<7|02mOWX`16W-B3EU2mly{`Cxc>E*y?5%*#dDT;@ z@fybX&h6V@efdRXVF6>TX&P2B0L=V)E1gbL6g6^o=d3B80@_@s}#>I>QZa0|)^C zj^m~#Crel8c{W?wS*rjDDHe+xnaoQKqS5Fp696ik&DK-B^#QUhU;gG|sc1JgHrlM# z=Q|2GLa3*=CzHvPCf?Q6y}rKA^ZY&ls;VXuiPHDs!)+QNJF8e*Tiem29g)aFNeu)7 z50{p3MIEgLC`)T=>*$B0$z-y;8x%zikDS#sZRx=S0I=KbCr+N6`~6O}2() From ac3e66d2ff58bdad795d44226ad1024f0aa41f64 Mon Sep 17 00:00:00 2001 From: Peter Bacsko Date: Mon, 18 Nov 2024 16:30:10 +0100 Subject: [PATCH 3/3] Remove Type column --- src/app/components/nodes-view/nodes-view.component.ts | 1 - src/app/models/alloc-info.model.ts | 1 - src/app/services/scheduler/scheduler.service.ts | 5 +---- src/app/utils/constants.ts | 2 -- 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/app/components/nodes-view/nodes-view.component.ts b/src/app/components/nodes-view/nodes-view.component.ts index 1bdb34d8..6d199e20 100644 --- a/src/app/components/nodes-view/nodes-view.component.ts +++ b/src/app/components/nodes-view/nodes-view.component.ts @@ -96,7 +96,6 @@ export class NodesViewComponent implements OnInit { .concat('indicatorIcon'); this.allocColumnDef = [ - { colId: 'type', colName: 'Type' }, { colId: 'displayName', colName: 'Display Name' }, { colId: 'allocationKey', colName: 'Allocation Key' }, { colId: 'resource', colName: 'Resource', colFormatter: CommonUtil.resourceColumnFormatter }, diff --git a/src/app/models/alloc-info.model.ts b/src/app/models/alloc-info.model.ts index 4047d778..9822819b 100644 --- a/src/app/models/alloc-info.model.ts +++ b/src/app/models/alloc-info.model.ts @@ -18,7 +18,6 @@ export class AllocationInfo { constructor( - public type: string, public displayName: string, public allocationKey: string, public allocationTags: null | string, diff --git a/src/app/services/scheduler/scheduler.service.ts b/src/app/services/scheduler/scheduler.service.ts index e9ebbde9..224c82da 100644 --- a/src/app/services/scheduler/scheduler.service.ts +++ b/src/app/services/scheduler/scheduler.service.ts @@ -30,7 +30,7 @@ import {QueueInfo, QueuePropertyItem} from '@app/models/queue-info.model'; import {SchedulerResourceInfo} from '@app/models/resource-info.model'; import {SchedulerHealthInfo} from "@app/models/scheduler-health-info.model"; import {CommonUtil} from '@app/utils/common.util'; -import {NOT_AVAILABLE, ALLOCTYPE_FOREIGN, ALLOCTYPE_YUNIKORN} from '@app/utils/constants'; +import {NOT_AVAILABLE} from '@app/utils/constants'; import {Observable} from 'rxjs'; import {map} from 'rxjs/operators'; import {EnvconfigService} from '../envconfig/envconfig.service'; @@ -122,7 +122,6 @@ export class SchedulerService { appAllocations.push( new AllocationInfo( - ALLOCTYPE_YUNIKORN, alloc['displayName'], alloc['allocationKey'], alloc['allocationTags'], @@ -228,7 +227,6 @@ export class SchedulerService { allocations.push( new AllocationInfo( - ALLOCTYPE_YUNIKORN, alloc['displayName'], alloc['allocationKey'], alloc['allocationTags'], @@ -260,7 +258,6 @@ export class SchedulerService { allocations.push( new AllocationInfo( - ALLOCTYPE_FOREIGN, alloc['displayName'], alloc['allocationKey'], alloc['allocationTags'], diff --git a/src/app/utils/constants.ts b/src/app/utils/constants.ts index dbcb8e19..54dcf5b4 100644 --- a/src/app/utils/constants.ts +++ b/src/app/utils/constants.ts @@ -24,8 +24,6 @@ export const NOT_AVAILABLE = 'n/a'; export const PARTITION_DEFAULT = 'default'; export const DEFAULT_BAR_COLOR = 'rgba(66, 133, 244, 1)'; export const CHART_COLORS = ['rgba(66, 133, 244, 1)', 'rgb(219, 68, 55, 1)', 'rgb(244, 180, 0, 1)', 'rgb(15, 157, 88, 1)', 'rgb(255, 109, 0, 1)', 'rgb(57, 73, 171, 1)', 'rgb(250, 204, 84, 1)', 'rgb(38, 187, 240, 1)', 'rgb(204, 97, 100, 1)', 'rgb(96, 206, 165, 1)'] -export const ALLOCTYPE_FOREIGN = "foreign" -export const ALLOCTYPE_YUNIKORN = "yunikorn" export const APP_STATUSES: AppStatus[] = ['New', 'Accepted', 'Starting', 'Running', 'Rejected', 'Completing', 'Completed', 'Failing', 'Failed', 'Expired', 'Resuming'];