mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Clear EndpointsLastChangeTriggerTime on no-change.
We should clean the EndpointsLastChangeTriggerTime annotation when there is no new trigger time to be exported. Not clearing it may result in kube-proxy exporting the wrong Network Programming Latency SLI.
This commit is contained in:
@@ -522,6 +522,8 @@ func (e *EndpointController) syncService(key string) error {
|
||||
if !endpointsLastChangeTriggerTime.IsZero() {
|
||||
newEndpoints.Annotations[v1.EndpointsLastChangeTriggerTime] =
|
||||
endpointsLastChangeTriggerTime.Format(time.RFC3339Nano)
|
||||
} else { // No new trigger time, clear the annotation.
|
||||
delete(newEndpoints.Annotations, v1.EndpointsLastChangeTriggerTime)
|
||||
}
|
||||
|
||||
klog.V(4).Infof("Update endpoints for %v/%v, ready: %d not ready: %d", service.Namespace, service.Name, totalReadyEps, totalNotReadyEps)
|
||||
|
||||
Reference in New Issue
Block a user