This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const stream = k8Stream.ns.po.get({ qs: { watch: true } }); | |
stream.pipe(jsonStream); | |
jsonStream.on('data', object => { | |
switch(object.type) { | |
case 'ADDED': | |
console.log("Do something when a pod is added"); | |
break; | |
case 'MODIFIED': | |
console.log("Do something when a pod is modified"); | |
break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case 'ADDED': | |
console.log("Unfortunately this doesn't mean a pod is Ready"); | |
break; | |
case 'MODIFIED': | |
if(!("deletionTimestamp" in object.object.metadata) && "conditions" in object.object.status && "podIP" in object.object.status) { | |
console.log("This means a new pod is added AND ready"); | |
} | |
break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Wins - 22 | |
Best of Show: Game Informer | |
Best MMO: Game Informer | |
Bset PC Exclusive: Game Informer | |
Best Shooter: GameSpy | |
Best Free to Play: GameSpy | |
Best PC Exclusive: GameSpy | |
Best MMO Game: IGN | |
Best PC Game: IGN |
NewerOlder