k8s: Use versioned struct for ingress discovery
This commit is contained in:
parent
70f3d1e9f9
commit
75aec7d970
|
@ -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 New Issue