366366 </v-col >
367367 </v-row >
368368
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+
369459 <v-divider class =" ma-5" ></v-divider >
370460 <!-- CRONJOBS -->
371461 <h4 class =" text-uppercase" >Cronjobs</h4 >
@@ -615,6 +705,18 @@ export default {
615705 },
616706 */
617707 ],
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+ ],
618720 addons: [
619721 /*
620722 {
@@ -786,6 +888,7 @@ export default {
786888 this .autodeploy = response .data .spec .autodeploy ;
787889 this .domain = response .data .spec .domain ;
788890 this .envvars = response .data .spec .envVars ;
891+ this .extraVolumes = response .data .spec .extraVolumes ;
789892 this .containerPort = response .data .spec .image .containerPort ;
790893 this .podsize = response .data .spec .podsize ;
791894 this .autoscale = response .data .spec .autoscale ;
@@ -838,6 +941,7 @@ export default {
838941 targetMemoryUtilizationPercentage : 80 ,
839942 },
840943 },
944+ extraVolumes: this .extraVolumes ,
841945 cronjobs: this .cronjobFormat (this .cronjobs ),
842946 addons: this .addons ,
843947
@@ -899,6 +1003,7 @@ export default {
8991003 targetMemoryUtilizationPercentage : 80 ,
9001004 },
9011005 },
1006+ extraVolumes: this .extraVolumes ,
9021007 cronjobs: this .cronjobFormat (this .cronjobs ),
9031008 addons: this .addons ,
9041009 })
@@ -924,6 +1029,25 @@ export default {
9241029 }
9251030 }
9261031 },
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+ },
9271051 addCronjobLine () {
9281052 this .cronjobs .push ({
9291053 name: ' hello world' ,
0 commit comments