From ddde4219fb29297e2ba3ab1d7838bac7c61eaa1e Mon Sep 17 00:00:00 2001 From: realanna Date: Mon, 3 Apr 2023 14:16:06 +0200 Subject: [PATCH 1/2] fix: removed failure branch Signed-off-by: realanna --- scheduler/pkg/klcpermit/permit.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scheduler/pkg/klcpermit/permit.go b/scheduler/pkg/klcpermit/permit.go index f06ca8dd79..d6f7646c06 100644 --- a/scheduler/pkg/klcpermit/permit.go +++ b/scheduler/pkg/klcpermit/permit.go @@ -36,14 +36,11 @@ func (pl *Permit) Permit(ctx context.Context, state *framework.CycleState, p *v1 // check the permit immediately, to fail early in case the pod cannot be queued switch pl.workloadManager.Permit(ctx, p) { - case Failure: - klog.Infof("[Keptn Permit Plugin] failed pre-deployment checks on %s", p.GetObjectMeta().GetName()) - return framework.NewStatus(framework.Error), 0 * time.Second case Success: klog.Infof("[Keptn Permit Plugin] passed pre-deployment checks on %s", p.GetObjectMeta().GetName()) return framework.NewStatus(framework.Success), 0 * time.Second default: - klog.Infof("[Keptn Permit Plugin] waiting for pre-deployment checks on %s", p.GetObjectMeta().GetName()) + klog.Infof("[Keptn Permit Plugin] waiting for pre-deployment checks on %s to succeed", p.GetObjectMeta().GetName()) go func() { // create a new context since we are in a new goroutine ctx2, cancel := context.WithCancel(context.Background()) From 219e3a453a0c5c569ac1094f36fd244d95e9b5d4 Mon Sep 17 00:00:00 2001 From: realanna Date: Mon, 3 Apr 2023 15:22:39 +0200 Subject: [PATCH 2/2] fix: forgotten branch Signed-off-by: realanna --- scheduler/pkg/klcpermit/permit.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/scheduler/pkg/klcpermit/permit.go b/scheduler/pkg/klcpermit/permit.go index d6f7646c06..4fd5a40f8a 100644 --- a/scheduler/pkg/klcpermit/permit.go +++ b/scheduler/pkg/klcpermit/permit.go @@ -57,9 +57,6 @@ func (pl *Permit) monitorPod(ctx context.Context, p *v1.Pod) { for { switch pl.workloadManager.Permit(ctx, p) { - case Failure: - waitingPodHandler.Reject(PluginName, "Pre Deployment Check failed") - return case Success: waitingPodHandler.Allow(PluginName) return