Skip to content

Commit

Permalink
fix: tmp fix addWaitForPostgres
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Bouquillon committed Jul 29, 2020
1 parent d897d6c commit d5eef8e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/utils/addWaitForPostgres.ts
Expand Up @@ -10,7 +10,13 @@ export const addWaitForPostgres = (deployment: Deployment): Deployment => {
secretRefName: defaultParams.name,
});

if (deployment.spec && deployment.spec.template.spec) {
if (deployment.spec) {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (!deployment.spec.template) {
//@ts-expect-error
deployment.spec.template = { spec: {} };
}
//@ts-expect-error
deployment.spec.template.spec.initContainers = [initContainer];
}

Expand Down

0 comments on commit d5eef8e

Please sign in to comment.