mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-06 01:38:10 +00:00
Moving metric naming to it's own package
This commit is contained in:
parent
c2e176bb23
commit
6030912cc0
12 changed files with 93 additions and 227 deletions
|
|
@ -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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue