366
366
</v-col >
367
367
</v-row >
368
368
369
+ <v-divider class =" ma-5" ></v-divider >
370
+ <!-- EXTRAVOLUMES -->
371
+
372
+ <!--
373
+ # - name: "test-volume"
374
+ # emptyDir: false
375
+ # storageClass: "standard"
376
+ # size: "1Gi"
377
+ # accessModes:
378
+ # - "ReadWriteMany"
379
+ # mountPath: "/test-volume"
380
+ -->
381
+ <h4 class =" text-uppercase" >Volumes</h4 >
382
+ <div v-for =" volume in extraVolumes" v-bind:key =" volume.id" >
383
+ <v-row >
384
+ <v-col
385
+ cols =" 12"
386
+ md =" 3"
387
+ >
388
+ <v-text-field
389
+ v-model =" volume.name"
390
+ label =" name"
391
+ :readonly =" app!='new'"
392
+ ></v-text-field >
393
+ </v-col >
394
+ <v-col
395
+ cols =" 12"
396
+ md =" 2"
397
+ >
398
+ <v-text-field
399
+ v-model =" volume.size"
400
+ label =" size"
401
+ ></v-text-field >
402
+ </v-col >
403
+ <v-col
404
+ cols =" 12"
405
+ md =" 1"
406
+ >
407
+ <v-btn
408
+ elevation =" 2"
409
+ icon
410
+ small
411
+ @click =" removeVolumeLine(volume.name)"
412
+ >
413
+ <v-icon dark >
414
+ mdi-minus
415
+ </v-icon >
416
+ </v-btn >
417
+ </v-col >
418
+ </v-row >
419
+
420
+ <v-row >
421
+ <v-col
422
+ cols =" 12"
423
+ md =" 3"
424
+ >
425
+ <v-text-field
426
+ v-model =" volume.storageClass"
427
+ label =" Storage Class"
428
+ ></v-text-field >
429
+ </v-col >
430
+ <v-col
431
+ cols =" 12"
432
+ md =" 3"
433
+ >
434
+ <v-text-field
435
+ v-model =" volume.mountPath"
436
+ label =" Mount Path"
437
+ ></v-text-field >
438
+ </v-col >
439
+ </v-row >
440
+ </div >
441
+
442
+ <v-row >
443
+ <v-col
444
+ cols =" 12"
445
+ >
446
+ <v-btn
447
+ elevation =" 2"
448
+ icon
449
+ small
450
+ @click =" addVolumeLine()"
451
+ >
452
+ <v-icon dark >
453
+ mdi-plus
454
+ </v-icon >
455
+ </v-btn >
456
+ </v-col >
457
+ </v-row >
458
+
369
459
<v-divider class =" ma-5" ></v-divider >
370
460
<!-- CRONJOBS -->
371
461
<h4 class =" text-uppercase" >Cronjobs</h4 >
@@ -615,6 +705,18 @@ export default {
615
705
},
616
706
*/
617
707
],
708
+ extraVolumes: [
709
+ /*
710
+ {
711
+ name: 'example-volume',
712
+ emptyDir: false,
713
+ storageClass: 'standard',
714
+ size: '1Gi',
715
+ accessMode: ['ReadWriteOnce']
716
+ mountPath: '/example/path',
717
+ },
718
+ */
719
+ ],
618
720
addons: [
619
721
/*
620
722
{
@@ -786,6 +888,7 @@ export default {
786
888
this .autodeploy = response .data .spec .autodeploy ;
787
889
this .domain = response .data .spec .domain ;
788
890
this .envvars = response .data .spec .envVars ;
891
+ this .extraVolumes = response .data .spec .extraVolumes ;
789
892
this .containerPort = response .data .spec .image .containerPort ;
790
893
this .podsize = response .data .spec .podsize ;
791
894
this .autoscale = response .data .spec .autoscale ;
@@ -838,6 +941,7 @@ export default {
838
941
targetMemoryUtilizationPercentage : 80 ,
839
942
},
840
943
},
944
+ extraVolumes: this .extraVolumes ,
841
945
cronjobs: this .cronjobFormat (this .cronjobs ),
842
946
addons: this .addons ,
843
947
@@ -899,6 +1003,7 @@ export default {
899
1003
targetMemoryUtilizationPercentage : 80 ,
900
1004
},
901
1005
},
1006
+ extraVolumes: this .extraVolumes ,
902
1007
cronjobs: this .cronjobFormat (this .cronjobs ),
903
1008
addons: this .addons ,
904
1009
})
@@ -924,6 +1029,25 @@ export default {
924
1029
}
925
1030
}
926
1031
},
1032
+ addVolumeLine () {
1033
+ this .extraVolumes .push ({
1034
+ name: ' example-volume' ,
1035
+ emptyDir: false ,
1036
+ storageClass: ' standard' ,
1037
+ size: ' 1Gi' ,
1038
+ accessModes: [
1039
+ ' ReadWriteOnce' ,
1040
+ ],
1041
+ mountPath: ' /example/path' ,
1042
+ });
1043
+ },
1044
+ removeVolumeLine (index ) {
1045
+ for (let i = 0 ; i < this .extraVolumes .length ; i++ ) {
1046
+ if (this .extraVolumes [i].name === index) {
1047
+ this .extraVolumes .splice (i, 1 );
1048
+ }
1049
+ }
1050
+ },
927
1051
addCronjobLine () {
928
1052
this .cronjobs .push ({
929
1053
name: ' hello world' ,
0 commit comments