Skip to content

Commit

Permalink
Merge pull request kubero-dev#382 from kubero-dev/fix/templateloading…
Browse files Browse the repository at this point in the history
…-fails-to-load-addons

fix loading addons and volumes
  • Loading branch information
mms-gianni authored Jul 12, 2024
2 parents 87f0cb6 + 629d0b4 commit 58377f8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions client/src/components/apps/form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1599,7 +1599,9 @@ export default defineComponent({
this.docker.tag = response.data.image.tag;
this.envvars = response.data.envVars;
this.sAAnnotations = Object.entries(response.data.serviceAccount.annotations).map(([key, value]) => ({annotation: key, value: value as string}));
if (response.data.serviceAccount && response.data.serviceAccount.annotations) {
this.sAAnnotations = Object.entries(response.data.serviceAccount.annotations).map(([key, value]) => ({annotation: key, value: value as string}));
}
this.extraVolumes = response.data.extraVolumes;
this.cronjobs = response.data.cronjobs;
this.addons = response.data.addons;
Expand Down Expand Up @@ -1777,7 +1779,7 @@ export default defineComponent({
if (response.data.spec.envVars.length > 0) {
this.panel.push(5)
}
if (Object.entries(response.data.spec.serviceAccount.annotations).length > 0) {
if (response.data.spec.serviceAccount && Object.entries(response.data.spec.serviceAccount?.annotations).length > 0) {
this.panel.push(4)
}
if (response.data.spec.extraVolumes.length > 0) {
Expand Down Expand Up @@ -1807,7 +1809,9 @@ export default defineComponent({
this.domain = response.data.spec.domain;
this.envvars = response.data.spec.envVars;
this.serviceAccount = response.data.spec.serviceAccount;
this.sAAnnotations = Object.entries(response.data.spec.serviceAccount.annotations).map(([key, value]) => ({annotation: key, value: value as string}));
if (response.data.spec.serviceAccount && response.data.spec.serviceAccount.annotations) {
this.sAAnnotations = Object.entries(response.data.spec.serviceAccount.annotations).map(([key, value]) => ({annotation: key, value: value as string}));
}
this.extraVolumes = response.data.spec.extraVolumes;
this.containerPort = response.data.spec.image.containerPort;
this.podsize = response.data.spec.podsize;
Expand Down

0 comments on commit 58377f8

Please sign in to comment.