Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(k8s): watch_endpoint_slices_schema should be watch_endpoint_slices #11000

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if conf.watch_endpoint_slices then
if conf.watch_endpoint_slices then

I don't understand why would you need that? What is the problem it is trying to solve here?

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
Loading