adugeek commented on a change in pull request #4880:
URL: https://github.com/apache/apisix/pull/4880#discussion_r694440837



##########
File path: apisix/discovery/k8s.lua
##########
@@ -0,0 +1,472 @@
+local ngx = ngx
+local ipairs = ipairs
+local string = string
+local tonumber = tonumber
+local tostring = tostring
+local math = math
+local os = os
+local process = require("ngx.process")
+local core = require("apisix.core")
+local util = require("apisix.cli.util")
+local http = require("resty.http")
+local endpoints_shared = ngx.shared.discovery
+
+local apiserver_host = ""
+local apiserver_port = ""
+local apiserver_token = ""
+
+local default_weight = 50
+
+local endpoint_lrucache = core.lrucache.new({
+    ttl = 300,
+    count = 1024
+})
+
+local endpoint_cache = {}
+local empty_table = {}
+local pending_resources
+
+local function sort_by_ip(a, b)
+    return a.ip < b.ip
+end
+
+local function on_endpoint_added(endpoint)
+    local subsets = endpoint.subsets
+    if subsets == nil or #subsets == 0 then
+        return
+    end
+
+    local subset = subsets[1]

Review comment:
       Sorry, It's a mistake 




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to