Moving metric naming to it's own package

This commit is contained in:
John Delivuk 2019-02-10 15:58:55 -05:00
parent c2e176bb23
commit 6030912cc0
No known key found for this signature in database
GPG key ID: 8597474A0655625E
12 changed files with 93 additions and 227 deletions

View file

@ -18,6 +18,7 @@ import (
"k8s.io/metrics/pkg/apis/external_metrics"
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
)
// TODO: Make sure everything has the proper licensing disclosure at the top.
@ -56,7 +57,7 @@ func (p *externalPrometheusProvider) ListAllExternalMetrics() []provider.Externa
func (p *externalPrometheusProvider) selectGroupResource(namespace string) schema.GroupResource {
if namespace == "default" {
return nsGroupResource
return naming.NsGroupResource
}
return schema.GroupResource{