func (t *tke) NeedUpdate(annotations map[string]string, svc *v1.Service) bool {
	if svc.Spec.Type != v1.ServiceTypeLoadBalancer {
		return true
	}

	if expect, ok := annotations[AnnotationLoadBalancerInternalSubnetID]; ok {
		if svc.Annotations == nil {
			return true
		}
		if actual, ok := svc.Annotations[AnnotationLoadBalancerInternalSubnetID]; !ok || expect != actual {
			return true
		}
	} else {
		if svc.Annotations != nil && svc.Annotations[AnnotationLoadBalancerInternalSubnetID] != "" {
			return true
		}
	}

	return false
}
// NeedUpdate indicate if the service need to update
NeedUpdate indicate if the service need to update
// NeedUpdate indicate if the service need to update
func (t *tke) NeedUpdate(annotations map[string]string, svc *v1.Service) bool {
	if svc.Spec.Type != v1.ServiceTypeLoadBalancer {
		return true
	}
	if expect, ok := annotations[AnnotationLoadBalancerInternalSubnetID]; ok {
		if svc.Annotations == nil {
			return true
		}
		if actual, ok := svc.Annotations[AnnotationLoadBalancerInternalSubnetID]; !ok || expect != actual {
			return true
		}
	} else {
		if svc.Annotations != nil && svc.Annotations[AnnotationLoadBalancerInternalSubnetID] != "" {
			return true
		}
	}
	return false
}
func ( t * tke ) NeedUpdate ( annotations map [ string ] string , svc * v1 . Service ) bool { if svc . Spec . Type != v1 . ServiceTypeLoadBalancer { return true } if expect , ok := annotations [ AnnotationLoadBalancerInternalSubnetID ] ; ok { if svc . Annotations == nil { return true } if actual , ok := svc . Annotations [ AnnotationLoadBalancerInternalSubnetID ] ; ! ok || expect != actual { return true } } else { if svc . Annotations != nil && svc . Annotations [ AnnotationLoadBalancerInternalSubnetID ] != " " { return true } } return false }
NeedUpdate indicate if the service need to update
NeedUpdate indicate if the service need to update