Skip to content

Commit

Permalink
fix: nil pointer dereference
Browse files Browse the repository at this point in the history
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
  • Loading branch information
tao12345666333 committed Jun 4, 2021
1 parent 3492d25 commit 620c744
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/ingress/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ func (c *Controller) initWhenStartLeading() {
c.apisixUpstreamLister = apisixFactory.Apisix().V1().ApisixUpstreams().Lister()
c.apisixTlsLister = apisixFactory.Apisix().V1().ApisixTlses().Lister()
c.apisixClusterConfigLister = apisixFactory.Apisix().V2alpha1().ApisixClusterConfigs().Lister()
c.apisixConsumerLister = apisixFactory.Apisix().V2alpha1().ApisixConsumers().Lister()

c.translator = translation.NewTranslator(&translation.TranslatorOptions{
PodCache: c.podCache,
Expand Down Expand Up @@ -230,6 +231,7 @@ func (c *Controller) initWhenStartLeading() {
c.apisixClusterConfigInformer = apisixFactory.Apisix().V2alpha1().ApisixClusterConfigs().Informer()
c.secretInformer = kubeFactory.Core().V1().Secrets().Informer()
c.apisixTlsInformer = apisixFactory.Apisix().V1().ApisixTlses().Informer()
c.apisixConsumerInformer = apisixFactory.Apisix().V2alpha1().ApisixConsumers().Informer()

c.podController = c.newPodController()
c.endpointsController = c.newEndpointsController()
Expand Down

0 comments on commit 620c744

Please sign in to comment.