aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/metrics.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/kubernetes/metrics.go')
-rw-r--r--plugin/kubernetes/metrics.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugin/kubernetes/metrics.go b/plugin/kubernetes/metrics.go
index 44220a6f7..8adeb6940 100644
--- a/plugin/kubernetes/metrics.go
+++ b/plugin/kubernetes/metrics.go
@@ -5,10 +5,10 @@ import (
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/kubernetes/object"
-
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
api "k8s.io/api/core/v1"
+ meta "k8s.io/apimachinery/pkg/apis/meta/v1"
)
var (
@@ -37,11 +37,11 @@ var (
durationSinceFunc = time.Since
)
-func recordDNSProgrammingLatency(svcs []*object.Service, endpoints *api.Endpoints) {
+func recordDNSProgrammingLatency(svcs []*object.Service, endpoints meta.Object) {
// getLastChangeTriggerTime is the time.Time value of the EndpointsLastChangeTriggerTime
// annotation stored in the given endpoints object or the "zero" time if the annotation wasn't set
var lastChangeTriggerTime time.Time
- stringVal, ok := endpoints.Annotations[api.EndpointsLastChangeTriggerTime]
+ stringVal, ok := endpoints.GetAnnotations()[api.EndpointsLastChangeTriggerTime]
if ok {
ts, err := time.Parse(time.RFC3339Nano, stringVal)
if err != nil {