From ef9dc7601016af22ec619a957a6e7c6d3eb15754 Mon Sep 17 00:00:00 2001 From: Karol Wychowaniec Date: Fri, 9 Mar 2018 14:29:54 +0100 Subject: [PATCH 1/2] Update k8s.io/metric dependency --- .../Godeps/Godeps.json | 370 +++++++++++++----- .../k8s.io/client-go/discovery/cached/BUILD | 45 --- .../client-go/discovery/cached/memcache.go | 185 --------- .../metrics/pkg/apis/custom_metrics/BUILD | 2 +- .../metrics/pkg/apis/custom_metrics/doc.go | 2 +- .../pkg/apis/custom_metrics/install/BUILD | 1 + .../pkg/apis/custom_metrics/v1beta1/BUILD | 1 + .../pkg/apis/custom_metrics/v1beta1/doc.go | 4 +- .../custom_metrics/v1beta1/generated.pb.go | 2 +- .../custom_metrics/v1beta1/generated.proto | 2 +- .../v1beta1/zz_generated.conversion.go | 7 +- .../v1beta1/zz_generated.deepcopy.go | 33 +- .../custom_metrics/zz_generated.deepcopy.go | 37 +- .../metrics/pkg/apis/external_metrics/BUILD | 40 ++ .../metrics/pkg/apis/external_metrics/doc.go | 19 + .../pkg/apis/external_metrics/register.go | 51 +++ .../pkg/apis/external_metrics/types.go | 60 +++ .../external_metrics/zz_generated.deepcopy.go | 101 +++++ 18 files changed, 553 insertions(+), 409 deletions(-) delete mode 100644 custom-metrics-stackdriver-adapter/vendor/k8s.io/client-go/discovery/cached/BUILD delete mode 100644 custom-metrics-stackdriver-adapter/vendor/k8s.io/client-go/discovery/cached/memcache.go create mode 100644 custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/BUILD create mode 100644 custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/doc.go create mode 100644 custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/register.go create mode 100644 custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/types.go create mode 100644 custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/zz_generated.deepcopy.go diff --git a/custom-metrics-stackdriver-adapter/Godeps/Godeps.json b/custom-metrics-stackdriver-adapter/Godeps/Godeps.json index 9f58f761f..855c0321d 100644 --- a/custom-metrics-stackdriver-adapter/Godeps/Godeps.json +++ b/custom-metrics-stackdriver-adapter/Godeps/Godeps.json @@ -275,6 +275,7 @@ }, { "ImportPath": "github.com/juju/ratelimit", + "Comment": "1.0", "Rev": "5b9ff866471762aa2ab2dced63c9fb6f53921342" }, { @@ -589,1107 +590,1252 @@ }, { "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/apps/v1beta1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/apps/v1beta2", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/authentication/v1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/authentication/v1beta1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/authorization/v1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/authorization/v1beta1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/autoscaling/v1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/autoscaling/v2beta1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/batch/v1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/batch/v1beta1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/batch/v2alpha1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/certificates/v1beta1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/core/v1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/extensions/v1beta1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/networking/v1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/policy/v1beta1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/rbac/v1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/rbac/v1alpha1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/rbac/v1beta1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/scheduling/v1alpha1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/settings/v1alpha1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/storage/v1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/api/storage/v1beta1", + "Comment": "kubernetes-1.9.0-alpha.0-38-g0b011bb8", "Rev": "0b011bb8613011ab0909c6a759d9d811dc21a156" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/equality", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/errors", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/meta", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/resource", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/validation", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/validation/path", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/apimachinery", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/validation", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion/unstructured", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/fields", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/labels", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/selection", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/types", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/cache", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/clock", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/diff", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/errors", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/framer", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/intstr", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/json", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/net", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/proxy", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/rand", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/runtime", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/sets", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/uuid", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/wait", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/yaml", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/version", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/pkg/watch", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", + "Comment": "kubernetes-1.8.0-beta.0-21-g1168e53", "Rev": "1168e538ea3ccf444854d1fdd5681d2d876680a7" }, { "ImportPath": "k8s.io/apiserver/pkg/admission", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/admission/initializer", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/apiserver", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/apiserver/install", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/apiserver/v1alpha1", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/audit", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/audit/install", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/audit/v1alpha1", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/audit/v1beta1", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/audit/validation", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/audit", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/audit/policy", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/authenticator", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/authenticatorfactory", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/group", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/request/anonymous", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/request/bearertoken", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/request/headerrequest", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/request/union", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/request/websocket", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/request/x509", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/serviceaccount", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/token/tokenfile", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/user", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/authorization/authorizer", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/authorization/authorizerfactory", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/authorization/union", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints/discovery", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints/filters", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints/handlers", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints/handlers/negotiation", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints/metrics", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints/openapi", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints/request", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/features", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/registry/generic", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/registry/generic/registry", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/registry/rest", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/server", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/server/filters", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/server/healthz", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/server/httplog", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/server/mux", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/server/options", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/server/routes", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/server/routes/data/swagger", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/server/storage", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/storage", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/errors", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/etcd", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/etcd/metrics", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/etcd/util", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/etcd3", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/etcd3/preflight", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/names", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/storagebackend", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/storagebackend/factory", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/value", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/util/feature", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/util/flag", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/util/flushwriter", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/util/logs", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/util/trace", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/util/webhook", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/pkg/util/wsstream", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/plugin/pkg/audit/log", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/plugin/pkg/audit/webhook", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/plugin/pkg/authenticator/token/webhook", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/apiserver/plugin/pkg/authorizer/webhook", + "Comment": "kubernetes-1.8.0-beta.0-63-g19667a1", "Rev": "19667a1afc13cc13930c40a20f2c12bbdcaaa246" }, { "ImportPath": "k8s.io/client-go/discovery", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", - "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" - }, - { - "ImportPath": "k8s.io/client-go/discovery/cached", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/admissionregistration", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1alpha1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/apps", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/apps/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/apps/v1beta2", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/autoscaling", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/autoscaling/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/autoscaling/v2beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/batch", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/batch/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/batch/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/batch/v2alpha1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/certificates", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/certificates/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/core", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/core/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/extensions", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/extensions/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/internalinterfaces", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/networking", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/networking/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/policy", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/policy/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/rbac", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/rbac/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/rbac/v1alpha1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/rbac/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/scheduling", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/scheduling/v1alpha1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/settings", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/settings/v1alpha1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/storage", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/storage/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/informers/storage/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/scheme", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta2", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v2alpha1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/certificates/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/core/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/extensions/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/networking/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/policy/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/settings/v1alpha1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1alpha1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/apps/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/apps/v1beta2", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/autoscaling/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/autoscaling/v2beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/batch/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/batch/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/batch/v2alpha1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/certificates/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/core/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/extensions/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/networking/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/policy/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/rbac/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/rbac/v1alpha1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/rbac/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/scheduling/v1alpha1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/settings/v1alpha1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/storage/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/listers/storage/v1beta1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/pkg/version", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/rest", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/rest/watch", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/testing", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/tools/auth", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/tools/cache", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/tools/clientcmd", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/tools/clientcmd/api", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/tools/clientcmd/api/latest", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/tools/clientcmd/api/v1", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/tools/metrics", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/tools/pager", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/tools/reference", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/transport", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/util/cert", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/util/flowcontrol", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/util/homedir", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { "ImportPath": "k8s.io/client-go/util/integer", - "Comment": "v2.0.0-alpha.0-629-gc6f8cf2c", + "Comment": "kubernetes-1.9.0-alpha.0-36-gc6f8cf2c", "Rev": "c6f8cf2c47d21d55fa0df928291b2580544886c8" }, { @@ -1710,15 +1856,23 @@ }, { "ImportPath": "k8s.io/metrics/pkg/apis/custom_metrics", - "Rev": "4faa73f37a1635813affc8fbc36ba49a15e81a24" + "Comment": "kubernetes-1.10.0-alpha.3-30-g9de7b8b", + "Rev": "9de7b8b42ee02a196dd1822988718c6574732901" }, { "ImportPath": "k8s.io/metrics/pkg/apis/custom_metrics/install", - "Rev": "4faa73f37a1635813affc8fbc36ba49a15e81a24" + "Comment": "kubernetes-1.10.0-alpha.3-30-g9de7b8b", + "Rev": "9de7b8b42ee02a196dd1822988718c6574732901" }, { "ImportPath": "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1", - "Rev": "4faa73f37a1635813affc8fbc36ba49a15e81a24" + "Comment": "kubernetes-1.10.0-alpha.3-30-g9de7b8b", + "Rev": "9de7b8b42ee02a196dd1822988718c6574732901" + }, + { + "ImportPath": "k8s.io/metrics/pkg/apis/external_metrics", + "Comment": "kubernetes-1.10.0-alpha.3-30-g9de7b8b", + "Rev": "9de7b8b42ee02a196dd1822988718c6574732901" } ] } diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/client-go/discovery/cached/BUILD b/custom-metrics-stackdriver-adapter/vendor/k8s.io/client-go/discovery/cached/BUILD deleted file mode 100644 index a1d030d4d..000000000 --- a/custom-metrics-stackdriver-adapter/vendor/k8s.io/client-go/discovery/cached/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["memcache_test.go"], - library = ":go_default_library", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/client-go/discovery/fake:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["memcache.go"], - deps = [ - "//vendor/github.com/emicklei/go-restful-swagger12:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/client-go/discovery/cached/memcache.go b/custom-metrics-stackdriver-adapter/vendor/k8s.io/client-go/discovery/cached/memcache.go deleted file mode 100644 index 7489a5bbf..000000000 --- a/custom-metrics-stackdriver-adapter/vendor/k8s.io/client-go/discovery/cached/memcache.go +++ /dev/null @@ -1,185 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cached - -import ( - "errors" - "fmt" - "sync" - - "github.com/emicklei/go-restful-swagger12" - "github.com/googleapis/gnostic/OpenAPIv2" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/version" - "k8s.io/client-go/discovery" - restclient "k8s.io/client-go/rest" -) - -// memCacheClient can Invalidate() to stay up-to-date with discovery -// information. -// -// TODO: Switch to a watch interface. Right now it will poll anytime -// Invalidate() is called. -type memCacheClient struct { - delegate discovery.DiscoveryInterface - - lock sync.RWMutex - groupToServerResources map[string]*metav1.APIResourceList - groupList *metav1.APIGroupList - cacheValid bool -} - -var ( - ErrCacheEmpty = errors.New("the cache has not been filled yet") - ErrCacheNotFound = errors.New("not found") -) - -var _ discovery.CachedDiscoveryInterface = &memCacheClient{} - -// ServerResourcesForGroupVersion returns the supported resources for a group and version. -func (d *memCacheClient) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) { - d.lock.RLock() - defer d.lock.RUnlock() - if !d.cacheValid { - return nil, ErrCacheEmpty - } - cachedVal, ok := d.groupToServerResources[groupVersion] - if !ok { - return nil, ErrCacheNotFound - } - return cachedVal, nil -} - -// ServerResources returns the supported resources for all groups and versions. -func (d *memCacheClient) ServerResources() ([]*metav1.APIResourceList, error) { - apiGroups, err := d.ServerGroups() - if err != nil { - return nil, err - } - groupVersions := metav1.ExtractGroupVersions(apiGroups) - result := []*metav1.APIResourceList{} - for _, groupVersion := range groupVersions { - resources, err := d.ServerResourcesForGroupVersion(groupVersion) - if err != nil { - return nil, err - } - result = append(result, resources) - } - return result, nil -} - -func (d *memCacheClient) ServerGroups() (*metav1.APIGroupList, error) { - d.lock.RLock() - defer d.lock.RUnlock() - if d.groupList == nil { - return nil, ErrCacheEmpty - } - return d.groupList, nil -} - -func (d *memCacheClient) RESTClient() restclient.Interface { - return d.delegate.RESTClient() -} - -// TODO: Should this also be cached? The results seem more likely to be -// inconsistent with ServerGroups and ServerResources given the requirement to -// actively Invalidate. -func (d *memCacheClient) ServerPreferredResources() ([]*metav1.APIResourceList, error) { - return d.delegate.ServerPreferredResources() -} - -// TODO: Should this also be cached? The results seem more likely to be -// inconsistent with ServerGroups and ServerResources given the requirement to -// actively Invalidate. -func (d *memCacheClient) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error) { - return d.delegate.ServerPreferredNamespacedResources() -} - -func (d *memCacheClient) ServerVersion() (*version.Info, error) { - return d.delegate.ServerVersion() -} - -func (d *memCacheClient) SwaggerSchema(version schema.GroupVersion) (*swagger.ApiDeclaration, error) { - return d.delegate.SwaggerSchema(version) -} - -func (d *memCacheClient) OpenAPISchema() (*openapi_v2.Document, error) { - return d.delegate.OpenAPISchema() -} - -func (d *memCacheClient) Fresh() bool { - d.lock.RLock() - defer d.lock.RUnlock() - // Fresh is supposed to tell the caller whether or not to retry if the cache - // fails to find something. The idea here is that Invalidate will be called - // periodically and therefore we'll always be returning the latest data. (And - // in the future we can watch and stay even more up-to-date.) So we only - // return false if the cache has never been filled. - return d.cacheValid -} - -// Invalidate refreshes the cache, blocking calls until the cache has been -// refreshed. It would be trivial to make a version that does this in the -// background while continuing to respond to requests if needed. -func (d *memCacheClient) Invalidate() { - d.lock.Lock() - defer d.lock.Unlock() - - // TODO: Could this multiplicative set of calls be replaced by a single call - // to ServerResources? If it's possible for more than one resulting - // APIResourceList to have the same GroupVersion, the lists would need merged. - gl, err := d.delegate.ServerGroups() - if err != nil || len(gl.Groups) == 0 { - utilruntime.HandleError(fmt.Errorf("couldn't get current server API group list; will keep using cached value. (%v)", err)) - return - } - - rl := map[string]*metav1.APIResourceList{} - for _, g := range gl.Groups { - for _, v := range g.Versions { - r, err := d.delegate.ServerResourcesForGroupVersion(v.GroupVersion) - if err != nil || len(r.APIResources) == 0 { - utilruntime.HandleError(fmt.Errorf("couldn't get resource list for %v: %v", v.GroupVersion, err)) - if cur, ok := d.groupToServerResources[v.GroupVersion]; ok { - // retain the existing list, if we had it. - r = cur - } else { - continue - } - } - rl[v.GroupVersion] = r - } - } - - d.groupToServerResources, d.groupList = rl, gl - d.cacheValid = true -} - -// NewMemCacheClient creates a new CachedDiscoveryInterface which caches -// discovery information in memory and will stay up-to-date if Invalidate is -// called with regularity. -// -// NOTE: The client will NOT resort to live lookups on cache misses. -func NewMemCacheClient(delegate discovery.DiscoveryInterface) discovery.CachedDiscoveryInterface { - return &memCacheClient{ - delegate: delegate, - groupToServerResources: map[string]*metav1.APIResourceList{}, - } -} diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/BUILD b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/BUILD index 033148042..93225be65 100644 --- a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/BUILD +++ b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/BUILD @@ -13,10 +13,10 @@ go_library( "types.go", "zz_generated.deepcopy.go", ], + importpath = "k8s.io/metrics/pkg/apis/custom_metrics", deps = [ "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/doc.go b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/doc.go index 083943d1c..73997cac1 100644 --- a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/doc.go +++ b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/doc.go @@ -14,6 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package,register +// +k8s:deepcopy-gen=package // +groupName=custom.metrics.k8s.io package custom_metrics diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/install/BUILD b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/install/BUILD index b933da697..34aef6a40 100644 --- a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/install/BUILD +++ b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/install/BUILD @@ -8,6 +8,7 @@ load( go_library( name = "go_default_library", srcs = ["install.go"], + importpath = "k8s.io/metrics/pkg/apis/custom_metrics/install", deps = [ "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/BUILD b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/BUILD index e8f82ae9c..f66b9494d 100644 --- a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/BUILD +++ b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/BUILD @@ -15,6 +15,7 @@ go_library( "zz_generated.conversion.go", "zz_generated.deepcopy.go", ], + importpath = "k8s.io/metrics/pkg/apis/custom_metrics/v1beta1", deps = [ "//vendor/github.com/gogo/protobuf/proto:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/doc.go b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/doc.go index 28ef6f96f..57c08a216 100644 --- a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/doc.go +++ b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/doc.go @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=k8s.io/kubernetes/vendor/k8s.io/metrics/pkg/apis/custom_metrics +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=k8s.io/metrics/pkg/apis/custom_metrics // +k8s:openapi-gen=true package v1beta1 diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/generated.pb.go b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/generated.pb.go index 2a10d06d4..be45d5532 100644 --- a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/generated.pb.go +++ b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/generated.proto b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/generated.proto index 35789c2d4..1b8ad2f79 100644 --- a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/generated.proto +++ b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/zz_generated.conversion.go b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/zz_generated.conversion.go index ce07cbb02..7c7134778 100644 --- a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/zz_generated.conversion.go +++ b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2017 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,15 +16,16 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by conversion-gen. Do not edit it manually! +// Code generated by conversion-gen. DO NOT EDIT. package v1beta1 import ( + unsafe "unsafe" + conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" custom_metrics "k8s.io/metrics/pkg/apis/custom_metrics" - unsafe "unsafe" ) func init() { diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/zz_generated.deepcopy.go b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/zz_generated.deepcopy.go index 5b7800525..e32c52827 100644 --- a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/zz_generated.deepcopy.go +++ b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2017 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,37 +16,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 import ( - conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - reflect "reflect" ) -func init() { - SchemeBuilder.Register(RegisterDeepCopies) -} - -// RegisterDeepCopies adds deep-copy functions to the given scheme. Public -// to allow building arbitrary schemes. -// -// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented. -func RegisterDeepCopies(scheme *runtime.Scheme) error { - return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*MetricValue).DeepCopyInto(out.(*MetricValue)) - return nil - }, InType: reflect.TypeOf(&MetricValue{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*MetricValueList).DeepCopyInto(out.(*MetricValueList)) - return nil - }, InType: reflect.TypeOf(&MetricValueList{})}, - ) -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MetricValue) DeepCopyInto(out *MetricValue) { *out = *in @@ -80,9 +57,8 @@ func (in *MetricValue) DeepCopy() *MetricValue { func (in *MetricValue) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -114,7 +90,6 @@ func (in *MetricValueList) DeepCopy() *MetricValueList { func (in *MetricValueList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/zz_generated.deepcopy.go b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/zz_generated.deepcopy.go index c61d3c4c8..e361cf64a 100644 --- a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/zz_generated.deepcopy.go +++ b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/custom_metrics/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2017 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,41 +16,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package custom_metrics import ( - conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - reflect "reflect" ) -func init() { - SchemeBuilder.Register(RegisterDeepCopies) -} - -// RegisterDeepCopies adds deep-copy functions to the given scheme. Public -// to allow building arbitrary schemes. -// -// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented. -func RegisterDeepCopies(scheme *runtime.Scheme) error { - return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*MetricValue).DeepCopyInto(out.(*MetricValue)) - return nil - }, InType: reflect.TypeOf(&MetricValue{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*MetricValueList).DeepCopyInto(out.(*MetricValueList)) - return nil - }, InType: reflect.TypeOf(&MetricValueList{})}, - conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error { - in.(*ObjectReference).DeepCopyInto(out.(*ObjectReference)) - return nil - }, InType: reflect.TypeOf(&ObjectReference{})}, - ) -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MetricValue) DeepCopyInto(out *MetricValue) { *out = *in @@ -84,9 +57,8 @@ func (in *MetricValue) DeepCopy() *MetricValue { func (in *MetricValue) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -118,9 +90,8 @@ func (in *MetricValueList) DeepCopy() *MetricValueList { func (in *MetricValueList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/BUILD b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/BUILD new file mode 100644 index 000000000..e728e0c7c --- /dev/null +++ b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/BUILD @@ -0,0 +1,40 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "register.go", + "types.go", + "zz_generated.deepcopy.go", + ], + importpath = "k8s.io/metrics/pkg/apis/external_metrics", + deps = [ + "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//staging/src/k8s.io/metrics/pkg/apis/external_metrics/install:all-srcs", + "//staging/src/k8s.io/metrics/pkg/apis/external_metrics/v1beta1:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/doc.go b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/doc.go new file mode 100644 index 000000000..c450a1e3b --- /dev/null +++ b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +k8s:deepcopy-gen=package +// +groupName=external.metrics.k8s.io +package external_metrics diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/register.go b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/register.go new file mode 100644 index 000000000..33dca86c9 --- /dev/null +++ b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/register.go @@ -0,0 +1,51 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package external_metrics + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "external.metrics.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &ExternalMetricValue{}, + &ExternalMetricValueList{}, + ) + return nil +} diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/types.go b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/types.go new file mode 100644 index 000000000..2a9c6e392 --- /dev/null +++ b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/types.go @@ -0,0 +1,60 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package external_metrics + +import ( + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// a list of values for a given metric for some set labels +type ExternalMetricValueList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + + // value of the metric matching a given set of labels + Items []ExternalMetricValue `json:"items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// a metric value for external metric +// A single metric value is identified by metric name and a set of string labels. +// For one metric there can be multiple values with different sets of labels. +type ExternalMetricValue struct { + metav1.TypeMeta `json:",inline"` + + // the name of the metric + MetricName string `json:"metricName"` + + // a set of labels that identify a single time series for the metric + MetricLabels map[string]string `json:"metricLabels"` + + // indicates the time at which the metrics were produced + Timestamp metav1.Time `json:"timestamp"` + + // indicates the window ([Timestamp-Window, Timestamp]) from + // which these metrics were calculated, when returning rate + // metrics calculated from cumulative metrics (or zero for + // non-calculated instantaneous metrics). + WindowSeconds *int64 `json:"window,omitempty"` + + // the value of the metric + Value resource.Quantity `json:"value"` +} diff --git a/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/zz_generated.deepcopy.go b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/zz_generated.deepcopy.go new file mode 100644 index 000000000..b2dc1eb6c --- /dev/null +++ b/custom-metrics-stackdriver-adapter/vendor/k8s.io/metrics/pkg/apis/external_metrics/zz_generated.deepcopy.go @@ -0,0 +1,101 @@ +// +build !ignore_autogenerated + +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package external_metrics + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExternalMetricValue) DeepCopyInto(out *ExternalMetricValue) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.MetricLabels != nil { + in, out := &in.MetricLabels, &out.MetricLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + in.Timestamp.DeepCopyInto(&out.Timestamp) + if in.WindowSeconds != nil { + in, out := &in.WindowSeconds, &out.WindowSeconds + if *in == nil { + *out = nil + } else { + *out = new(int64) + **out = **in + } + } + out.Value = in.Value.DeepCopy() + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalMetricValue. +func (in *ExternalMetricValue) DeepCopy() *ExternalMetricValue { + if in == nil { + return nil + } + out := new(ExternalMetricValue) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ExternalMetricValue) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExternalMetricValueList) DeepCopyInto(out *ExternalMetricValueList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ExternalMetricValue, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalMetricValueList. +func (in *ExternalMetricValueList) DeepCopy() *ExternalMetricValueList { + if in == nil { + return nil + } + out := new(ExternalMetricValueList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ExternalMetricValueList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} From 7352b88af8cc29d5bef8522f1ff545c6b14697ef Mon Sep 17 00:00:00 2001 From: Karol Wychowaniec Date: Fri, 9 Mar 2018 14:09:44 +0100 Subject: [PATCH 2/2] Implement translation between External Metrics API and Stackdriver API --- .../pkg/adapter/provider/provider.go | 26 +++ .../pkg/adapter/provider/translator.go | 174 +++++++++++++++++- .../pkg/adapter/provider/translator_test.go | 125 ++++++++++++- .../pkg/provider/errors.go | 19 +- hack/verify-flags/exceptions.txt | 2 + 5 files changed, 334 insertions(+), 12 deletions(-) diff --git a/custom-metrics-stackdriver-adapter/pkg/adapter/provider/provider.go b/custom-metrics-stackdriver-adapter/pkg/adapter/provider/provider.go index 01151d710..1336782d4 100644 --- a/custom-metrics-stackdriver-adapter/pkg/adapter/provider/provider.go +++ b/custom-metrics-stackdriver-adapter/pkg/adapter/provider/provider.go @@ -32,6 +32,8 @@ import ( "github.com/GoogleCloudPlatform/k8s-stackdriver/custom-metrics-stackdriver-adapter/pkg/provider" "k8s.io/api/core/v1" apimeta "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/metrics/pkg/apis/external_metrics" + "strings" ) // TODO(kawych): @@ -201,6 +203,30 @@ func (p *StackdriverProvider) ListAllMetrics() []provider.MetricInfo { return p.translator.GetMetricsFromSDDescriptorsResp(response) } +// GetExternalMetric queries Stackdriver for external metrics. +func (p *StackdriverProvider) GetExternalMetric(namespace string, metricNameEscaped string, metricSelector labels.Selector) (*external_metrics.ExternalMetricValueList, error) { + metricName := unescapeMetricName(metricNameEscaped) + stackdriverRequest, err := p.translator.GetExternalMetricRequest(metricName, metricSelector) + if err != nil { + return nil, err + } + stackdriverResponse, err := stackdriverRequest.Do() + if err != nil { + return nil, err + } + externalMetricItems, err := p.translator.GetRespForExternalMetric(stackdriverResponse, metricNameEscaped) + if err != nil { + return nil, err + } + return &external_metrics.ExternalMetricValueList{ + Items: externalMetricItems, + }, nil +} + +func unescapeMetricName(metricName string) string { + return strings.Replace(metricName, "|", "/", -1) +} + func min(a, b int) int { if a < b { return a diff --git a/custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator.go b/custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator.go index 4592dbfa6..e6c043c89 100644 --- a/custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator.go +++ b/custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator.go @@ -30,9 +30,20 @@ import ( apimeta "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/selection" "k8s.io/metrics/pkg/apis/custom_metrics" + "k8s.io/metrics/pkg/apis/external_metrics" + "strconv" +) + +var ( + // allowedLabelPrefixes and allowedFullLabelNames specify all metric labels allowed for querying + // External Metrics API. + allowedLabelPrefixes = []string{"metric.label", "resource.label", "metadata.system_label", "metadata.user_label"} + allowedFullLabelNames = []string{"resource.type"} ) const ( @@ -105,6 +116,19 @@ func (t *Translator) GetSDReqForNodes(nodeList *v1.NodeList, metricName string) return t.createListTimeseriesRequest(filter), nil } +// GetExternalMetricRequest returns Stackdriver request for query for external metric. +func (t *Translator) GetExternalMetricRequest(metricName string, metricSelector labels.Selector) (*stackdriver.ProjectsTimeSeriesListCall, error) { + filterForMetric := t.filterForMetric(metricName) + if metricSelector.Empty() { + return t.createListTimeseriesRequest(filterForMetric), nil + } + filterForSelector, err := t.filterForSelector(metricSelector) + if err != nil { + return nil, err + } + return t.createListTimeseriesRequest(joinFilters(filterForMetric, filterForSelector)), nil +} + // GetRespForSingleObject returns translates Stackdriver response to a Custom Metric associated with // a single object. func (t *Translator) GetRespForSingleObject(response *stackdriver.ListTimeSeriesResponse, groupResource schema.GroupResource, metricName string, namespace string, name string) (*custom_metrics.MetricValue, error) { @@ -137,6 +161,41 @@ func (t *Translator) GetRespForMultipleObjects(response *stackdriver.ListTimeSer return t.metricsFor(values, groupResource, metricName, list) } +// GetRespForExternalMetric translates Stackdriver response to list of External Metrics +func (t *Translator) GetRespForExternalMetric(response *stackdriver.ListTimeSeriesResponse, metricName string) ([]external_metrics.ExternalMetricValue, error) { + if len(response.TimeSeries) < 1 { + return nil, provider.NewExternalMetricNotFoundError(metricName) + } + metricValues := []external_metrics.ExternalMetricValue{} + for _, series := range response.TimeSeries { + if len(series.Points) != 1 { + // This shouldn't happen with correct query to Stackdriver + return nil, apierr.NewInternalError(fmt.Errorf("Expected exactly one Point in TimeSeries from Stackdriver, but received %v", len(series.Points))) + } + point := series.Points[0] + endTime, err := time.Parse(time.RFC3339, point.Interval.EndTime) + if err != nil { + return nil, apierr.NewInternalError(fmt.Errorf("Timeseries from Stackdriver has incorrect end time: %s", point.Interval.EndTime)) + } + metricValue := external_metrics.ExternalMetricValue{ + Timestamp: metav1.NewTime(endTime), + MetricName: metricName, + MetricLabels: t.getMetricLabels(series), + } + value := *point.Value + switch { + case value.Int64Value != nil: + metricValue.Value = *resource.NewQuantity(*value.Int64Value, resource.DecimalSI) + case value.DoubleValue != nil: + metricValue.Value = *resource.NewMilliQuantity(int64(*value.DoubleValue*1000), resource.DecimalSI) + default: + return nil, apierr.NewBadRequest(fmt.Sprintf("Expected metric of type DoubleValue or Int64Value, but received TypedValue: %v", value)) + } + metricValues = append(metricValues, metricValue) + } + return metricValues, nil +} + // ListMetricDescriptors returns Stackdriver request for all custom metrics descriptors. func (t *Translator) ListMetricDescriptors() *stackdriver.ProjectsMetricDescriptorsListCall { var filter string @@ -187,6 +246,29 @@ func getNodeNames(list *v1.NodeList) []string { return resourceNames } +func isAllowedLabelName(labelName string) bool { + for _, prefix := range allowedLabelPrefixes { + if strings.HasPrefix(labelName, prefix+".") { + return true + } + } + for _, name := range allowedFullLabelNames { + if labelName == name { + return true + } + } + return false +} + +func splitMetricLabel(labelName string) (string, string, error) { + for _, prefix := range allowedLabelPrefixes { + if strings.HasPrefix(labelName, prefix+".") { + return prefix, strings.TrimPrefix(labelName, prefix+"."), nil + } + } + return "", "", apierr.NewBadRequest(fmt.Sprintf("Label name: %s is not allowed.", labelName)) +} + func getResourceIDs(list *v1.PodList) []string { resourceIDs := []string{} for _, item := range list.Items { @@ -195,6 +277,14 @@ func getResourceIDs(list *v1.PodList) []string { return resourceIDs } +func quoteAll(list []string) []string { + result := []string{} + for _, item := range list { + result = append(result, fmt.Sprintf("%q", item)) + } + return result +} + func joinFilters(filters ...string) string { return strings.Join(filters, " AND ") } @@ -265,6 +355,87 @@ func (t *Translator) legacyFilterForPods(podIDs []string) string { return fmt.Sprintf("resource.label.pod_id = one_of(%s)", strings.Join(podIDs, ",")) } +func (t *Translator) filterForSelector(metricSelector labels.Selector) (string, error) { + requirements, selectable := metricSelector.Requirements() + if !selectable { + return "", apierr.NewBadRequest(fmt.Sprintf("Label selector is impossible to match: %s", metricSelector)) + } + filters := []string{} + for _, req := range requirements { + switch req.Operator() { + case selection.Equals, selection.DoubleEquals: + if isAllowedLabelName(req.Key()) { + filters = append(filters, fmt.Sprintf("%s = %q", req.Key(), req.Values().List()[0])) + } else { + return "", provider.NewLabelNotAllowedError(req.Key()) + } + case selection.NotEquals: + if isAllowedLabelName(req.Key()) { + filters = append(filters, fmt.Sprintf("%s != %q", req.Key(), req.Values().List()[0])) + } else { + return "", provider.NewLabelNotAllowedError(req.Key()) + } + case selection.In: + if isAllowedLabelName(req.Key()) { + filters = append(filters, fmt.Sprintf("%s = one_of(%s)", req.Key(), strings.Join(quoteAll(req.Values().List()), ","))) + } else { + return "", provider.NewLabelNotAllowedError(req.Key()) + } + case selection.NotIn: + if isAllowedLabelName(req.Key()) { + filters = append(filters, fmt.Sprintf("NOT %s = one_of(%s)", req.Key(), strings.Join(quoteAll(req.Values().List()), ","))) + } else { + return "", provider.NewLabelNotAllowedError(req.Key()) + } + case selection.Exists: + prefix, suffix, err := splitMetricLabel(req.Key()) + if err == nil { + filters = append(filters, fmt.Sprintf("%s : %s", prefix, suffix)) + } else { + return "", provider.NewLabelNotAllowedError(req.Key()) + } + case selection.DoesNotExist: + // DoesNotExist is not allowed due to Stackdriver filtering syntax limitation + return "", apierr.NewBadRequest("Label selector with operator DoesNotExist is not allowed") + case selection.GreaterThan: + if isAllowedLabelName(req.Key()) { + value, err := strconv.ParseInt(req.Values().List()[0], 10, 64) + if err != nil { + return "", apierr.NewInternalError(fmt.Errorf("Unexpected error: value %s could not be parsed to integer", req.Values().List()[0])) + } + filters = append(filters, fmt.Sprintf("%s > %v", req.Key(), value)) + } else { + return "", provider.NewLabelNotAllowedError(req.Key()) + } + case selection.LessThan: + if isAllowedLabelName(req.Key()) { + value, err := strconv.ParseInt(req.Values().List()[0], 10, 64) + if err != nil { + return "", apierr.NewInternalError(fmt.Errorf("Unexpected error: value %s could not be parsed to integer", req.Values().List()[0])) + } + filters = append(filters, fmt.Sprintf("%s < %v", req.Key(), value)) + } else { + return "", provider.NewLabelNotAllowedError(req.Key()) + } + default: + return "", provider.NewOperationNotSupportedError(fmt.Sprintf("Selector with operator %q", req.Operator())) + } + } + return strings.Join(filters, " AND "), nil +} + +func (t *Translator) getMetricLabels(series *stackdriver.TimeSeries) map[string]string { + metricLabels := map[string]string{} + for label, value := range series.Metric.Labels { + metricLabels["metric.label."+label] = value + } + metricLabels["resource.type"] = series.Resource.Type + for label, value := range series.Resource.Labels { + metricLabels["resource.label."+label] = value + } + return metricLabels +} + func (t *Translator) createListTimeseriesRequest(filter string) *stackdriver.ProjectsTimeSeriesListCall { project := fmt.Sprintf("projects/%s", t.config.Project) endTime := t.clock.Now() @@ -281,9 +452,6 @@ func (t *Translator) getMetricValuesFromResponse(groupResource schema.GroupResou return nil, provider.NewMetricNotFoundError(groupResource, metricName) } metricValues := make(map[string]resource.Quantity) - // Find time series with specified labels matching - // Stackdriver API doesn't allow complex label filtering (i.e. "label1 = x AND (label2 = y OR label2 = z)"), - // therefore only part of the filters is passed and remaining filtering is done here. for _, series := range response.TimeSeries { if len(series.Points) != 1 { // This shouldn't happen with correct query to Stackdriver diff --git a/custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator_test.go b/custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator_test.go index 9d2867ada..11768b8de 100644 --- a/custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator_test.go +++ b/custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator_test.go @@ -27,11 +27,15 @@ import ( "github.com/golang/glog" sd "google.golang.org/api/monitoring/v3" "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/selection" "k8s.io/metrics/pkg/apis/custom_metrics" + "k8s.io/metrics/pkg/apis/external_metrics" ) var ( @@ -98,7 +102,7 @@ func TestTranslator_GetSDReqForPods_Multiple(t *testing.T) { metricName := "my/custom/metric" request, err := translator.GetSDReqForPods(&v1.PodList{Items: []v1.Pod{pod1, pod2}}, metricName, "default") if err != nil { - t.Errorf("Translation error: %s", err) + t.Fatalf("Translation error: %s", err) } expectedRequest := sdService.Projects.TimeSeries.List("projects/my-project"). Filter("metric.type = \"custom.googleapis.com/my/custom/metric\" " + @@ -166,7 +170,7 @@ func TestTranslator_GetSDReqForPods_legacyResourceModel(t *testing.T) { metricName := "my/custom/metric" request, err := translator.GetSDReqForPods(&v1.PodList{Items: []v1.Pod{pod1, pod2}}, metricName, "default") if err != nil { - t.Errorf("Translation error: %s", err) + t.Fatalf("Translation error: %s", err) } expectedRequest := sdService.Projects.TimeSeries.List("projects/my-project"). Filter("metric.type = \"custom.googleapis.com/my/custom/metric\" " + @@ -256,8 +260,7 @@ func TestTranslator_GetRespForPod_legacyResourceType(t *testing.T) { } metric, err := translator.GetRespForSingleObject(response, schema.GroupResource{Resource: "Pod", Group: ""}, "my/custom/metric", "my-namespace", "my-pod-name") if err != nil { - t.Errorf("Translation error: %s", err) - return + t.Fatalf("Translation error: %s", err) } expectedMetric := &custom_metrics.MetricValue{ Value: *resource.NewQuantity(151, resource.DecimalSI), @@ -293,7 +296,7 @@ func TestTranslator_GetRespForPods_legacyResourceType(t *testing.T) { } metrics, err := translator.GetRespForMultipleObjects(response, translator.getPodItems(&v1.PodList{Items: []v1.Pod{pod}}), schema.GroupResource{Resource: "Pod"}, "my/custom/metric") if err != nil { - t.Errorf("Translation error: %s", err) + t.Fatalf("Translation error: %s", err) } expectedMetrics := []custom_metrics.MetricValue{ { @@ -369,6 +372,112 @@ func TestTranslator_GetMetricsFromSDDescriptorsResp(t *testing.T) { } } +func TestTranslator_GetExternalMetricRequest_NoSelector(t *testing.T) { + translator, sdService := newFakeTranslatorForExternalMetrics(time.Minute, "my-project", time.Date(2017, 1, 2, 13, 1, 0, 0, time.UTC)) + request, err := translator.GetExternalMetricRequest("custom.googleapis.com/my/metric/name", labels.NewSelector()) + if err != nil { + t.Fatalf("Translation error: %s", err) + } + expectedRequest := sdService.Projects.TimeSeries.List("projects/my-project"). + Filter("metric.type = \"custom.googleapis.com/my/metric/name\""). + IntervalStartTime("2017-01-02T13:00:00Z"). + IntervalEndTime("2017-01-02T13:01:00Z"). + AggregationPerSeriesAligner("ALIGN_NEXT_OLDER"). + AggregationAlignmentPeriod("60s") + if !reflect.DeepEqual(*request, *expectedRequest) { + t.Errorf("Unexpected result. Expected \n%s,\n received: \n%s", *expectedRequest, *request) + } +} + +func TestTranslator_GetExternalMetricRequest_CorrectSelector(t *testing.T) { + translator, sdService := newFakeTranslatorForExternalMetrics(time.Minute, "my-project", time.Date(2017, 1, 2, 13, 1, 0, 0, time.UTC)) + req1, _ := labels.NewRequirement("resource.type", selection.Equals, []string{"k8s_pod"}) + req2, _ := labels.NewRequirement("resource.label.project_id", selection.Equals, []string{"my-project"}) + req3, _ := labels.NewRequirement("resource.label.pod_name", selection.Exists, []string{}) + req4, _ := labels.NewRequirement("resource.label.namespace_name", selection.NotIn, []string{"default", "kube-system"}) + req5, _ := labels.NewRequirement("metric.label.my_label", selection.GreaterThan, []string{"86"}) + request, err := translator.GetExternalMetricRequest("custom.googleapis.com/my/metric/name", labels.NewSelector().Add(*req1, *req2, *req3, *req4, *req5)) + if err != nil { + t.Fatalf("Translation error: %s", err) + } + expectedRequest := sdService.Projects.TimeSeries.List("projects/my-project"). + Filter("metric.type = \"custom.googleapis.com/my/metric/name\" " + + "AND metric.label.my_label > 86 " + + "AND NOT resource.label.namespace_name = one_of(\"default\",\"kube-system\") " + + "AND resource.label : pod_name " + + "AND resource.label.project_id = \"my-project\" " + + "AND resource.type = \"k8s_pod\""). + IntervalStartTime("2017-01-02T13:00:00Z"). + IntervalEndTime("2017-01-02T13:01:00Z"). + AggregationPerSeriesAligner("ALIGN_NEXT_OLDER"). + AggregationAlignmentPeriod("60s") + if !reflect.DeepEqual(*request, *expectedRequest) { + t.Errorf("Unexpected result. Expected \n%s,\n received: \n%s", *expectedRequest, *request) + } +} + +func TestTranslator_GetExternalMetricRequest_InvalidLabel(t *testing.T) { + translator, _ := newFakeTranslatorForExternalMetrics(time.Minute, "my-project", time.Date(2017, 1, 2, 13, 1, 0, 0, time.UTC)) + _, err := translator.GetExternalMetricRequest("custom.googleapis.com/my/metric/name", labels.SelectorFromSet(labels.Set{ + "arbitrary-label": "foo", + })) + expectedError := provider.NewLabelNotAllowedError("arbitrary-label") + if *err.(*errors.StatusError) != *expectedError { + t.Errorf("Expected status error: %s, but received: %s", expectedError, err) + } +} + +func TestTranslator_GetExternalMetricRequest_OneInvalidRequirement(t *testing.T) { + translator, _ := newFakeTranslatorForExternalMetrics(time.Minute, "my-project", time.Date(2017, 1, 2, 13, 1, 0, 0, time.UTC)) + req1, _ := labels.NewRequirement("resource.type", selection.Equals, []string{"k8s_pod"}) + req2, _ := labels.NewRequirement("resource.label.pod_name", selection.Exists, []string{}) + req3, _ := labels.NewRequirement("resource.label.namespace_name", selection.NotIn, []string{"default", "kube-system"}) + req4, _ := labels.NewRequirement("metric.label.my_label", selection.DoesNotExist, []string{}) + _, err := translator.GetExternalMetricRequest("custom.googleapis.com/my/metric/name", labels.NewSelector().Add(*req1, *req2, *req3, *req4)) + expectedError := errors.NewBadRequest("Label selector with operator DoesNotExist is not allowed") + if *err.(*errors.StatusError) != *expectedError { + t.Errorf("Expected status error: %s, but received: %s", expectedError, err) + } +} + +func TestTranslator_GetRespForExternalMetric(t *testing.T) { + translator, _ := newFakeTranslatorForExternalMetrics(time.Minute, "my-project", time.Date(2017, 1, 2, 13, 1, 0, 0, time.UTC)) + var val int64 = 151 + response := &sd.ListTimeSeriesResponse{ + TimeSeries: []*sd.TimeSeries{{ + Resource: &sd.MonitoredResource{Type: "gke_container", Labels: map[string]string{"pod_id": "my-pod-id"}}, + MetricKind: "GAUGE", + ValueType: "INT64", + Metric: &sd.Metric{Type: "custom.googleapis.com/my/custom/metric", Labels: map[string]string{"foo": "bar"}}, + Points: []*sd.Point{{Interval: &sd.TimeInterval{StartTime: "2017-01-02T13:00:00Z", EndTime: "2017-01-02T13:01:00Z"}, Value: &sd.TypedValue{Int64Value: &val}}}, + }}, + } + metrics, err := translator.GetRespForExternalMetric(response, "my/custom/metric") + if err != nil { + t.Fatalf("Translation error: %s", err) + } + expectedMetrics := []external_metrics.ExternalMetricValue{ + { + Value: *resource.NewQuantity(151, resource.DecimalSI), + Timestamp: metav1.Date(2017, 1, 2, 13, 1, 0, 0, time.UTC), + MetricName: "my/custom/metric", + MetricLabels: map[string]string{ + "resource.type": "gke_container", + "resource.label.pod_id": "my-pod-id", + "metric.label.foo": "bar", + }, + }, + } + if len(metrics) != len(expectedMetrics) { + t.Errorf("Unexpected result. Expected %s metrics, received %s", len(expectedMetrics), len(metrics)) + } + for i := range metrics { + if !reflect.DeepEqual(metrics[i], expectedMetrics[i]) { + t.Errorf("Unexpected result. Expected: \n%s,\n received: \n%s", expectedMetrics[i], metrics[i]) + } + } +} + func newFakeTranslator(reqWindow time.Duration, metricPrefix, project, cluster, location string, currentTime time.Time, useNewResourceModel bool) (*Translator, *sd.Service) { sdService, err := sd.New(http.DefaultClient) if err != nil { @@ -391,3 +500,9 @@ func newFakeTranslator(reqWindow time.Duration, metricPrefix, project, cluster, useNewResourceModel: useNewResourceModel, }, sdService } + +// newFakeTranslatorForExternalMetrics returns a simplified translator, where only the fields used +// for External Metrics API need to be specified. Other fields are initialized to zeros. +func newFakeTranslatorForExternalMetrics(reqWindow time.Duration, project string, currentTime time.Time) (*Translator, *sd.Service) { + return newFakeTranslator(reqWindow, "", project, "", "", currentTime, false) +} diff --git a/custom-metrics-stackdriver-adapter/pkg/provider/errors.go b/custom-metrics-stackdriver-adapter/pkg/provider/errors.go index eb090df29..f9f4cd224 100644 --- a/custom-metrics-stackdriver-adapter/pkg/provider/errors.go +++ b/custom-metrics-stackdriver-adapter/pkg/provider/errors.go @@ -26,18 +26,29 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -// NewMetricNotFoundError returns a StatusError indicating the given metric could not be found. -// It is similar to NewNotFound, but more specialized +// NewMetricNotFoundError returns a StatusError indicating that the given metric could not be found. +// It is similar to NewNotFound, but more specialized. func NewMetricNotFoundError(resource schema.GroupResource, metricName string) *apierr.StatusError { return newMetricNotFoundWithMessageError(fmt.Sprintf("the server could not find the metric %s for %s", metricName, resource.String())) } -// NewMetricNotFoundForError returns a StatusError indicating the given metric could not be found for -// the given named object. It is similar to NewNotFound, but more specialized +// NewMetricNotFoundForError returns a StatusError indicating that the given metric could not be +// found for the given named object. It is similar to NewNotFound, but more specialized. func NewMetricNotFoundForError(resource schema.GroupResource, metricName string, resourceName string) *apierr.StatusError { return newMetricNotFoundWithMessageError(fmt.Sprintf("the server could not find the metric %s for %s %s", metricName, resource.String(), resourceName)) } +// NewExternalMetricNotFoundError returns a status error indicating that the given metric could +// not be found. It is similar to NewNotFound, but more specialized. +func NewExternalMetricNotFoundError(metricName string) *apierr.StatusError { + return newMetricNotFoundWithMessageError("the server could not find the metric %s for provided labels") +} + +// NewLabelNotAllowedError returns a status error indicating that the given label is forbidden. +func NewLabelNotAllowedError(label string) *apierr.StatusError { + return apierr.NewBadRequest(fmt.Sprintf("Metric label: %q is not allowed", label)) +} + // NewOperationNotSupportedError returns a StatusError indicating that the invoked API call is not // supported. func NewOperationNotSupportedError(operation string) *apierr.StatusError { diff --git a/hack/verify-flags/exceptions.txt b/hack/verify-flags/exceptions.txt index a00fb3f98..fd8f4086b 100644 --- a/hack/verify-flags/exceptions.txt +++ b/hack/verify-flags/exceptions.txt @@ -11,11 +11,13 @@ custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator.go: return f custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator.go: return timeSeries.Resource.Labels["pod_id"], nil custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator.go: return "resource.label.pod_id != \"\" AND resource.label.pod_id != \"machine\"" custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator.go: return fmt.Sprintf("resource.label.pod_id = one_of(%s)", strings.Join(podIDs, ",")) +custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator_test.go: "resource.label.pod_id": "my-pod-id", custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator_test.go: "AND resource.label.container_name = \"\" AND resource.label.pod_id != \"\" " + custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator_test.go: "AND resource.label.pod_id != \"machine\"") custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator_test.go: "AND resource.label.pod_id = one_of(\"my-pod-id-1\",\"my-pod-id-2\")"). custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator_test.go: Resource: &sd.MonitoredResource{Type: "gke_container", Labels: map[string]string{"pod_id": "my-pod-id"}}, custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator_test.go: Resource: &sd.MonitoredResource{Type: "gke_container", Labels: map[string]string{"pod_id": "my-pod-id"}}, +custom-metrics-stackdriver-adapter/pkg/adapter/provider/translator_test.go: Resource: &sd.MonitoredResource{Type: "gke_container", Labels: map[string]string{"pod_id": "my-pod-id"}}, kubelet-to-gcm/monitor/controller/translator.go: "namespace_id": "", kubelet-to-gcm/monitor/controller/translator.go: "pod_id": "machine", kubelet-to-gcm/monitor/kubelet/translate.go: "namespace_id": namespace,