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

chore: remove check of OpenResty in code because APISIX can not start when using an old version of OpenResty #9926

Merged
merged 1 commit into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
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
7 changes: 1 addition & 6 deletions apisix/discovery/kubernetes/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions apisix/discovery/tars/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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")
Expand Down
6 changes: 0 additions & 6 deletions docs/en/latest/discovery/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 0 additions & 6 deletions docs/zh/latest/discovery/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 的场景。
Expand Down
Loading