From 495e74c88882a40b7d385e59a0819f84527fba9f Mon Sep 17 00:00:00 2001 From: Song Song Li Date: Wed, 2 Jun 2021 15:40:59 +0800 Subject: [PATCH] ceil for ignoreDeletionMarksDelay when deleteDelay is odd number Signed-off-by: Song Song Li --- jsonnet/obs-operator.jsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonnet/obs-operator.jsonnet b/jsonnet/obs-operator.jsonnet index 9379b400..7ffc86b0 100644 --- a/jsonnet/obs-operator.jsonnet +++ b/jsonnet/obs-operator.jsonnet @@ -36,7 +36,7 @@ local operatorObs = obs { stores+:: { local deleteDelay = if std.objectHas(cr.spec.thanos, 'compact') && std.objectHas(cr.spec.thanos.compact, 'deleteDelay') then cr.spec.thanos.compact.deleteDelay else obs.thanos.compact.config.deleteDelay, securityContext: if std.objectHas(cr.spec, 'securityContext') then cr.spec.securityContext else obs.thanos.stores.config.securityContext, - ignoreDeletionMarksDelay: std.parseInt(std.substr(deleteDelay, 0, std.length(deleteDelay) - 1)) / 2 + std.substr(deleteDelay, std.length(deleteDelay) - 1, std.length(deleteDelay)), + ignoreDeletionMarksDelay: std.ceil(std.parseInt(std.substr(deleteDelay, 0, std.length(deleteDelay) - 1)) / 2) + std.substr(deleteDelay, std.length(deleteDelay) - 1, std.length(deleteDelay)), } + if std.objectHas(cr.spec.thanos, 'store') then cr.spec.thanos.store else {}, storeCache+:: (if std.objectHas(cr.spec.thanos, 'store') && std.objectHas(cr.spec.thanos.store, 'cache') then cr.spec.thanos.store.cache else {}) + {