From a74b22efed968980a1c70a9ea58345e6cccd5124 Mon Sep 17 00:00:00 2001 From: "liheng.zms" Date: Wed, 18 Dec 2024 11:39:36 +0800 Subject: [PATCH] fix PyTorchJob create pod failure due to pod webhook Signed-off-by: liheng.zms --- pkg/webhook/pod/mutating/pod_unavailable_budget.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/webhook/pod/mutating/pod_unavailable_budget.go b/pkg/webhook/pod/mutating/pod_unavailable_budget.go index 10bd0b796e..d47211ba6b 100644 --- a/pkg/webhook/pod/mutating/pod_unavailable_budget.go +++ b/pkg/webhook/pod/mutating/pod_unavailable_budget.go @@ -36,7 +36,8 @@ func (h *PodCreateHandler) pubMutatingPod(ctx context.Context, req admission.Req } pub, err := podunavailablebudget.GetPubForPod(h.Client, pod) if err != nil { - return false, err + klog.ErrorS(err, "Failed to get pub for pod", "pod", klog.KObj(pod)) + return false, nil } else if pub == nil { return true, nil }