From b1519cce177b374ef202342308f63757a73e08db Mon Sep 17 00:00:00 2001 From: Nancy Butler <42977925+mantis-toboggan-md@users.noreply.github.com> Date: Wed, 26 Feb 2020 14:53:23 -0700 Subject: [PATCH] fix restartPolcy --- edit/workload/index.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/edit/workload/index.vue b/edit/workload/index.vue index 4661efc3e0..e2412d0d3c 100644 --- a/edit/workload/index.vue +++ b/edit/workload/index.vue @@ -83,7 +83,7 @@ export default { const metadata = this.value.metadata ? clone(this.value.metadata) : {}; if (!spec.template) { - spec.template = { spec: { restartPolicy: 'Never' } }; + spec.template = { spec: { restartPolicy: this.isJob ? 'Never' : 'Always' } }; } return { @@ -190,6 +190,10 @@ export default { const [group, version] = neu.split('.'); this.$set(this.value, 'apiVersion', `${ group }/${ version }`); + + const restartPolicy = this.isJob ? 'Never' : 'Always'; + + this.$set(this.spec.template.spec, 'restartPolicy', restartPolicy); } },