From b4492c2e50963c694abc9f4157b9d023652a0642 Mon Sep 17 00:00:00 2001 From: FLYBYME Date: Sun, 29 Oct 2023 19:38:49 -0400 Subject: [PATCH] fix events jank --- services/deployments.service.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/services/deployments.service.js b/services/deployments.service.js index 5440d77..8b216c6 100644 --- a/services/deployments.service.js +++ b/services/deployments.service.js @@ -272,10 +272,16 @@ module.exports = { const query = { kind: 'Event', 'metadata.namespace': namespace.name, - 'metadata.involvedObject.uid': deployment.uid, + } - return ctx.call('v1.kube.find', query); + return ctx.call('v1.kube.find', query) + .then((res) => { + // filter events by deployment + return res.filter((event) => { + return event.involvedObject.name.includes(deployment.name); + }); + }); } },