Skip to content

Commit

Permalink
fix args for deploy command
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol1696 committed Jun 13, 2024
1 parent e0d67ec commit b64cc85
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions clients/js/packages/client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@ export class StarshipClient implements StarshipClientI {
return args;
}

public getDeployArgs(): string[] {
const args = this.getArgs();
if (this.ctx.helmNamespace) {
args.push('--create-namespace');
}
return args;
}

// TODO do we need this here?
public test(): void {
this.exec([
Expand Down Expand Up @@ -271,7 +279,7 @@ export class StarshipClient implements StarshipClientI {
this.ctx.helmChart,
'--version',
this.ctx.helmVersion,
...this.getArgs(),
...this.getDeployArgs(),
...options,
];

Expand Down Expand Up @@ -322,7 +330,7 @@ export class StarshipClient implements StarshipClientI {
'-o',
'custom-columns=:metadata.name',
...this.getArgs(),
], false, false)
], false, true)

// Split the output by new lines and filter out any empty lines
const podNames = result.split('\n').filter(name => name.trim() !== '');
Expand Down Expand Up @@ -350,7 +358,7 @@ export class StarshipClient implements StarshipClientI {
'-o',
'custom-columns=:status.phase,:status.containerStatuses[*].state.waiting.reason',
...this.getArgs(),
], true, false).trim();
], false, true).trim();

const [status, reason] = result.split(' ');
this.podStatuses.set(podName, status);
Expand Down

0 comments on commit b64cc85

Please sign in to comment.