You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/02/09 07:47:08 UTC

[GitHub] [apisix-ingress-controller] lianghao208 commented on a change in pull request #252: feat: add support for Endpointslices

lianghao208 commented on a change in pull request #252:
URL: https://github.com/apache/apisix-ingress-controller/pull/252#discussion_r572657698



##########
File path: pkg/ingress/controller/controller.go
##########
@@ -126,20 +123,28 @@ func NewController(cfg *config.Config) (*Controller, error) {
 		crdInformerFactory: sharedInformerFactory,
 		watchingNamespace:  watchingNamespace,
 
-		epInformer:             kube.CoreSharedInformerFactory.Core().V1().Endpoints().Informer(),
-		epLister:               kube.CoreSharedInformerFactory.Core().V1().Endpoints().Lister(),
 		svcInformer:            kube.CoreSharedInformerFactory.Core().V1().Services().Informer(),
 		svcLister:              kube.CoreSharedInformerFactory.Core().V1().Services().Lister(),
 		apisixUpstreamInformer: sharedInformerFactory.Apisix().V1().ApisixUpstreams().Informer(),
 		apisixUpstreamLister:   sharedInformerFactory.Apisix().V1().ApisixUpstreams().Lister(),
 	}
-	c.translator = kube.NewTranslator(&kube.TranslatorOptions{
-		EndpointsLister:      c.epLister,
-		ServiceLister:        c.svcLister,
-		ApisixUpstreamLister: c.apisixUpstreamLister,
-	})
 
-	c.endpointsController = c.newEndpointsController()
+	if c.cfg.EnableEndpointSlice {

Review comment:
       refer to: https://kubernetes.io/docs/tasks/administer-cluster/enabling-endpointslices/
   To determine whether Kubernetes cluster supports the EndpointsSlice resource, some checks needed to be done.
   - kubernetes version
   - whether endpointslice feature gate is enabled
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org