INNER CODE UNIT · JavaScript
failedPods
rohitg00/k8sgames · js/engine/GameEngine.js:552
const failedPods = this.cluster.getByKind('Pod').filter(p => p.status?.phase === 'Failed');
if (failedPods.length === 0) {
this.eventBus.emit('rollout:zero-downtime', { kind: kind || 'Deployment', name });
}
return { success: true };
}
case 'undo': {
this.cluster._rollbackCount = (this.cluster._rollbackCount || 0) + 1;
resource.metadata.generation++;
this._addNotification('info', `Rolled back ${kind || 'Deployment'} "${name}" to previous revision`);
this.eventBus.emit('resource:rollback', { uid: resource.uid, kind: kind || 'Deployment', name });
return { success: true };
}
case 'status': {
return {
success: true,
status: {
replicas: resource.status.replicas || 0,