Skip to content

Instantly share code, notes, and snippets.

@thenayr
Created November 16, 2016 23:21
Show Gist options
  • Save thenayr/fb59a6ae1b82e22b557a83c17a7aae6e to your computer and use it in GitHub Desktop.
Save thenayr/fb59a6ae1b82e22b557a83c17a7aae6e to your computer and use it in GitHub Desktop.
Kubernetes event stream handling new pods
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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment