File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -13,17 +13,10 @@ type LocalPersistentVolume = V1PersistentVolume & {
1313 IP : string ;
1414 devicePath : string ;
1515 nodeName : string ;
16+ volumeType : 'rawBlockDevice' | 'lvmLogicalVolume' | 'sparseLoopDevice' ;
1617} ;
1718
18- export interface Metalk8sLocalVolumeAdapter {
19- listLocalPersistentVolumes (
20- serverName : string ,
21- ) : Promise < LocalPersistentVolume [ ] > ;
22- }
23-
24- export default class Metalk8sLocalVolumeProvider
25- implements Metalk8sLocalVolumeAdapter
26- {
19+ export default class Metalk8sLocalVolumeProvider {
2720 volumeClient : Metalk8sV1alpha1VolumeClient ;
2821 k8sClient : CoreV1Api ;
2922 constructor ( url : string , token : string ) {
@@ -65,6 +58,11 @@ export default class Metalk8sLocalVolumeProvider
6558 devicePath :
6659 item . spec ?. rawBlockDevice ?. devicePath || item . metadata [ 'name' ] ,
6760 nodeName : item . spec . nodeName ,
61+ volumeType : item . spec . rawBlockDevice
62+ ? ( 'rawBlockDevice' as 'rawBlockDevice' )
63+ : item . spec . lvmLogicalVolume
64+ ? ( 'lvmLogicalVolume' as 'lvmLogicalVolume' )
65+ : ( 'sparseLoopDevice' as 'sparseLoopDevice' ) ,
6866 } ,
6967 ] ;
7068 } , [ ] as LocalPersistentVolume [ ] ) ;
You can’t perform that action at this time.
0 commit comments