@@ -56,6 +56,8 @@ export class KubernetesClient {
56
56
private secretsCache : Map < string , any [ ] > = new Map ( ) ;
57
57
private artifactsCache : Map < string , any [ ] > = new Map ( ) ;
58
58
private engineconfigsCache : Map < string , any [ ] > = new Map ( ) ;
59
+ private nodeprofilesCache : Map < string , any [ ] > = new Map ( ) ;
60
+ private manifestsCache : Map < string , any [ ] > = new Map ( ) ;
59
61
private crdCache : any [ ] = [ ] ;
60
62
61
63
@@ -84,6 +86,8 @@ export class KubernetesClient {
84
86
85
87
// core.eda.nokia.com/v1
86
88
{ name : 'engineconfigs' , group : 'core.eda.nokia.com' , version : 'v1' , plural : 'engineconfigs' , namespaced : true } ,
89
+ { name : 'nodeprofiles' , group : 'core.eda.nokia.com' , version : 'v1' , plural : 'nodeprofiles' , namespaced : true } ,
90
+ { name : 'manifests' , group : 'core.eda.nokia.com' , version : 'v1' , plural : 'manifests' , namespaced : true } ,
87
91
88
92
// apps/v1
89
93
{ name : 'deployments' , group : 'apps' , version : 'v1' , plural : 'deployments' , namespaced : true } ,
@@ -529,6 +533,14 @@ export class KubernetesClient {
529
533
return this . engineconfigsCache . get ( ns ) || [ ] ;
530
534
}
531
535
536
+ public getCachedNodeprofiles ( ns : string ) : any [ ] {
537
+ return this . nodeprofilesCache . get ( ns ) || [ ] ;
538
+ }
539
+
540
+ public getCachedManifests ( ns : string ) : any [ ] {
541
+ return this . manifestsCache . get ( ns ) || [ ] ;
542
+ }
543
+
532
544
533
545
public async getCustomResourceYaml (
534
546
group : string ,
@@ -563,6 +575,26 @@ export class KubernetesClient {
563
575
) ;
564
576
}
565
577
578
+ public async getNodeprofileYaml ( name : string , namespace : string ) : Promise < string > {
579
+ return this . getCustomResourceYaml (
580
+ 'core.eda.nokia.com' ,
581
+ 'v1' ,
582
+ 'nodeprofiles' ,
583
+ name ,
584
+ namespace
585
+ ) ;
586
+ }
587
+
588
+ public async getManifestYaml ( name : string , namespace : string ) : Promise < string > {
589
+ return this . getCustomResourceYaml (
590
+ 'core.eda.nokia.com' ,
591
+ 'v1' ,
592
+ 'manifests' ,
593
+ name ,
594
+ namespace
595
+ ) ;
596
+ }
597
+
566
598
/**
567
599
* Fetch any Kubernetes resource as YAML using the API
568
600
*/
0 commit comments