Skip to content

Commit

Permalink
Update init.lua
Browse files Browse the repository at this point in the history
config watch_endpoint_slices  not watch_endpoint_slices_schema
  • Loading branch information
paradin authored Mar 6, 2024
1 parent 17ad90d commit c5d175c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apisix/discovery/kubernetes/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ local function single_mode_init(conf)

local default_weight = conf.default_weight
local endpoints_informer, err
if conf.watch_endpoint_slices_schema then
if conf.watch_endpoint_slices then
endpoints_informer, err = informer_factory.new("discovery.k8s.io", "v1",
"EndpointSlice", "endpointslices", "")
else
Expand All @@ -445,7 +445,7 @@ local function single_mode_init(conf)
setup_namespace_selector(conf, endpoints_informer)
setup_label_selector(conf, endpoints_informer)

if conf.watch_endpoint_slices_schema then
if conf.watch_endpoint_slices then
endpoints_informer.on_added = on_endpoint_slices_modified
endpoints_informer.on_modified = on_endpoint_slices_modified
else
Expand Down Expand Up @@ -537,7 +537,7 @@ local function multiple_mode_init(confs)
local default_weight = conf.default_weight

local endpoints_informer, err
if conf.watch_endpoint_slices_schema then
if conf.watch_endpoint_slices then
endpoints_informer, err = informer_factory.new("discovery.k8s.io", "v1",
"EndpointSlice", "endpointslices", "")
else
Expand All @@ -551,7 +551,7 @@ local function multiple_mode_init(confs)
setup_namespace_selector(conf, endpoints_informer)
setup_label_selector(conf, endpoints_informer)

if conf.watch_endpoint_slices_schema then
if conf.watch_endpoint_slices then
endpoints_informer.on_added = on_endpoint_slices_modified
endpoints_informer.on_modified = on_endpoint_slices_modified
else
Expand Down

0 comments on commit c5d175c

Please sign in to comment.