remove useless logs

This commit is contained in:
Jeff
2019-05-16 00:59:56 +08:00
committed by zryfish
parent 502a7d33e6
commit 273aa0102a
7 changed files with 36 additions and 52 deletions

View File

@@ -211,9 +211,9 @@ func (v *DestinationRuleController) syncService(key string) error {
service, err := v.serviceLister.Services(namespace).Get(name)
if err != nil {
// Delete the corresponding destinationrule, as the service has been deleted.
// Delete the corresponding destinationrule if there is any, as the service has been deleted.
err = v.destinationRuleClient.NetworkingV1alpha3().DestinationRules(namespace).Delete(name, nil)
if !errors.IsNotFound(err) {
if err != nil && !errors.IsNotFound(err) {
log.Error(err, "delete destination rule failed", "namespace", namespace, "name", name)
return err
}

View File

@@ -264,9 +264,7 @@ func (v *VirtualServiceController) syncService(key string) error {
subsets := destinationRule.Spec.Subsets
if len(subsets) == 0 {
// destination rule with no subsets, not possibly
err = fmt.Errorf("found destinationrule with no subsets for service %s", name)
log.Error(err, "found destinationrule with no subsets", "namespace", namespace, "name", appName)
return err
return nil
}
// fetch all strategies applied to service