v.eventRecorder.Eventf(newDestinationRule,v1.EventTypeWarning,"FailedToCreateDestinationRule","Failed to create destinationrule for service %v/%v: %v",service.Namespace,service.Name,err)
v.eventRecorder.Event(newDestinationRule,v1.EventTypeWarning,"FailedToCreateDestinationRule",fmt.Sprintf("Failed to create destinationrule for service %v/%v: %v",service.Namespace,service.Name,err))
}else{
v.eventRecorder.Eventf(newDestinationRule,v1.EventTypeWarning,"FailedToUpdateDestinationRule","Failed to update destinationrule for service %v/%v: %v",service.Namespace,service.Name,err)
v.eventRecorder.Event(newDestinationRule,v1.EventTypeWarning,"FailedToUpdateDestinationRule",fmt.Sprintf("Failed to update destinationrule for service %v/%v: %v",service.Namespace,service.Name,err))
v.eventRecorder.Eventf(vs,v1.EventTypeWarning,"FailedToCreateVirtualService","Failed to create virtualservice for service %v/%v: %v",service.Namespace,service.Name,err)
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)
returnerr
}
...
...
@@ -293,7 +299,7 @@ func (v *VirtualServiceController) addDestinationRule(obj interface{}) {