Skip to content

Commit 31988f8

Browse files
authored
Merge pull request #443 from kubero-dev/release/v2.4.4
Release/v2.4.4
2 parents 6733ed1 + 80df8d0 commit 31988f8

File tree

19 files changed

+398
-158
lines changed

19 files changed

+398
-158
lines changed

client/src/components/apps/form.vue

+47-16
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
value="git"
178178
></v-radio>
179179
<v-radio
180-
label="Docker Image"
180+
label="Container Image"
181181
value="docker"
182182
></v-radio>
183183
<!--
@@ -381,9 +381,9 @@
381381
</div> <!-- end of buildstrategy != external -->
382382
</div> <!-- end of deploymentstrategy == git -->
383383

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>
387387
<v-col
388388
cols="12"
389389
md="6"
@@ -396,8 +396,7 @@
396396
></v-text-field>
397397
</v-col>
398398
</v-row>
399-
<v-row
400-
v-if="deploymentstrategy == 'docker' || (deploymentstrategy == 'git' && buildstrategy == 'external' )">
399+
<v-row>
401400
<v-col
402401
cols="12"
403402
md="6"
@@ -410,6 +409,22 @@
410409
></v-text-field>
411410
</v-col>
412411
</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 -->
413428
</v-expansion-panel-text>
414429
</v-expansion-panel>
415430

@@ -1442,6 +1457,7 @@ export default defineComponent({
14421457
docker: {
14431458
image: 'ghcr.io/kubero-dev/idler',
14441459
tag: 'latest',
1460+
command: '',
14451461
},
14461462
autodeploy: true,
14471463
sslIndex: [] as (boolean|undefined)[],
@@ -1630,20 +1646,16 @@ export default defineComponent({
16301646
},
16311647
},
16321648
mounted() {
1633-
this.loadPipeline();
1649+
this.loadPipelineAndApp();
16341650
this.loadStorageClasses();
16351651
this.loadPodsizeList();
16361652
this.loadBuildpacks();
16371653
this.loadClusterIssuers();
16381654
this.getDomains();
1639-
if (this.app != 'new') {
1640-
this.loadApp(); // this may lead into a race condition with the buildpacks loaded in loadPipeline
1641-
}
16421655
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) {
16451657
const template = this.$route.query.template as string;
1646-
this.loadTemplate(catalogId, template);
1658+
this.loadTemplate(template);
16471659
}
16481660
16491661
//this.buildPipeline = this.$vuetify.buildPipeline
@@ -1696,8 +1708,8 @@ export default defineComponent({
16961708
this.letsecryptClusterIssuer = response.data.id;
16971709
});
16981710
},
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 => {
17011713
17021714
this.appname = response.data.name;
17031715
this.containerPort = response.data.image.containerPort;
@@ -1746,7 +1758,7 @@ export default defineComponent({
17461758
changeName(name: string) {
17471759
this.ingress.hosts[0].host = name+"."+this.pipelineData.domain;
17481760
},
1749-
loadPipeline() {
1761+
loadPipelineAndApp() {
17501762
axios.get('/api/pipelines/'+this.pipeline).then(response => {
17511763
this.pipelineData = response.data;
17521764
@@ -1787,6 +1799,11 @@ export default defineComponent({
17871799
this.buildpack.run.readOnlyAppStorage = true;
17881800
}
17891801
1802+
if (this.app != 'new') {
1803+
this.loadApp();
1804+
}
1805+
1806+
17901807
});
17911808
},
17921809
loadStorageClasses() {
@@ -1893,6 +1910,11 @@ export default defineComponent({
18931910
this.panel.push(8)
18941911
}
18951912
1913+
let command = '';
1914+
if (response.data.spec.image.command) {
1915+
command = response.data.spec.image.command.join(' ');
1916+
}
1917+
18961918
this.security = response.data.spec.image.run.securityContext || {};
18971919
18981920
this.deploymentstrategy = response.data.spec.deploymentstrategy;
@@ -1909,6 +1931,7 @@ export default defineComponent({
19091931
this.imageTag = response.data.spec.imageTag;
19101932
this.docker.image = response.data.spec.image.repository || '';
19111933
this.docker.tag = response.data.spec.image.tag || 'latest';
1934+
this.docker.command = command;
19121935
this.autodeploy = response.data.spec.autodeploy;
19131936
this.envvars = response.data.spec.envVars;
19141937
this.serviceAccount = response.data.spec.serviceAccount;
@@ -2008,6 +2031,13 @@ export default defineComponent({
20082031
this.cleanupIngressAnnotations();
20092032
this.setSSL();
20102033
2034+
let command = [] as string[];
2035+
if (this.docker.command.length > 0) {
2036+
command = this.docker.command.split(' ');
2037+
} else {
2038+
command = [];
2039+
}
2040+
20112041
let postdata = {
20122042
resourceVersion: this.resourceVersion,
20132043
buildpack: this.buildpack,
@@ -2021,6 +2051,7 @@ export default defineComponent({
20212051
containerport: this.containerPort,
20222052
repository: this.docker.image,
20232053
tag: this.docker.tag,
2054+
command: command,
20242055
fetch: this.buildpack?.fetch,
20252056
build: this.buildpack?.build,
20262057
run: this.buildpack?.run,

0 commit comments

Comments
 (0)