Skip to content

Commit

Permalink
Merge pull request rancher#12326 from rak-phillip/bugfix/12243-deploy…
Browse files Browse the repository at this point in the history
…ment-volume-mounts

Clone `defaultContainer` to apply defaults for workload forms
  • Loading branch information
rak-phillip authored Oct 23, 2024
2 parents 1298f7f + 5223af8 commit 43a3bfd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shell/edit/workload/mixins/workload.js
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ export default {
nameNumber++;
}
const container = {
...defaultContainer,
...structuredClone(defaultContainer),
name: `container-${ nameNumber }`,
active: true
};
Expand Down
2 changes: 1 addition & 1 deletion shell/models/workload.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default class Workload extends WorkloadService {
spec.template = {
spec: {
restartPolicy: this.type === WORKLOAD_TYPES.JOB ? 'Never' : 'Always',
containers: [{ ...defaultContainer }],
containers: [{ ...structuredClone(defaultContainer) }],
initContainers: []
}
};
Expand Down

0 comments on commit 43a3bfd

Please sign in to comment.