Skip to content

Commit

Permalink
fix: removed failure branch
Browse files Browse the repository at this point in the history
Signed-off-by: realanna <[email protected]>
  • Loading branch information
RealAnna committed Apr 3, 2023
1 parent b32d753 commit ddde421
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions scheduler/pkg/klcpermit/permit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit ddde421

Please sign in to comment.