From d0028d483b34abb41cce6648436fe4f74d06fef3 Mon Sep 17 00:00:00 2001 From: Maxim Fedotov Date: Tue, 15 Sep 2020 12:54:52 +0300 Subject: [PATCH] Fix null pointer exception in Ingress validating webhook (#94) Co-authored-by: Maksim Fedotov --- pkg/webhook/ingress/validating.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/webhook/ingress/validating.go b/pkg/webhook/ingress/validating.go index d3fcd271..02a391f5 100644 --- a/pkg/webhook/ingress/validating.go +++ b/pkg/webhook/ingress/validating.go @@ -113,7 +113,7 @@ func (r *handler) validateIngress(ctx context.Context, c client.Client, object I ingressClass := object.IngressClass() if ingressClass == nil { - return admission.Errored(http.StatusBadRequest, NewIngressClassForbidden(*ingressClass)) + return admission.Errored(http.StatusBadRequest, NewIngressClassNotValid()) } tl := &v1alpha1.TenantList{}