Skip to content

Commit

Permalink
chore: Alwais check CRD status
Browse files Browse the repository at this point in the history
Signed-off-by: RealAnna <[email protected]>
  • Loading branch information
RealAnna committed Oct 7, 2022
1 parent c605c5a commit b4a635c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scheduler/pkg/klcpermit/permit.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,15 @@ 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 Wait:
klog.Infof("[Keptn Permit Plugin] waiting for pre-deployment checks on %s", p.GetObjectMeta().GetName())
go pl.monitorPod(ctx, p)
return framework.NewStatus(framework.Wait), 5 * time.Minute
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] unknown status of pre-deployment checks for %s", p.GetObjectMeta().GetName())
klog.Infof("[Keptn Permit Plugin] waiting for pre-deployment checks on %s", p.GetObjectMeta().GetName())
go pl.monitorPod(ctx, p)
return framework.NewStatus(framework.Wait), 5 * time.Minute
}

Expand Down

0 comments on commit b4a635c

Please sign in to comment.