mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-30 07:59:40 -08:00
Merge pull request #3142 from prometheus/fish/fix-k8s-ingress-type
k8s: Use versioned struct for ingress discovery
This commit is contained in:
commit
a0280cc489
|
@ -28,7 +28,7 @@ import (
|
||||||
"k8s.io/client-go/kubernetes"
|
"k8s.io/client-go/kubernetes"
|
||||||
"k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/pkg/api"
|
||||||
apiv1 "k8s.io/client-go/pkg/api/v1"
|
apiv1 "k8s.io/client-go/pkg/api/v1"
|
||||||
"k8s.io/client-go/pkg/apis/extensions"
|
extensionsv1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
|
||||||
"k8s.io/client-go/rest"
|
"k8s.io/client-go/rest"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
)
|
)
|
||||||
|
@ -244,7 +244,7 @@ func (d *Discovery) Run(ctx context.Context, ch chan<- []*config.TargetGroup) {
|
||||||
ilw := cache.NewListWatchFromClient(reclient, "ingresses", namespace, nil)
|
ilw := cache.NewListWatchFromClient(reclient, "ingresses", namespace, nil)
|
||||||
ingress := NewIngress(
|
ingress := NewIngress(
|
||||||
d.logger.With("kubernetes_sd", "ingress"),
|
d.logger.With("kubernetes_sd", "ingress"),
|
||||||
cache.NewSharedInformer(ilw, &extensions.Ingress{}, resyncPeriod),
|
cache.NewSharedInformer(ilw, &extensionsv1beta1.Ingress{}, resyncPeriod),
|
||||||
)
|
)
|
||||||
go ingress.informer.Run(ctx.Done())
|
go ingress.informer.Run(ctx.Done())
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue