From caad544bb12ec79fab50e261c2e3bd26678af0e4 Mon Sep 17 00:00:00 2001 From: Ruixian Song Date: Wed, 7 Jun 2023 16:32:00 -0700 Subject: [PATCH] Change error message to be more clear --- cmd/check-gke-ingress/app/ingress/rule.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/check-gke-ingress/app/ingress/rule.go b/cmd/check-gke-ingress/app/ingress/rule.go index 01e6e2fb01..00420426a8 100644 --- a/cmd/check-gke-ingress/app/ingress/rule.go +++ b/cmd/check-gke-ingress/app/ingress/rule.go @@ -118,7 +118,7 @@ func CheckL7ILBFrontendConfig(c *IngressChecker) (string, string, string) { return L7ILBFrontendConfigCheck, report.Skipped, fmt.Sprintf("Ingress %s/%s is not for L7 internal load balancing", c.ingress.Namespace, c.ingress.Name) } if _, ok := getFrontendConfigAnnotation(c.ingress); ok { - return L7ILBFrontendConfigCheck, report.Failed, fmt.Sprintf("Ingress %s/%s for L7 internal load balancing has a frontendConfig annotation", c.ingress.Namespace, c.ingress.Name) + return L7ILBFrontendConfigCheck, report.Failed, fmt.Sprintf("Ingress %s/%s for L7 internal load balancing has a frontendConfig annotation, frontendConfig can only be used with external ingresses", c.ingress.Namespace, c.ingress.Name) } return L7ILBFrontendConfigCheck, report.Passed, fmt.Sprintf("Ingress %s/%s for L7 internal load balancing does not have a frontendConfig annotation", c.ingress.Namespace, c.ingress.Name) } @@ -202,7 +202,7 @@ func CheckL7ILBNegAnnotation(c *ServiceChecker) (string, string, string) { } val, ok := getNegAnnotation(c.service) if !ok { - return L7ILBNegAnnotationCheck, report.Failed, fmt.Sprintf("No Neg annotation found in service %s/%s for internal HTTP(S) load balancing", c.service.Namespace, c.service.Name) + return L7ILBNegAnnotationCheck, report.Failed, fmt.Sprintf("No Neg annotation found in service %s/%s for internal HTTP(S) load balancing, internal ingresses requires Neg as backends", c.service.Namespace, c.service.Name) } var res annotations.NegAnnotation if err := json.Unmarshal([]byte(val), &res); err != nil {