From c2e34ba03d7e144f1d40ffcf5dccc89fdc0c8adf Mon Sep 17 00:00:00 2001 From: hzy46 <362583303@qq.com> Date: Fri, 5 Feb 2021 13:31:56 +0800 Subject: [PATCH] fix --- src/database-controller/src/write-merger/handler.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/database-controller/src/write-merger/handler.js b/src/database-controller/src/write-merger/handler.js index 4fd368e0b0..b3f3bb29f5 100644 --- a/src/database-controller/src/write-merger/handler.js +++ b/src/database-controller/src/write-merger/handler.js @@ -93,6 +93,10 @@ async function postWatchEvents(req, res, next) { if (snapshot.getState() === 'Completed') { // if event is DELETED and the state is Completed, mark apiServerDeleted = true internalUpdate.apiServerDeleted = true; + // If the job is completed and deleted, we could reset its sensitive fields. + internalUpdate.configSecretDef = ''; + internalUpdate.dockerSecretDef = ''; + internalUpdate.tokenSecretDef = ''; } else { // Event is DELETED and the state is not Completed. // This case could occur when someone deletes the framework in API server directly.