From 171b1caf27ec796deaffc474be5561c9a2bc98cd Mon Sep 17 00:00:00 2001 From: spwangxp Date: Fri, 5 May 2023 09:29:57 +0800 Subject: [PATCH] update comment for CompareSvc Signed-off-by: spwangxp --- internal/infrastructure/kubernetes/resource/resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/infrastructure/kubernetes/resource/resource.go b/internal/infrastructure/kubernetes/resource/resource.go index 039d0bf8da4..1143d167a94 100644 --- a/internal/infrastructure/kubernetes/resource/resource.go +++ b/internal/infrastructure/kubernetes/resource/resource.go @@ -34,7 +34,7 @@ func ExpectedServiceSpec(serviceType *egcfgv1a1.ServiceType) corev1.ServiceSpec return serviceSpec } -// CompareSvc Only compare the type, selector and ports(not include nodePort) in case user have modified for some scene. +// CompareSvc compare entire Svc.Spec but ignored the ports[*].nodePort, ClusterIP and ClusterIPs in case user have modified for some scene. func CompareSvc(currentSvc, originalSvc *corev1.Service) bool { return cmp.Equal(currentSvc.Spec, originalSvc.Spec, cmpopts.IgnoreFields(corev1.ServicePort{}, "NodePort"),