Skip to content

Commit b68bdfb

Browse files
renanqtsblake
authored andcommitted
refactor: use network/v1 api for ingress
1 parent 1c76393 commit b68bdfb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/ingress.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121

2222
"github.com/blake/external-mdns/resource"
2323
"github.com/jpillora/go-tld"
24-
"k8s.io/api/extensions/v1beta1"
24+
v1 "k8s.io/api/networking/v1"
2525
"k8s.io/apimachinery/pkg/util/runtime"
2626
"k8s.io/client-go/informers"
2727
"k8s.io/client-go/tools/cache"
@@ -95,7 +95,7 @@ func (i *IngressSource) onUpdate(oldObj interface{}, newObj interface{}) {
9595
func (i *IngressSource) buildRecords(obj interface{}, action string) ([]resource.Resource, error) {
9696
var records []resource.Resource
9797

98-
ingress, ok := obj.(*v1beta1.Ingress)
98+
ingress, ok := obj.(*v1.Ingress)
9999
if !ok {
100100
return records, nil
101101
}
@@ -147,7 +147,7 @@ func (i *IngressSource) buildRecords(obj interface{}, action string) ([]resource
147147

148148
// NewIngressWatcher creates an IngressSource
149149
func NewIngressWatcher(factory informers.SharedInformerFactory, namespace string, notifyChan chan<- resource.Resource) IngressSource {
150-
ingressInformer := factory.Extensions().V1beta1().Ingresses().Informer()
150+
ingressInformer := factory.Networking().V1().Ingresses().Informer()
151151
i := &IngressSource{
152152
namespace: namespace,
153153
notifyChan: notifyChan,

0 commit comments

Comments
 (0)