From 803ee8426da86bcc02babb0712b3b84bc9a156ce Mon Sep 17 00:00:00 2001 From: Matt Matejczyk Date: Thu, 18 Oct 2018 09:25:27 -0400 Subject: [PATCH 1/6] Add EndpointsLastTriggerTime annotation. --- pkg/apis/core/annotation_key_constants.go | 6 ++++++ staging/src/k8s.io/api/core/v1/annotation_key_constants.go | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/pkg/apis/core/annotation_key_constants.go b/pkg/apis/core/annotation_key_constants.go index a1e6daae496..fb2751803e0 100644 --- a/pkg/apis/core/annotation_key_constants.go +++ b/pkg/apis/core/annotation_key_constants.go @@ -82,4 +82,10 @@ const ( // // Not all cloud providers support this annotation, though AWS & GCE do. AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges" + + // EndpointsLastTriggerTime is the annotation key, set for endpoints objects, that represents the + // timestamp of the last change that triggered the endpoints object update. + // This annotation will be used to compute the in-cluster network programming SLI. See + // https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md + EndpointsLastTriggerTime = "kubernetes.io/endpoints.last-trigger-time" ) diff --git a/staging/src/k8s.io/api/core/v1/annotation_key_constants.go b/staging/src/k8s.io/api/core/v1/annotation_key_constants.go index 16a0cfced13..f4830cbe199 100644 --- a/staging/src/k8s.io/api/core/v1/annotation_key_constants.go +++ b/staging/src/k8s.io/api/core/v1/annotation_key_constants.go @@ -78,4 +78,10 @@ const ( // // Not all cloud providers support this annotation, though AWS & GCE do. AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges" + + // EndpointsLastTriggerTime is the annotation key, set for endpoints objects, that represents the + // timestamp of the last change that triggered the endpoints object update. + // This annotation will be used to compute the in-cluster network programming SLI. See + // https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md + EndpointsLastTriggerTime = "kubernetes.io/endpoints.last-trigger-time" ) From 7f7a4590b96021864fc518e146d2fb75db804ebf Mon Sep 17 00:00:00 2001 From: Matt Matejczyk Date: Fri, 19 Oct 2018 12:19:02 -0400 Subject: [PATCH 2/6] Specify in the documentation that the timestamp will be expressed in milliseconds. --- pkg/apis/core/annotation_key_constants.go | 2 +- staging/src/k8s.io/api/core/v1/annotation_key_constants.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/apis/core/annotation_key_constants.go b/pkg/apis/core/annotation_key_constants.go index fb2751803e0..bbac9189b1d 100644 --- a/pkg/apis/core/annotation_key_constants.go +++ b/pkg/apis/core/annotation_key_constants.go @@ -84,7 +84,7 @@ const ( AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges" // EndpointsLastTriggerTime is the annotation key, set for endpoints objects, that represents the - // timestamp of the last change that triggered the endpoints object update. + // timestamp (in milliseconds) of the last change that triggered the endpoints object update. // This annotation will be used to compute the in-cluster network programming SLI. See // https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md EndpointsLastTriggerTime = "kubernetes.io/endpoints.last-trigger-time" diff --git a/staging/src/k8s.io/api/core/v1/annotation_key_constants.go b/staging/src/k8s.io/api/core/v1/annotation_key_constants.go index f4830cbe199..c8add833da3 100644 --- a/staging/src/k8s.io/api/core/v1/annotation_key_constants.go +++ b/staging/src/k8s.io/api/core/v1/annotation_key_constants.go @@ -80,7 +80,7 @@ const ( AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges" // EndpointsLastTriggerTime is the annotation key, set for endpoints objects, that represents the - // timestamp of the last change that triggered the endpoints object update. + // timestamp (in milliseconds) of the last change that triggered the endpoints object update. // This annotation will be used to compute the in-cluster network programming SLI. See // https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md EndpointsLastTriggerTime = "kubernetes.io/endpoints.last-trigger-time" From 4cdab7c9853bb353a4da4698ddce23d3c12149b4 Mon Sep 17 00:00:00 2001 From: Matt Matejczyk Date: Fri, 19 Oct 2018 13:11:56 -0400 Subject: [PATCH 3/6] Rename and update the doc. --- pkg/apis/core/annotation_key_constants.go | 10 +++++----- .../src/k8s.io/api/core/v1/annotation_key_constants.go | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/apis/core/annotation_key_constants.go b/pkg/apis/core/annotation_key_constants.go index bbac9189b1d..e8ab22fa477 100644 --- a/pkg/apis/core/annotation_key_constants.go +++ b/pkg/apis/core/annotation_key_constants.go @@ -83,9 +83,9 @@ const ( // Not all cloud providers support this annotation, though AWS & GCE do. AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges" - // EndpointsLastTriggerTime is the annotation key, set for endpoints objects, that represents the - // timestamp (in milliseconds) of the last change that triggered the endpoints object update. - // This annotation will be used to compute the in-cluster network programming SLI. See - // https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md - EndpointsLastTriggerTime = "kubernetes.io/endpoints.last-trigger-time" + // EndpointsLastUpdateTriggerTime is the annotation key, set for endpoints objects, that + // represents the timestamp (in milliseconds) of the last change that triggered the endpoints + // object update. This annotation will be used to compute the in-cluster network programming SLI. + // See https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md + EndpointsLastUpdateTriggerTime = "endpoints.kubernetes.io/last-update-trigger-time" ) diff --git a/staging/src/k8s.io/api/core/v1/annotation_key_constants.go b/staging/src/k8s.io/api/core/v1/annotation_key_constants.go index c8add833da3..6929b83c54b 100644 --- a/staging/src/k8s.io/api/core/v1/annotation_key_constants.go +++ b/staging/src/k8s.io/api/core/v1/annotation_key_constants.go @@ -79,9 +79,9 @@ const ( // Not all cloud providers support this annotation, though AWS & GCE do. AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges" - // EndpointsLastTriggerTime is the annotation key, set for endpoints objects, that represents the - // timestamp (in milliseconds) of the last change that triggered the endpoints object update. - // This annotation will be used to compute the in-cluster network programming SLI. See - // https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md - EndpointsLastTriggerTime = "kubernetes.io/endpoints.last-trigger-time" + // EndpointsLastUpdateTriggerTime is the annotation key, set for endpoints objects, that + // represents the timestamp (in milliseconds) of the last change that triggered the endpoints + // object update. This annotation will be used to compute the in-cluster network programming SLI. + // See https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md + EndpointsLastUpdateTriggerTime = "endpoints.kubernetes.io/last-update-trigger-time" ) From d99b68a6e26781a38cabef6ed7cc7038729df7ea Mon Sep 17 00:00:00 2001 From: Matt Matejczyk Date: Fri, 19 Oct 2018 16:57:49 -0400 Subject: [PATCH 4/6] Update annotation name and documentation. --- pkg/apis/core/annotation_key_constants.go | 22 ++++++++++++++----- .../api/core/v1/annotation_key_constants.go | 22 ++++++++++++++----- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/pkg/apis/core/annotation_key_constants.go b/pkg/apis/core/annotation_key_constants.go index e8ab22fa477..fd83b464887 100644 --- a/pkg/apis/core/annotation_key_constants.go +++ b/pkg/apis/core/annotation_key_constants.go @@ -83,9 +83,21 @@ const ( // Not all cloud providers support this annotation, though AWS & GCE do. AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges" - // EndpointsLastUpdateTriggerTime is the annotation key, set for endpoints objects, that - // represents the timestamp (in milliseconds) of the last change that triggered the endpoints - // object update. This annotation will be used to compute the in-cluster network programming SLI. - // See https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md - EndpointsLastUpdateTriggerTime = "endpoints.kubernetes.io/last-update-trigger-time" + // EndpointsLastChangeTriggerTime is the annotation key, set for endpoints objects, that + // represents the timestamp (in milliseconds) of the last change, of some pod or service object, + // that triggered the endpoints object change. In other words, if a Pod / Service changed at time + // T0, that change was observed by endpoints controller at T1, and the Endpoints object was + // changed at T2, the EndpointsLastChangeTriggerTime would be set to T0. + // + // The "endpoints change trigger" here means any Pod or Service change that resulted in the + // Endpoints object change. + // + // Given the definition of the "endpoints change trigger", please note that this annotation will + // be set ONLY for endpoints object changes triggered by either Pod or Service change. If the + // Endpoints object changes due to other reasons, this annotation won't be set (or updated if it's + // already set). + // + // This annotation will be used to compute the in-cluster network programming latency SLI, see + // https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md + EndpointsLastChangeTriggerTime = "endpoints.kubernetes.io/last-change-trigger-time" ) diff --git a/staging/src/k8s.io/api/core/v1/annotation_key_constants.go b/staging/src/k8s.io/api/core/v1/annotation_key_constants.go index 6929b83c54b..8b0f0ebef4f 100644 --- a/staging/src/k8s.io/api/core/v1/annotation_key_constants.go +++ b/staging/src/k8s.io/api/core/v1/annotation_key_constants.go @@ -79,9 +79,21 @@ const ( // Not all cloud providers support this annotation, though AWS & GCE do. AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges" - // EndpointsLastUpdateTriggerTime is the annotation key, set for endpoints objects, that - // represents the timestamp (in milliseconds) of the last change that triggered the endpoints - // object update. This annotation will be used to compute the in-cluster network programming SLI. - // See https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md - EndpointsLastUpdateTriggerTime = "endpoints.kubernetes.io/last-update-trigger-time" + // EndpointsLastChangeTriggerTime is the annotation key, set for endpoints objects, that + // represents the timestamp (in milliseconds) of the last change, of some pod or service object, + // that triggered the endpoints object change. In other words, if a Pod / Service changed at time + // T0, that change was observed by endpoints controller at T1, and the Endpoints object was + // changed at T2, the EndpointsLastChangeTriggerTime would be set to T0. + // + // The "endpoints change trigger" here means any Pod or Service change that resulted in the + // Endpoints object change. + // + // Given the definition of the "endpoints change trigger", please note that this annotation will + // be set ONLY for endpoints object changes triggered by either Pod or Service change. If the + // Endpoints object changes due to other reasons, this annotation won't be set (or updated if it's + // already set). + // + // This annotation will be used to compute the in-cluster network programming latency SLI, see + // https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md + EndpointsLastChangeTriggerTime = "endpoints.kubernetes.io/last-change-trigger-time" ) From f005ea89769f6c889b4ce381fbd0c62c6220080f Mon Sep 17 00:00:00 2001 From: Matt Matejczyk Date: Mon, 22 Oct 2018 14:14:58 -0400 Subject: [PATCH 5/6] Make it clear that the timestamp is a unix time in millis. --- pkg/apis/core/annotation_key_constants.go | 9 +++++---- .../src/k8s.io/api/core/v1/annotation_key_constants.go | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/pkg/apis/core/annotation_key_constants.go b/pkg/apis/core/annotation_key_constants.go index fd83b464887..bbe0b92220d 100644 --- a/pkg/apis/core/annotation_key_constants.go +++ b/pkg/apis/core/annotation_key_constants.go @@ -84,10 +84,11 @@ const ( AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges" // EndpointsLastChangeTriggerTime is the annotation key, set for endpoints objects, that - // represents the timestamp (in milliseconds) of the last change, of some pod or service object, - // that triggered the endpoints object change. In other words, if a Pod / Service changed at time - // T0, that change was observed by endpoints controller at T1, and the Endpoints object was - // changed at T2, the EndpointsLastChangeTriggerTime would be set to T0. + // represents the timestamp (expressed as a Unix time in milliseconds, i.e. the number of + // milliseconds elapsed since January 1, 1970 UTC) of the last change, of some pod or service + // object, that triggered the endpoints object change. In other words, if a Pod / Service changed + // at time T0, that change was observed by endpoints controller at T1, and the Endpoints object + // was changed at T2, the EndpointsLastChangeTriggerTime would be set to T0. // // The "endpoints change trigger" here means any Pod or Service change that resulted in the // Endpoints object change. diff --git a/staging/src/k8s.io/api/core/v1/annotation_key_constants.go b/staging/src/k8s.io/api/core/v1/annotation_key_constants.go index 8b0f0ebef4f..7a1088ad569 100644 --- a/staging/src/k8s.io/api/core/v1/annotation_key_constants.go +++ b/staging/src/k8s.io/api/core/v1/annotation_key_constants.go @@ -80,10 +80,11 @@ const ( AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges" // EndpointsLastChangeTriggerTime is the annotation key, set for endpoints objects, that - // represents the timestamp (in milliseconds) of the last change, of some pod or service object, - // that triggered the endpoints object change. In other words, if a Pod / Service changed at time - // T0, that change was observed by endpoints controller at T1, and the Endpoints object was - // changed at T2, the EndpointsLastChangeTriggerTime would be set to T0. + // represents the timestamp (expressed as a Unix time in milliseconds, i.e. the number of + // milliseconds elapsed since January 1, 1970 UTC) of the last change, of some pod or service + // object, that triggered the endpoints object change. In other words, if a Pod / Service changed + // at time T0, that change was observed by endpoints controller at T1, and the Endpoints object + // was changed at T2, the EndpointsLastChangeTriggerTime would be set to T0. // // The "endpoints change trigger" here means any Pod or Service change that resulted in the // Endpoints object change. From 6ffd88aedac147d847064f0a087fa7befe5011fd Mon Sep 17 00:00:00 2001 From: Matt Matejczyk Date: Mon, 22 Oct 2018 15:47:09 -0400 Subject: [PATCH 6/6] Update the doc to say that we will use RFC 3339 format to store the timestamp. --- pkg/apis/core/annotation_key_constants.go | 10 +++++----- .../src/k8s.io/api/core/v1/annotation_key_constants.go | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/apis/core/annotation_key_constants.go b/pkg/apis/core/annotation_key_constants.go index bbe0b92220d..bef73c0db0b 100644 --- a/pkg/apis/core/annotation_key_constants.go +++ b/pkg/apis/core/annotation_key_constants.go @@ -84,11 +84,11 @@ const ( AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges" // EndpointsLastChangeTriggerTime is the annotation key, set for endpoints objects, that - // represents the timestamp (expressed as a Unix time in milliseconds, i.e. the number of - // milliseconds elapsed since January 1, 1970 UTC) of the last change, of some pod or service - // object, that triggered the endpoints object change. In other words, if a Pod / Service changed - // at time T0, that change was observed by endpoints controller at T1, and the Endpoints object - // was changed at T2, the EndpointsLastChangeTriggerTime would be set to T0. + // represents the timestamp (stored as RFC 3339 date-time string, e.g. '2018-10-22T19:32:52.1Z') + // of the last change, of some Pod or Service object, that triggered the endpoints object change. + // In other words, if a Pod / Service changed at time T0, that change was observed by endpoints + // controller at T1, and the Endpoints object was changed at T2, the + // EndpointsLastChangeTriggerTime would be set to T0. // // The "endpoints change trigger" here means any Pod or Service change that resulted in the // Endpoints object change. diff --git a/staging/src/k8s.io/api/core/v1/annotation_key_constants.go b/staging/src/k8s.io/api/core/v1/annotation_key_constants.go index 7a1088ad569..2c72ec2df2d 100644 --- a/staging/src/k8s.io/api/core/v1/annotation_key_constants.go +++ b/staging/src/k8s.io/api/core/v1/annotation_key_constants.go @@ -80,11 +80,11 @@ const ( AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges" // EndpointsLastChangeTriggerTime is the annotation key, set for endpoints objects, that - // represents the timestamp (expressed as a Unix time in milliseconds, i.e. the number of - // milliseconds elapsed since January 1, 1970 UTC) of the last change, of some pod or service - // object, that triggered the endpoints object change. In other words, if a Pod / Service changed - // at time T0, that change was observed by endpoints controller at T1, and the Endpoints object - // was changed at T2, the EndpointsLastChangeTriggerTime would be set to T0. + // represents the timestamp (stored as RFC 3339 date-time string, e.g. '2018-10-22T19:32:52.1Z') + // of the last change, of some Pod or Service object, that triggered the endpoints object change. + // In other words, if a Pod / Service changed at time T0, that change was observed by endpoints + // controller at T1, and the Endpoints object was changed at T2, the + // EndpointsLastChangeTriggerTime would be set to T0. // // The "endpoints change trigger" here means any Pod or Service change that resulted in the // Endpoints object change.