diff --git a/apisix/discovery/kubernetes/init.lua b/apisix/discovery/kubernetes/init.lua index 3f5f275d9aff..d16d4f4fcd31 100644 --- a/apisix/discovery/kubernetes/init.lua +++ b/apisix/discovery/kubernetes/init.lua @@ -26,7 +26,7 @@ local error = error local pcall = pcall local setmetatable = setmetatable local is_http = ngx.config.subsystem == "http" -local support_process, process = pcall(require, "ngx.process") +local process = require("ngx.process") local core = require("apisix.core") local util = require("apisix.cli.util") local local_conf = require("apisix.core.config_local").local_conf() @@ -520,11 +520,6 @@ end function _M.init_worker() - if not support_process then - core.log.error("kubernetes discovery not support in subsystem: ", ngx.config.subsystem, - ", please check if your openresty version >= 1.19.9.1 or not") - return - end local discovery_conf = local_conf.discovery.kubernetes core.log.info("kubernetes discovery conf: ", core.json.delay_encode(discovery_conf)) if #discovery_conf == 0 then diff --git a/apisix/discovery/tars/init.lua b/apisix/discovery/tars/init.lua index 14f658dce5d2..17bb2758b199 100644 --- a/apisix/discovery/tars/init.lua +++ b/apisix/discovery/tars/init.lua @@ -23,7 +23,7 @@ local local_conf = require("apisix.core.config_local").local_conf() local core = require("apisix.core") local mysql = require("resty.mysql") local is_http = ngx.config.subsystem == "http" -local support_process, process = pcall(require, "ngx.process") +local process = require("ngx.process") local endpoint_dict @@ -343,12 +343,6 @@ local function get_endpoint_dict() end function _M.init_worker() - if not support_process then - core.log.error("tars discovery not support in subsystem: ", ngx.config.subsystem, - ", please check if your openresty version >= 1.19.9.1 or not") - return - end - endpoint_dict = get_endpoint_dict() if not endpoint_dict then error("failed to get lua_shared_dict: tars, please check your APISIX version") diff --git a/docs/en/latest/discovery/kubernetes.md b/docs/en/latest/discovery/kubernetes.md index 0735471b8145..fb11aac676d1 100644 --- a/docs/en/latest/discovery/kubernetes.md +++ b/docs/en/latest/discovery/kubernetes.md @@ -34,12 +34,6 @@ The [_Kubernetes_](https://kubernetes.io/) service discovery [_List-Watch_](http Discovery also provides a node query interface in accordance with the [_APISIX Discovery Specification_](../discovery.md). -:::note - -use kubernetes discovery in L4 require OpenResty version >= 1.19.9.1 - -::: - ## How To Use Kubernetes service discovery both support single-cluster and multi-cluster modes, applicable to the case where the service is distributed in single or multiple Kubernetes clusters. diff --git a/docs/zh/latest/discovery/kubernetes.md b/docs/zh/latest/discovery/kubernetes.md index 0c390b785fce..c4b751889cf3 100644 --- a/docs/zh/latest/discovery/kubernetes.md +++ b/docs/zh/latest/discovery/kubernetes.md @@ -34,12 +34,6 @@ Kubernetes 服务发现以 [_List-Watch_](https://kubernetes.io/docs/reference/u 同时遵循 [_APISIX Discovery 规范_](../discovery.md) 提供了节点查询接口。 -:::note - -在四层中使用 Kubernetes 服务发现要求 OpenResty 版本大于等于 1.19.9.1 - -::: - ## Kubernetes 服务发现的使用 目前 Kubernetes 服务发现支持单集群和多集群模式,分别适用于待发现的服务分布在单个或多个 Kubernetes 的场景。