From 43bd4798b53fdd3e06ffce160b2003cfe9129361 Mon Sep 17 00:00:00 2001 From: Solly Ross Date: Thu, 28 Sep 2017 17:10:11 -0400 Subject: [PATCH] Update deps for Kubernetes 1.8 This updates the dependencies to be compatible with Kubernetes 1.8, including the new custom.metrics.k8s.io/v1beta1 API group and the corresponding custom-metrics-apiserver changes. --- cmd/adapter/app/start.go | 6 +- glide.lock | 203 ++++++++++++++--------- glide.yaml | 2 - pkg/custom-provider/metric_namer_test.go | 26 ++- pkg/custom-provider/provider.go | 4 +- pkg/custom-provider/provider_test.go | 6 +- 6 files changed, 155 insertions(+), 92 deletions(-) diff --git a/cmd/adapter/app/start.go b/cmd/adapter/app/start.go index f9c64a4cb..ac13095e1 100644 --- a/cmd/adapter/app/start.go +++ b/cmd/adapter/app/start.go @@ -24,9 +24,9 @@ import ( "time" "github.com/spf13/cobra" + apimeta "k8s.io/apimachinery/pkg/api/meta" "k8s.io/client-go/discovery" "k8s.io/client-go/dynamic" - "k8s.io/client-go/pkg/api" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" @@ -112,7 +112,7 @@ func (o PrometheusAdapterServerOptions) RunCustomMetricsAdapterServer(stopCh <-c return fmt.Errorf("unable to construct discovery client for dynamic client: %v", err) } - dynamicMapper, err := dynamicmapper.NewRESTMapper(discoveryClient, api.Registry.InterfacesFor, o.DiscoveryInterval) + dynamicMapper, err := dynamicmapper.NewRESTMapper(discoveryClient, apimeta.InterfacesForUnstructured, o.DiscoveryInterval) if err != nil { return fmt.Errorf("unable to construct dynamic discovery mapper: %v", err) } @@ -133,7 +133,7 @@ func (o PrometheusAdapterServerOptions) RunCustomMetricsAdapterServer(stopCh <-c cmProvider := cmprov.NewPrometheusProvider(dynamicMapper, clientPool, promClient, o.MetricsRelistInterval, o.RateInterval, stopCh) - server, err := config.Complete().New(cmProvider) + server, err := config.Complete().New("prometheus-custom-metrics-adapter", cmProvider) if err != nil { return err } diff --git a/glide.lock b/glide.lock index d389ed743..94bf85b98 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 815ac74b9c61bedb6cc960ca8b9de13ff7584a66f1a0f9fdb80c5c49986a10cf -updated: 2017-08-02T15:16:48.029828608-04:00 +hash: 1d2ad16816cec54a2561278dfd05ae9725247ea9b72db5c7d330f0074d069fad +updated: 2017-09-28T15:22:28.593829441-04:00 imports: - name: bitbucket.org/ww/goautoneg version: 75cd24fc2f2c2a2088577d12123ddee5f54e0675 @@ -8,7 +8,7 @@ imports: subpackages: - quantile - name: github.com/coreos/etcd - version: 20490caaf0dcd96bb4a95e40625559def8ef5b04 + version: 0520cb9304cb2385f7e72b8bc02d6e4d3257158a subpackages: - alarm - auth @@ -79,14 +79,9 @@ imports: - httputil - timeutil - name: github.com/davecgh/go-spew - version: 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d + version: 782f4967f2dc4564575ca782fe2d04090b5faca8 subpackages: - spew -- name: github.com/docker/distribution - version: cd27f179f2c10c5d300e6d09025b538c475b0d51 - subpackages: - - digest - - reference - name: github.com/elazarl/go-bindata-assetfs version: 3dcc96556217539f50599357fb481ac0dc7439b9 - name: github.com/emicklei/go-restful @@ -96,17 +91,13 @@ imports: - name: github.com/emicklei/go-restful-swagger12 version: dcef7f55730566d41eae5db10e7d6981829720f6 - name: github.com/evanphx/json-patch - version: ba18e35c5c1b36ef6334cad706eb681153d2d379 + version: 944e07253867aacae43c04b2e6a239005443f33a - name: github.com/ghodss/yaml version: 73d445a93680fa1a78ae23a5839bad48f32ba1ee -- name: github.com/go-openapi/analysis - version: b44dc874b601d9e4e2f6e19140e794ba24bead3b - name: github.com/go-openapi/jsonpointer version: 46af16f9f7b149af66e5d1bd010e3574dc06de98 - name: github.com/go-openapi/jsonreference version: 13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272 -- name: github.com/go-openapi/loads - version: 18441dfa706d924a39a030ee2c3b1d8d81917b38 - name: github.com/go-openapi/spec version: 6aced65f8501fe1217321abf0749d354824ba2ff - name: github.com/go-openapi/swag @@ -127,14 +118,20 @@ imports: - ptypes/any - ptypes/duration - ptypes/timestamp +- name: github.com/google/btree + version: 7d79101e329e5a3adf994758c578dab82b90c017 - name: github.com/google/gofuzz version: 44d81051d367757e1c7c6a5a86423ece9afcf63c - name: github.com/googleapis/gnostic - version: 68f4ded48ba9414dab2ae69b3f0d69971da73aa5 + version: 0c5108395e2debce0d731cf0287ddf7242066aba subpackages: - OpenAPIv2 - compiler - extensions +- name: github.com/gregjones/httpcache + version: 787624de3eb7bd915c329cba748687a3b22666a6 + subpackages: + - diskcache - name: github.com/grpc-ecosystem/go-grpc-prometheus version: 2500245aa6110c562d17020fb31a2c133d737799 - name: github.com/grpc-ecosystem/grpc-gateway @@ -148,19 +145,22 @@ imports: subpackages: - simplelru - name: github.com/howeyc/gopass - version: 3ca23474a7c7203e0a0a070fd33508f6efdb9b3d + version: bf9dde6d0d2c004a008c27aaee91170c786f6db8 - name: github.com/imdario/mergo version: 6633656539c1639d9d78127b7d47c622b5d7b6dc - name: github.com/inconshreveable/mousetrap version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 +- name: github.com/json-iterator/go + version: 36b14963da70d11297d313183d7e6388c8510e1e - name: github.com/juju/ratelimit - version: 77ed1c8a01217656d2080ad51981f6e99adaa177 + version: 5b9ff866471762aa2ab2dced63c9fb6f53921342 - name: github.com/kubernetes-incubator/custom-metrics-apiserver - version: e17b36ca6ebbec8acbc76d729d24058a09d042ee + version: fae01650d93f5de6151a024e36323344e14427aa subpackages: - pkg/apiserver - pkg/apiserver/installer - pkg/cmd/server + - pkg/dynamicmapper - pkg/provider - pkg/registry/custom_metrics - name: github.com/mailru/easyjson @@ -173,12 +173,20 @@ imports: version: fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a subpackages: - pbutil +- name: github.com/mxk/go-flowrate + version: cca7078d478f8520f85629ad7c68962d31ed7682 + subpackages: + - flowrate +- name: github.com/NYTimes/gziphandler + version: 56545f4a5d46df9a6648819d1664c3a03a13ffdb - name: github.com/pborman/uuid version: ca53cad383cad2479bbba7f7a1a05797ec1386e4 +- name: github.com/peterbourgon/diskv + version: 5f041e8faa004a95c88a202771f4cc3e991971e6 - name: github.com/pkg/errors version: a22138067af1c4942683050411a841ade67fe1eb - name: github.com/prometheus/client_golang - version: e51041b3fa41cece0dca035740ba6411905be473 + version: e7e903064f5e9eb5da98208bae10b475d4db0f8c subpackages: - prometheus - name: github.com/prometheus/client_model @@ -186,12 +194,15 @@ imports: subpackages: - go - name: github.com/prometheus/common - version: ffe929a3f4c4faeaa10f2b9535c2b1be3ad15650 + version: 13ba4ddd0caa9c28ca7b7bffe1dfa9ed8d5ef207 subpackages: - expfmt + - internal/bitbucket.org/ww/goautoneg - model - name: github.com/prometheus/procfs - version: 454a56f35412459b5e684fd5ec0f9211b94f002a + version: 65c1f6f8f0fc1e2185eb9863a3bc751496404259 + subpackages: + - xfs - name: github.com/PuerkitoBio/purell version: 8a290539e2e8629dbc4e6bad948158f790ec31f4 - name: github.com/PuerkitoBio/urlesc @@ -210,13 +221,16 @@ imports: subpackages: - codec - name: golang.org/x/crypto - version: d172538b2cfce0c13cee31e647d0367aa8cd2486 + version: 81e90905daefcd6fd217b62423c0908922eadb30 subpackages: - bcrypt - blowfish + - nacl/secretbox + - poly1305 + - salsa20/salsa - ssh/terminal - name: golang.org/x/net - version: f2499483f923065a842d38eb4c7f1927e6fc6e6d + version: 1c05540f6879653db88113bc4a2b70aec4bd491f subpackages: - context - html @@ -229,13 +243,15 @@ imports: - trace - websocket - name: golang.org/x/sys - version: 8f0908ab3b2457e2e15403d3697c9ef5cb4b57a9 + version: 7ddbeae9ae08c6a06a59597f0c9edbc5ff2444ce subpackages: - unix + - windows - name: golang.org/x/text - version: 2910a502d2bf9e43193af9d68ca516529614eed3 + version: b19bf474d317b857955b12035d2c5acb57ce8b01 subpackages: - cases + - internal - internal/tag - language - runes @@ -245,16 +261,25 @@ imports: - unicode/bidi - unicode/norm - width +- name: google.golang.org/genproto + version: 09f6ed296fc66555a25fe4ce95173148778dfa85 + subpackages: + - googleapis/rpc/status - name: google.golang.org/grpc - version: 777daa17ff9b5daef1cfdf915088a2ada3332bf0 + version: d2e1b51f33ff8c5e4a15560ff049d200e83726c5 subpackages: - codes - credentials + - grpclb/grpc_lb_v1 - grpclog - internal + - keepalive - metadata - naming - peer + - stats + - status + - tap - transport - name: gopkg.in/inf.v0 version: 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4 @@ -262,8 +287,35 @@ imports: version: 20b71e5b60d756d3d2f80def009790325acc2b23 - name: gopkg.in/yaml.v2 version: 53feefa2559fb8dfa8d81baad31be332c97d6c77 +- name: k8s.io/api + version: cadaf100c0a3dd6b254f320d6d651df079ec8e0a + subpackages: + - admissionregistration/v1alpha1 + - apps/v1beta1 + - apps/v1beta2 + - authentication/v1 + - authentication/v1beta1 + - authorization/v1 + - authorization/v1beta1 + - autoscaling/v1 + - autoscaling/v2beta1 + - batch/v1 + - batch/v1beta1 + - batch/v2alpha1 + - certificates/v1beta1 + - core/v1 + - extensions/v1beta1 + - networking/v1 + - policy/v1beta1 + - rbac/v1 + - rbac/v1alpha1 + - rbac/v1beta1 + - scheduling/v1alpha1 + - settings/v1alpha1 + - storage/v1 + - storage/v1beta1 - name: k8s.io/apimachinery - version: 2de00c78cb6d6127fb51b9531c1b3def1cbcac8c + version: 3b05bbfa0a45413bfa184edbf9af617e277962fb subpackages: - pkg/api/equality - pkg/api/errors @@ -284,7 +336,6 @@ imports: - pkg/conversion/unstructured - pkg/fields - pkg/labels - - pkg/openapi - pkg/runtime - pkg/runtime/schema - pkg/runtime/serializer @@ -305,6 +356,7 @@ imports: - pkg/util/json - pkg/util/mergepatch - pkg/util/net + - pkg/util/proxy - pkg/util/rand - pkg/util/runtime - pkg/util/sets @@ -320,13 +372,21 @@ imports: - third_party/forked/golang/netutil - third_party/forked/golang/reflect - name: k8s.io/apiserver - version: c809cf8581e1e44c6174bf5ab4415e6ee39965ca + version: c1e53d745d0fe45bf7d5d44697e6eface25fceca subpackages: - pkg/admission - pkg/admission/initializer + - pkg/admission/plugin/namespace/lifecycle - pkg/apis/apiserver - pkg/apis/apiserver/install - pkg/apis/apiserver/v1alpha1 + - pkg/apis/audit + - pkg/apis/audit/install + - pkg/apis/audit/v1alpha1 + - pkg/apis/audit/v1beta1 + - pkg/apis/audit/validation + - pkg/audit + - pkg/audit/policy - pkg/authentication/authenticator - pkg/authentication/authenticatorfactory - pkg/authentication/group @@ -334,6 +394,7 @@ imports: - pkg/authentication/request/bearertoken - pkg/authentication/request/headerrequest - pkg/authentication/request/union + - pkg/authentication/request/websocket - pkg/authentication/request/x509 - pkg/authentication/serviceaccount - pkg/authentication/token/tokenfile @@ -359,7 +420,6 @@ imports: - pkg/server/healthz - pkg/server/httplog - pkg/server/mux - - pkg/server/openapi - pkg/server/options - pkg/server/routes - pkg/server/routes/data/swagger @@ -370,6 +430,7 @@ imports: - pkg/storage/etcd/metrics - pkg/storage/etcd/util - pkg/storage/etcd3 + - pkg/storage/etcd3/preflight - pkg/storage/names - pkg/storage/storagebackend - pkg/storage/storagebackend/factory @@ -378,28 +439,31 @@ imports: - pkg/util/flag - pkg/util/flushwriter - pkg/util/logs - - pkg/util/proxy - pkg/util/trace - - pkg/util/trie - pkg/util/webhook - pkg/util/wsstream + - plugin/pkg/audit/log + - plugin/pkg/audit/webhook - plugin/pkg/authenticator/token/webhook - plugin/pkg/authorizer/webhook - name: k8s.io/client-go - version: b932a6d0e02c2b5afe156f4dd193a095efd8e954 - repo: https://github.com/directxman12/client-go.git + version: 82aa063804cf055e16e8911250f888bc216e8b61 subpackages: - discovery - dynamic - dynamic/fake - informers + - informers/admissionregistration + - informers/admissionregistration/v1alpha1 - informers/apps - informers/apps/v1beta1 + - informers/apps/v1beta2 - informers/autoscaling - informers/autoscaling/v1 - - informers/autoscaling/v2alpha1 + - informers/autoscaling/v2beta1 - informers/batch - informers/batch/v1 + - informers/batch/v1beta1 - informers/batch/v2alpha1 - informers/certificates - informers/certificates/v1beta1 @@ -408,11 +472,16 @@ imports: - informers/extensions - informers/extensions/v1beta1 - informers/internalinterfaces + - informers/networking + - informers/networking/v1 - informers/policy - informers/policy/v1beta1 - informers/rbac + - informers/rbac/v1 - informers/rbac/v1alpha1 - informers/rbac/v1beta1 + - informers/scheduling + - informers/scheduling/v1alpha1 - informers/settings - informers/settings/v1alpha1 - informers/storage @@ -420,73 +489,50 @@ imports: - informers/storage/v1beta1 - kubernetes - kubernetes/scheme + - kubernetes/typed/admissionregistration/v1alpha1 - kubernetes/typed/apps/v1beta1 + - kubernetes/typed/apps/v1beta2 - kubernetes/typed/authentication/v1 - kubernetes/typed/authentication/v1beta1 - kubernetes/typed/authorization/v1 - kubernetes/typed/authorization/v1beta1 - kubernetes/typed/autoscaling/v1 - - kubernetes/typed/autoscaling/v2alpha1 + - kubernetes/typed/autoscaling/v2beta1 - kubernetes/typed/batch/v1 + - kubernetes/typed/batch/v1beta1 - kubernetes/typed/batch/v2alpha1 - kubernetes/typed/certificates/v1beta1 - kubernetes/typed/core/v1 - kubernetes/typed/extensions/v1beta1 + - kubernetes/typed/networking/v1 - kubernetes/typed/policy/v1beta1 + - kubernetes/typed/rbac/v1 - kubernetes/typed/rbac/v1alpha1 - kubernetes/typed/rbac/v1beta1 + - kubernetes/typed/scheduling/v1alpha1 - kubernetes/typed/settings/v1alpha1 - kubernetes/typed/storage/v1 - kubernetes/typed/storage/v1beta1 + - listers/admissionregistration/v1alpha1 - listers/apps/v1beta1 + - listers/apps/v1beta2 - listers/autoscaling/v1 - - listers/autoscaling/v2alpha1 + - listers/autoscaling/v2beta1 - listers/batch/v1 + - listers/batch/v1beta1 - listers/batch/v2alpha1 - listers/certificates/v1beta1 - listers/core/v1 - listers/extensions/v1beta1 + - listers/networking/v1 - listers/policy/v1beta1 + - listers/rbac/v1 - listers/rbac/v1alpha1 - listers/rbac/v1beta1 + - listers/scheduling/v1alpha1 - listers/settings/v1alpha1 - listers/storage/v1 - listers/storage/v1beta1 - - pkg/api - - pkg/api/install - - pkg/api/v1 - - pkg/api/v1/ref - - pkg/apis/apps - - pkg/apis/apps/v1beta1 - - pkg/apis/authentication - - pkg/apis/authentication/v1 - - pkg/apis/authentication/v1beta1 - - pkg/apis/authorization - - pkg/apis/authorization/v1 - - pkg/apis/authorization/v1beta1 - - pkg/apis/autoscaling - - pkg/apis/autoscaling/v1 - - pkg/apis/autoscaling/v2alpha1 - - pkg/apis/batch - - pkg/apis/batch/v1 - - pkg/apis/batch/v2alpha1 - - pkg/apis/certificates - - pkg/apis/certificates/v1beta1 - - pkg/apis/extensions - - pkg/apis/extensions/install - - pkg/apis/extensions/v1beta1 - - pkg/apis/policy - - pkg/apis/policy/v1beta1 - - pkg/apis/rbac - - pkg/apis/rbac/v1alpha1 - - pkg/apis/rbac/v1beta1 - - pkg/apis/settings - - pkg/apis/settings/v1alpha1 - - pkg/apis/storage - - pkg/apis/storage/v1 - - pkg/apis/storage/v1beta1 - - pkg/util - - pkg/util/parsers - pkg/version - rest - rest/watch @@ -498,17 +544,26 @@ imports: - tools/clientcmd/api/latest - tools/clientcmd/api/v1 - tools/metrics + - tools/pager + - tools/reference - transport - util/cert - util/flowcontrol - util/homedir - util/integer +- name: k8s.io/kube-openapi + version: 868f2f29720b192240e18284659231b440f9cda5 + subpackages: + - pkg/builder + - pkg/common + - pkg/handler + - pkg/util - name: k8s.io/metrics - version: fd2415bb9381a6731027b48a8c6b78f28e13f876 + version: 4c7ac522b9daf7beeb53f6766722ba78b7e5712d subpackages: - pkg/apis/custom_metrics - pkg/apis/custom_metrics/install - - pkg/apis/custom_metrics/v1alpha1 + - pkg/apis/custom_metrics/v1beta1 testImports: - name: github.com/pmezard/go-difflib version: d8ed2627bdf02c080bf22230dbb337003b7aba2d diff --git a/glide.yaml b/glide.yaml index 03b2e1e30..8b3571668 100644 --- a/glide.yaml +++ b/glide.yaml @@ -8,8 +8,6 @@ import: subpackages: - pkg/util/logs - package: k8s.io/client-go - repo: https://github.com/directxman12/client-go.git - version: feature/fake-dynamic-client subpackages: - kubernetes/typed/core/v1 - rest diff --git a/pkg/custom-provider/metric_namer_test.go b/pkg/custom-provider/metric_namer_test.go index c185e8bbb..23cd04c07 100644 --- a/pkg/custom-provider/metric_namer_test.go +++ b/pkg/custom-provider/metric_namer_test.go @@ -24,15 +24,31 @@ import ( pmodel "github.com/prometheus/common/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + coreapi "k8s.io/api/core/v1" + extapi "k8s.io/api/extensions/v1beta1" + apimeta "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/pkg/api" - - // install extensions so that our RESTMapper knows about it - _ "k8s.io/client-go/pkg/apis/extensions/install" prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client" ) +// restMapper creates a RESTMapper with just the types we need for +// these tests. +func restMapper() apimeta.RESTMapper { + mapper := apimeta.NewDefaultRESTMapper([]schema.GroupVersion{coreapi.SchemeGroupVersion}, apimeta.InterfacesForUnstructured) + + mapper.Add(coreapi.SchemeGroupVersion.WithKind("Pod"), apimeta.RESTScopeNamespace) + mapper.Add(coreapi.SchemeGroupVersion.WithKind("Service"), apimeta.RESTScopeNamespace) + mapper.Add(extapi.SchemeGroupVersion.WithKind("Ingress"), apimeta.RESTScopeNamespace) + mapper.Add(extapi.SchemeGroupVersion.WithKind("Deployment"), apimeta.RESTScopeNamespace) + + mapper.Add(coreapi.SchemeGroupVersion.WithKind("Node"), apimeta.RESTScopeRoot) + mapper.Add(coreapi.SchemeGroupVersion.WithKind("PersistentVolume"), apimeta.RESTScopeRoot) + mapper.Add(coreapi.SchemeGroupVersion.WithKind("Namespace"), apimeta.RESTScopeRoot) + + return mapper +} + func setupMetricNamer(t *testing.T) *metricNamer { return &metricNamer{ overrides: map[string]seriesSpec{ @@ -41,7 +57,7 @@ func setupMetricNamer(t *testing.T) *metricNamer { kind: GaugeSeries, }, }, - mapper: api.Registry.RESTMapper(), + mapper: restMapper(), } } diff --git a/pkg/custom-provider/provider.go b/pkg/custom-provider/provider.go index 2a75486dc..801eed788 100644 --- a/pkg/custom-provider/provider.go +++ b/pkg/custom-provider/provider.go @@ -35,8 +35,6 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/dynamic" - "k8s.io/client-go/pkg/api" - _ "k8s.io/client-go/pkg/api/install" "k8s.io/metrics/pkg/apis/custom_metrics" prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client" @@ -86,7 +84,7 @@ func (p *prometheusProvider) metricFor(value pmodel.SampleValue, groupResource s } return &custom_metrics.MetricValue{ - DescribedObject: api.ObjectReference{ + DescribedObject: custom_metrics.ObjectReference{ APIVersion: groupResource.Group + "/" + runtime.APIVersionInternal, Kind: kind.Kind, Name: name, diff --git a/pkg/custom-provider/provider_test.go b/pkg/custom-provider/provider_test.go index c63211ea3..679b58546 100644 --- a/pkg/custom-provider/provider_test.go +++ b/pkg/custom-provider/provider_test.go @@ -28,10 +28,6 @@ import ( "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/runtime/schema" fakedyn "k8s.io/client-go/dynamic/fake" - "k8s.io/client-go/pkg/api" - - // install extensions so that our RESTMapper knows about it - _ "k8s.io/client-go/pkg/apis/extensions/install" prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client" pmodel "github.com/prometheus/common/model" @@ -94,7 +90,7 @@ func setupPrometheusProvider(t *testing.T, stopCh <-chan struct{}) (provider.Cus fakeProm := &fakePromClient{} fakeKubeClient := &fakedyn.FakeClientPool{} - prov := NewPrometheusProvider(api.Registry.RESTMapper(), fakeKubeClient, fakeProm, fakeProviderUpdateInterval, 1*time.Minute, stopCh) + prov := NewPrometheusProvider(restMapper(), fakeKubeClient, fakeProm, fakeProviderUpdateInterval, 1*time.Minute, stopCh) containerSel := prom.MatchSeries("", prom.NameMatches("^container_.*"), prom.LabelNeq("container_name", "POD"), prom.LabelNeq("namespace", ""), prom.LabelNeq("pod_name", "")) namespacedSel := prom.MatchSeries("", prom.LabelNeq("namespace", ""), prom.NameNotMatches("^container_.*"))