Skip to content

Commit

Permalink
remove pods from checking status, if they are no longer found, update…
Browse files Browse the repository at this point in the history
… default chart version (#570)
  • Loading branch information
Anmol1696 authored Oct 18, 2024
1 parent 7d26358 commit 6d15ab8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions clients/js/packages/client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export interface PodPorts {
}

const defaultName: string = 'starship';
const defaultVersion: string = 'v0.2.14';
const defaultVersion: string = 'v0.2.19';

// TODO talk to Anmol about moving these into yaml, if not already possible?
const defaultPorts: PodPorts = {
Expand Down Expand Up @@ -558,6 +558,13 @@ export class StarshipClient implements StarshipClientI {
public async waitForPods(): Promise<void> {
const podNames = this.getPodNames();

// Remove pods that are no longer active from the podStatuses map
this.podStatuses.forEach((_value, podName) => {
if (!podNames.includes(podName)) {
this.podStatuses.delete(podName);
}
});

// Check the status of each pod retrieved
podNames.forEach((podName) => {
this.checkPodStatus(podName);
Expand Down Expand Up @@ -658,7 +665,6 @@ export class StarshipClient implements StarshipClientI {
const eventLines = eventsSection
.split('\n')
.filter((line) => line.trim() !== '');
this.log(`event lints: ${eventLines.join('\n')}`);

return eventLines;
}
Expand Down

0 comments on commit 6d15ab8

Please sign in to comment.