Skip to content

Commit

Permalink
update comment for CompareSvc
Browse files Browse the repository at this point in the history
Signed-off-by: spwangxp <[email protected]>
  • Loading branch information
spwangxp committed May 5, 2023
1 parent e115409 commit 171b1ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/infrastructure/kubernetes/resource/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit 171b1ca

Please sign in to comment.