177
177
value =" git"
178
178
></v-radio >
179
179
<v-radio
180
- label =" Docker Image"
180
+ label =" Container Image"
181
181
value =" docker"
182
182
></v-radio >
183
183
<!--
381
381
</div > <!-- end of buildstrategy != external -->
382
382
</div > <!-- end of deploymentstrategy == git -->
383
383
384
- <!-- DEPLOYMENT STRATEGY CONTAINER -->
385
- < v-row
386
- v-if = " deploymentstrategy == 'docker' || (deploymentstrategy == 'git' && buildstrategy == 'external' ) " >
384
+ <!-- DEPLOYMENT STRATEGY CONTAINER -->
385
+ < div v-if = " deploymentstrategy == 'docker' " >
386
+ < v-row >
387
387
<v-col
388
388
cols =" 12"
389
389
md =" 6"
396
396
></v-text-field >
397
397
</v-col >
398
398
</v-row >
399
- <v-row
400
- v-if =" deploymentstrategy == 'docker' || (deploymentstrategy == 'git' && buildstrategy == 'external' )" >
399
+ <v-row >
401
400
<v-col
402
401
cols =" 12"
403
402
md =" 6"
410
409
></v-text-field >
411
410
</v-col >
412
411
</v-row >
412
+ <v-row
413
+ v-if =" advanced" >
414
+ <v-col
415
+ cols =" 12"
416
+ md =" 6"
417
+ >
418
+ <v-text-field
419
+ v-model =" docker.command"
420
+ :counter =" 60"
421
+ label =" Command"
422
+ required
423
+ bg-color =" secondary"
424
+ ></v-text-field >
425
+ </v-col >
426
+ </v-row >
427
+ </div > <!-- end of deploymentstrategy == docker -->
413
428
</v-expansion-panel-text >
414
429
</v-expansion-panel >
415
430
@@ -1442,6 +1457,7 @@ export default defineComponent({
1442
1457
docker: {
1443
1458
image: ' ghcr.io/kubero-dev/idler' ,
1444
1459
tag: ' latest' ,
1460
+ command: ' ' ,
1445
1461
},
1446
1462
autodeploy: true ,
1447
1463
sslIndex: [] as (boolean | undefined )[],
@@ -1630,20 +1646,16 @@ export default defineComponent({
1630
1646
},
1631
1647
},
1632
1648
mounted() {
1633
- this .loadPipeline ();
1649
+ this .loadPipelineAndApp ();
1634
1650
this .loadStorageClasses ();
1635
1651
this .loadPodsizeList ();
1636
1652
this .loadBuildpacks ();
1637
1653
this .loadClusterIssuers ();
1638
1654
this .getDomains ();
1639
- if (this .app != ' new' ) {
1640
- this .loadApp (); // this may lead into a race condition with the buildpacks loaded in loadPipeline
1641
- }
1642
1655
1643
- if (this .$route .query .template && this .$route .query .catalogId ) {
1644
- const catalogId = this .$route .query .catalogId as string ;
1656
+ if (this .$route .query .template ) {
1645
1657
const template = this .$route .query .template as string ;
1646
- this .loadTemplate (catalogId , template );
1658
+ this .loadTemplate (template );
1647
1659
}
1648
1660
1649
1661
// this.buildPipeline = this.$vuetify.buildPipeline
@@ -1696,8 +1708,8 @@ export default defineComponent({
1696
1708
this .letsecryptClusterIssuer = response .data .id ;
1697
1709
});
1698
1710
},
1699
- loadTemplate(catalogId : string , template : string ) {
1700
- axios .get (' /api/templates/' + catalogId + ' / ' + template ).then (response => {
1711
+ loadTemplate(template : string ) {
1712
+ axios .get (' /api/templates/' + template ).then (response => {
1701
1713
1702
1714
this .appname = response .data .name ;
1703
1715
this .containerPort = response .data .image .containerPort ;
@@ -1746,7 +1758,7 @@ export default defineComponent({
1746
1758
changeName(name : string ) {
1747
1759
this .ingress .hosts [0 ].host = name + " ." + this .pipelineData .domain ;
1748
1760
},
1749
- loadPipeline () {
1761
+ loadPipelineAndApp () {
1750
1762
axios .get (' /api/pipelines/' + this .pipeline ).then (response => {
1751
1763
this .pipelineData = response .data ;
1752
1764
@@ -1787,6 +1799,11 @@ export default defineComponent({
1787
1799
this .buildpack .run .readOnlyAppStorage = true ;
1788
1800
}
1789
1801
1802
+ if (this .app != ' new' ) {
1803
+ this .loadApp ();
1804
+ }
1805
+
1806
+
1790
1807
});
1791
1808
},
1792
1809
loadStorageClasses() {
@@ -1893,6 +1910,11 @@ export default defineComponent({
1893
1910
this .panel .push (8 )
1894
1911
}
1895
1912
1913
+ let command = ' ' ;
1914
+ if (response .data .spec .image .command ) {
1915
+ command = response .data .spec .image .command .join (' ' );
1916
+ }
1917
+
1896
1918
this .security = response .data .spec .image .run .securityContext || {};
1897
1919
1898
1920
this .deploymentstrategy = response .data .spec .deploymentstrategy ;
@@ -1909,6 +1931,7 @@ export default defineComponent({
1909
1931
this .imageTag = response .data .spec .imageTag ;
1910
1932
this .docker .image = response .data .spec .image .repository || ' ' ;
1911
1933
this .docker .tag = response .data .spec .image .tag || ' latest' ;
1934
+ this .docker .command = command ;
1912
1935
this .autodeploy = response .data .spec .autodeploy ;
1913
1936
this .envvars = response .data .spec .envVars ;
1914
1937
this .serviceAccount = response .data .spec .serviceAccount ;
@@ -2008,6 +2031,13 @@ export default defineComponent({
2008
2031
this .cleanupIngressAnnotations ();
2009
2032
this .setSSL ();
2010
2033
2034
+ let command = [] as string [];
2035
+ if (this .docker .command .length > 0 ) {
2036
+ command = this .docker .command .split (' ' );
2037
+ } else {
2038
+ command = [];
2039
+ }
2040
+
2011
2041
let postdata = {
2012
2042
resourceVersion: this .resourceVersion ,
2013
2043
buildpack: this .buildpack ,
@@ -2021,6 +2051,7 @@ export default defineComponent({
2021
2051
containerport: this .containerPort ,
2022
2052
repository: this .docker .image ,
2023
2053
tag: this .docker .tag ,
2054
+ command: command ,
2024
2055
fetch: this .buildpack ?.fetch ,
2025
2056
build: this .buildpack ?.build ,
2026
2057
run: this .buildpack ?.run ,
0 commit comments