// Create takes the representation of a servicePolicy and creates it. Returns the server's representation of the servicePolicy, and an error, if there is any.
// Update takes the representation of a servicePolicy and updates it. Returns the server's representation of the servicePolicy, and an error, if there is any.
// Create takes the representation of a servicePolicy and creates it. Returns the server's representation of the servicePolicy, and an error, if there is any.
// Update takes the representation of a servicePolicy and updates it. Returns the server's representation of the servicePolicy, and an error, if there is any.
v.eventRecorder.Event(vs,v1.EventTypeWarning,"FailedToCreateVirtualService",fmt.Sprintf("Failed to create virtualservice for service %v/%v: %v",service.Namespace,service.Name,err))
log.Error(err,"create virtualservice for service failed.","service",service)
v.eventRecorder.Event(newVirtualService,v1.EventTypeWarning,"FailedToCreateVirtualService",fmt.Sprintf("Failed to create virtualservice for service %v/%v: %v",namespace,name,err))
}else{
log.Info("service doesn't have a tcp port.")
returnnil
v.eventRecorder.Event(newVirtualService,v1.EventTypeWarning,"FailedToUpdateVirtualService",fmt.Sprintf("Failed to update virtualservice for service %v/%v: %v",namespace,name,err))
}
returnerr
}
returnnil
...
...
@@ -299,7 +379,7 @@ func (v *VirtualServiceController) addDestinationRule(obj interface{}) {