[GitHub] [apisix] spacewander commented on a change in pull request #5479: feat(plugin): azure serverless functions
spacewander commented on a change in pull request #5479: URL: https://github.com/apache/apisix/pull/5479#discussion_r750978154 ## File path: apisix/plugins/azure-functions.lua ## @@ -0,0 +1,113 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one or more +-- contributor license agreements. See the NOTICE file distributed with +-- this work for additional information regarding copyright ownership. +-- The ASF licenses this file to You under the Apache License, Version 2.0 +-- (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +local core = require("apisix.core") +local http = require("resty.http") +local ngx = ngx +local getenv = os.getenv +local plugin_name = "azure-functions" + +local env_key = { +API = "AZURE_FUNCTIONS_APIKEY", +CLIENT_ID = "AZURE_FUNCTIONS_CLIENTID" +} + +local schema = { +type = "object", +properties = { +function_uri = {type = "string"}, +authorization = { +type = "object", +properties = { +apikey = {type = "string"}, +clientid = {type = "string"} +} +}, +timeout = {type = "integer", minimum = 1000, default = 3000}, +ssl_verify = {type = "boolean", default = true}, +keepalive = {type = "boolean", default = true}, +keepalive_timeout = {type = "integer", minimum = 1000, default = 6}, +keepalive_pool = {type = "integer", minimum = 1, default = 5} +}, +required = {"function_uri"} +} + +local _M = { +version = 0.1, +priority = 505, +name = plugin_name, +schema = schema, +} + +function _M.check_schema(conf) +return core.schema.check(schema, conf) +end + +function _M.access(conf, ctx) +local uri_args = core.request.get_uri_args(ctx) +local headers = core.request.headers(ctx) or {} +local req_body, err = core.request.get_body() + +if err then +core.log.error("error while reading request body: " .. err) +return 400 +end + +-- set authorization headers if not already set by the client +-- we are following not to overwrite the authz keys +if not headers["x-functions-key"] and +not headers["x-functions-clientid"] then +if conf.authorization then +headers["x-functions-key"] = conf.authorization.apikey or "" +headers["x-functions-clientid"] = conf.authorization.clientid or "" +else +headers["x-functions-key"] = getenv(env_key.API) +headers["x-functions-clientid"] = getenv(env_key.CLIENT_ID) +end +end + +local params = { +method = ngx.req.get_method(), +body = req_body, +query = uri_args, +headers = headers, Review comment: Do we need to remove the host header? Otherwise, the host of APISIX will be used. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] iamayushdas removed a comment on pull request #2097: feat: limit-* plugin UI form support reject-message field
iamayushdas removed a comment on pull request #2097: URL: https://github.com/apache/apisix-dashboard/pull/2097#issuecomment-971202870 > @iamayushdas Hi, do you have time to finish this PR? Sure i will -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #742: fix: ingress do not watching any namespace when namespaceSelector is empty
codecov-commenter edited a comment on pull request #742: URL: https://github.com/apache/apisix-ingress-controller/pull/742#issuecomment-962920239 # [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report > Merging [#742](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (29fb2f6) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/4a862e206602ae9c7ac534fdfd9a557748b9ad26?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4a862e2) will **increase** coverage by `0.07%`. > The diff coverage is `81.81%`. [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742/graphs/tree.svg?width=650&height=150&src=pr&token=WPLQXPY3V0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) ```diff @@Coverage Diff @@ ## master #742 +/- ## == + Coverage 31.70% 31.77% +0.07% == Files 66 65 -1 Lines6640 6647 +7 == + Hits 2105 2112 +7 Misses 4280 4280 Partials 255 255 ``` | [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | | |---|---|---| | [pkg/ingress/compare.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvY29tcGFyZS5nbw==) | `0.00% <0.00%> (ø)` | | | [pkg/ingress/controller.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvY29udHJvbGxlci5nbw==) | `1.01% <0.00%> (ø)` | | | [pkg/api/validation/utils.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaS92YWxpZGF0aW9uL3V0aWxzLmdv) | `44.44% <100.00%> (+12.01%)` | :arrow_up: | | [pkg/types/labels.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3R5cGVzL2xhYmVscy5nbw==) | `100.00% <100.00%> (ø)` | | | [test/e2e/e2e.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dGVzdC9lMmUvZTJlLmdv) | | | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [774077a...29fb2f6](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). -- This
[GitHub] [apisix] shuaijinchao edited a comment on issue #5474: proposal: support google cloud logging service plugin
shuaijinchao edited a comment on issue #5474: URL: https://github.com/apache/apisix/issues/5474#issuecomment-965962436 Name plugin name is: `google-logging` Configuration ```json { "inactive_timeout":10, "entries_uri":"http://127.0.0.1:1980/google/logging/entries";, "max_retry_count":0, "buffer_duration":60, "resource":{ "type":"global" }, "log_id":"syslog", "auth_config":{ "private_key":"-BEGIN RSA PRIVATE KEY-KEY-END RSA PRIVATE KEY-", "token_uri":"http://127.0.0.1:1980/google/logging/token";, "scopes":[ "https://apisix.apache.org/logs:admin"; ], "project_id":"apisix" }, "retry_delay":1, "batch_max_size":1 } ``` - `auth_config` the google service account config(Semi-optional, one of `auth_config` or `auth_file` must be configured) - `auth_config.private_key` the private key parameters of the Google service account - `auth_config.project_id`the project id parameters of the Google service account - `auth_config.token_uri`the token uri parameters of the Google service account - `auth_config.scopes` the access scopes parameters of the Google service account - `auth_file`path to the google service account json file(Semi-optional, one of `auth_config` or `auth_file` must be configured) - `resource`the Google monitor resource, refer to: https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource - `log_id` google logging id, refer to: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry - `entries_uri` google logging service API - `max_retry_count` max number of retries before removing from the processing pipe line - `retry_delay` number of seconds the process execution should be delayed if the execution fails - `buffer_duration` max age in seconds of the oldest entry in a batch before the batch must be processed - `inactive_timeout` max age in seconds when the buffer will be flushed if inactive - `batch_max_size` max size of each batch Details 1. Obtain and assemble request information in the APISIX Log phase 2. To interact with google logging service for the first time, you need to request token information. After obtaining the token, it will be cached in the memory of the working node. 3. After obtaining a valid token, put the request information into the batch processing queue. When the batch processing queue triggers the batch_max_size or batch_timeout threshold, the data in the queue is synchronized to the google cloud logging service 4. Before each request is sent, check whether the token is about to time out, and refresh the token if it will time out. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] shuaijinchao edited a comment on issue #5474: proposal: support google cloud logging service plugin
shuaijinchao edited a comment on issue #5474: URL: https://github.com/apache/apisix/issues/5474#issuecomment-965962436 Name plugin name is: `google-logging` Configuration ```json { "inactive_timeout":10, "entries_uri":"http://127.0.0.1:1980/google/logging/entries";, "max_retry_count":0, "buffer_duration":60, "resource":{ "type":"global" }, "log_id":"syslog", "auth_config":{ "private_key":"-BEGIN RSA PRIVATE KEY-KEY-END RSA PRIVATE KEY-", "token_uri":"http://127.0.0.1:1980/google/logging/token";, "scopes":[ "https://apisix.apache.org/logs:admin"; ], "project_id":"apisix" }, "retry_delay":1, "batch_max_size":1 } ``` - `auth_config` the google service account config(Semi-optional, one of `auth_config` or `auth_file` must be configured) - `auth_config.private_key` the private key parameters of the Google service account - `auth_config.project_id`the project id parameters of the Google service account - `auth_config.token_uri`the token uri parameters of the Google service account - `auth_config.scopes` the access scopes parameters of the Google service account, refer to: https://developers.google.com/identity/protocols/oauth2/scopes#logging - `auth_file`path to the google service account json file(Semi-optional, one of `auth_config` or `auth_file` must be configured) - `resource`the Google monitor resource, refer to: https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource - `log_id` google logging id, refer to: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry - `entries_uri` google logging service API - `max_retry_count` max number of retries before removing from the processing pipe line - `retry_delay` number of seconds the process execution should be delayed if the execution fails - `buffer_duration` max age in seconds of the oldest entry in a batch before the batch must be processed - `inactive_timeout` max age in seconds when the buffer will be flushed if inactive - `batch_max_size` max size of each batch Details 1. Obtain and assemble request information in the APISIX Log phase 2. To interact with google logging service for the first time, you need to request token information. After obtaining the token, it will be cached in the memory of the working node. 3. After obtaining a valid token, put the request information into the batch processing queue. When the batch processing queue triggers the batch_max_size or batch_timeout threshold, the data in the queue is synchronized to the google cloud logging service 4. Before each request is sent, check whether the token is about to time out, and refresh the token if it will time out. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix-dashboard] branch master updated: test: convert coverage.txt to coverage.html for readability. (#2209)
This is an automated email from the ASF dual-hosted git repository. juzhiyuan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git The following commit(s) were added to refs/heads/master by this push: new 5fc0834 test: convert coverage.txt to coverage.html for readability. (#2209) 5fc0834 is described below commit 5fc0834b6bf3a37b3624fc7a4aa41623efe9562b Author: bardolphshampine AuthorDate: Wed Nov 17 17:13:52 2021 +0800 test: convert coverage.txt to coverage.html for readability. (#2209) Co-authored-by: SiMianHuaPing --- .gitignore | 1 + Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index be85770..fd4fdc3 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,7 @@ Dockerfile-apisix # backend unit test output api/coverage.txt +api/coverage.html api/dag-to-lua/ # frontend e2e test output diff --git a/Makefile b/Makefile index c86376e..49d401f 100644 --- a/Makefile +++ b/Makefile @@ -69,7 +69,7 @@ endif ### api-test: Run the tests of manager-api .PHONY: api-test api-test: api-default dag-lib - cd api/ && APISIX_API_WORKDIR=$$PWD ENV=test go test -v -count=1 -race -cover -coverprofile=coverage.txt -covermode=atomic ./... + cd api/ && APISIX_API_WORKDIR=$$PWD ENV=test go test -v -count=1 -race -cover -coverprofile=coverage.txt -covermode=atomic ./... && go tool cover -html=coverage.txt -o coverage.html ### api-run: Run the manager-api in develop mode
[GitHub] [apisix-dashboard] juzhiyuan merged pull request #2209: test: convert coverage.txt to coverage.html for readability.
juzhiyuan merged pull request #2209: URL: https://github.com/apache/apisix-dashboard/pull/2209 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] shuaijinchao opened a new pull request #5538: feat(plugin): support google cloud logging service
shuaijinchao opened a new pull request #5538: URL: https://github.com/apache/apisix/pull/5538 ### What this PR does / why we need it: FIX #5474 ### Pre-submission checklist: * [x] Did you explain what problem does this PR solve? Or what new features have been added? * [ ] Have you added corresponding test cases? * [ ] Have you modified the corresponding document? * [x] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first** -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #742: fix: ingress do not watching any namespace when namespaceSelector is empty
codecov-commenter edited a comment on pull request #742: URL: https://github.com/apache/apisix-ingress-controller/pull/742#issuecomment-962920239 # [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report > Merging [#742](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (29fb2f6) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/4a862e206602ae9c7ac534fdfd9a557748b9ad26?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4a862e2) will **increase** coverage by `0.08%`. > The diff coverage is `81.81%`. [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742/graphs/tree.svg?width=650&height=150&src=pr&token=WPLQXPY3V0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) ```diff @@Coverage Diff @@ ## master #742 +/- ## == + Coverage 31.70% 31.78% +0.08% == Files 66 66 Lines6640 6648 +8 == + Hits 2105 2113 +8 Misses 4280 4280 Partials 255 255 ``` | [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | | |---|---|---| | [pkg/ingress/compare.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvY29tcGFyZS5nbw==) | `0.00% <0.00%> (ø)` | | | [pkg/ingress/controller.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvY29udHJvbGxlci5nbw==) | `1.01% <0.00%> (ø)` | | | [pkg/api/validation/utils.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaS92YWxpZGF0aW9uL3V0aWxzLmdv) | `44.44% <100.00%> (+12.01%)` | :arrow_up: | | [pkg/types/labels.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3R5cGVzL2xhYmVscy5nbw==) | `100.00% <100.00%> (ø)` | | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [774077a...29fb2f6](https://codecov.io/gh/apache/apisix-ingress-controller/pull/742?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, pleas
[GitHub] [apisix-website] yzeng25 commented on a change in pull request #751: docs: add Dapr with APISIX Ingress
yzeng25 commented on a change in pull request #751: URL: https://github.com/apache/apisix-website/pull/751#discussion_r751075163 ## File path: website/i18n/zh/docusaurus-plugin-content-blog/2021/11/17/dapr-with-apisix.md ## @@ -0,0 +1,211 @@ +--- +title: "如何与 Dapr 集成打造 Apache APISIX 网关控制器" +author: "张善友" +authorURL: "https://github.com/geffzhang"; +authorImageURL: "https://avatars.githubusercontent.com/u/439390?v=4"; +keywords: +- Apache APISIX +- Dapr +- Kubernetes +- 网关 +- Sidecar +description: 本文将为大家展示如何通过集成 Dapr 创建一个 Apache APISIX 控制器。包括项目概念以及具体操作步骤。 +tags: [Technology] +--- + +> 本文将为大家展示如何通过集成 Dapr 创建一个 Apache APISIX 控制器。包括项目概念以及具体操作步骤。 + + + +本文将为大家展示如何通过集成 Dapr 创建一个 Apache APISIX 控制器,该控制器在 Kubernetes 集群中会公开启用 Dapr 的应用程序。 + +本质上,Apache APISIX 控制器将配置相同标准 Dapr annotations 以注入 daprd sidecar。通过公开这个 sidecar,将允许外部应用程序与集群中启用 Dapr 的应用程序进行通信。 + +下图为实际项目中的架构流程: + +![总体架构流程](https://static.apiseven.com/202108/1637119221118-75dab9f1-4092-4684-ad23-34932d8a7eac.png) + +## 基本项目概览 + +### Apache APISIX Ingress + +在 K8s 生态中,Ingress 作为表示 K8s 流量入口的一种资源,想要让其生效,就需要有一个 Ingress Controller 去监听 K8s 中的 Ingress 资源,并对这些资源进行相应规则的解析和实际承载流量。在当下趋势中,像 Kubernetes Ingress Nginx 就是使用最广泛的 Ingress Controller 实现。 + +而 APISIX Ingress 则是另一种 Ingress Controller 的实现。跟 Kubernetes Ingress Nginx 的区别主要在于 APISIX Ingress 是以 Apache APISIX 作为实际承载业务流量的数据面。如下图所示,当用户请求到具体的某一个服务/API/网页时,通过外部代理将整个业务流量/用户请求传输到 K8s 集群,然后经过 APISIX Ingress 进行后续处理。 + +![APISIX Ingress](https://static.apiseven.com/202108/1637119221119-71bbe219-dd19-46be-90fb-20cd667d9805.png) + +从上图可以看到,APISIX Ingress 分成了两部分。一部分是 APISIX Ingress Controller,作为控制面它将完成配置管理与分发。另一部分 APISIX Proxy Pod 负责承载业务流量,它是通过 CRD(Custom Resource Definitions) 的方式实现的。Apache APISIX Ingress 除了支持自定义资源外,还支持原生的 K8s Ingress 资源。 + +点击查看[更多详情](https://www.apiseven.com/zh/blog/apisix-ingress-details)。 + +### Dapr + +Dapr 是一个可移植、事件驱动的运行时。它使开发人员简单地去构建运行在云和 edge上弹性、无状态和有状态的应用,并且包含多种语言和开发人员框架。 Review comment: ```suggestion Dapr 是一个可移植、事件驱动的运行时。它使开发人员简单地去构建运行在云和 edge 上弹性、无状态和有状态的应用,并且包含多种语言和开发人员框架。 ``` ## File path: website/i18n/zh/docusaurus-plugin-content-blog/2021/11/17/dapr-with-apisix.md ## @@ -0,0 +1,211 @@ +--- +title: "如何与 Dapr 集成打造 Apache APISIX 网关控制器" +author: "张善友" +authorURL: "https://github.com/geffzhang"; +authorImageURL: "https://avatars.githubusercontent.com/u/439390?v=4"; +keywords: +- Apache APISIX +- Dapr +- Kubernetes +- 网关 +- Sidecar +description: 本文将为大家展示如何通过集成 Dapr 创建一个 Apache APISIX 控制器。包括项目概念以及具体操作步骤。 +tags: [Technology] +--- + +> 本文将为大家展示如何通过集成 Dapr 创建一个 Apache APISIX 控制器。包括项目概念以及具体操作步骤。 + + + +本文将为大家展示如何通过集成 Dapr 创建一个 Apache APISIX 控制器,该控制器在 Kubernetes 集群中会公开启用 Dapr 的应用程序。 + +本质上,Apache APISIX 控制器将配置相同标准 Dapr annotations 以注入 daprd sidecar。通过公开这个 sidecar,将允许外部应用程序与集群中启用 Dapr 的应用程序进行通信。 + +下图为实际项目中的架构流程: + +![总体架构流程](https://static.apiseven.com/202108/1637119221118-75dab9f1-4092-4684-ad23-34932d8a7eac.png) + +## 基本项目概览 + +### Apache APISIX Ingress + +在 K8s 生态中,Ingress 作为表示 K8s 流量入口的一种资源,想要让其生效,就需要有一个 Ingress Controller 去监听 K8s 中的 Ingress 资源,并对这些资源进行相应规则的解析和实际承载流量。在当下趋势中,像 Kubernetes Ingress Nginx 就是使用最广泛的 Ingress Controller 实现。 + +而 APISIX Ingress 则是另一种 Ingress Controller 的实现。跟 Kubernetes Ingress Nginx 的区别主要在于 APISIX Ingress 是以 Apache APISIX 作为实际承载业务流量的数据面。如下图所示,当用户请求到具体的某一个服务/API/网页时,通过外部代理将整个业务流量/用户请求传输到 K8s 集群,然后经过 APISIX Ingress 进行后续处理。 + +![APISIX Ingress](https://static.apiseven.com/202108/1637119221119-71bbe219-dd19-46be-90fb-20cd667d9805.png) + +从上图可以看到,APISIX Ingress 分成了两部分。一部分是 APISIX Ingress Controller,作为控制面它将完成配置管理与分发。另一部分 APISIX Proxy Pod 负责承载业务流量,它是通过 CRD(Custom Resource Definitions) 的方式实现的。Apache APISIX Ingress 除了支持自定义资源外,还支持原生的 K8s Ingress 资源。 + +点击查看[更多详情](https://www.apiseven.com/zh/blog/apisix-ingress-details)。 + +### Dapr + +Dapr 是一个可移植、事件驱动的运行时。它使开发人员简单地去构建运行在云和 edge上弹性、无状态和有状态的应用,并且包含多种语言和开发人员框架。 + +![Dapr 生态图](https://static.apiseven.com/202108/1637119221120-15a5be20-17a2-4c18-a82e-91e1ff3709f0.png) + +今天,我们正经历一波云应用浪潮。开发人员熟悉 web+ 数据库应用程序架构(例如经典的3层设计),但不熟悉本质上是分布式的微服务应用程序架构。开发人员希望专注于业务逻辑,同时依靠平台为他们的应用程序注入伸缩性、弹性、可维护性、弹性和其他本地云架构的属性。 + +这就是 Dapr 的用武之地。 + +Dapr 可以将构建微服务应用程序的最佳实践编入开放、独立的构建块中,使用户能够使用自己选择的语言和框架构建可移植的应用程序。每个构建块都是完全独立,并可在应用程序中使用其中的一个或多个。 + +此外,Dapr 与平台无关,这意味着用户可以在任何 Kubernetes 集群和其他与 Dapr 集成的托管环境本地运行应用程序。 + +点击查看[更多详情](https://docs.dapr.io/zh-hans/concepts/overview/)。 + +## 实践开始 + +### 环境准备 + +- Kubernetes 1.19+ 集群,集群上已经配置了 Dapr +- 安装了 Helm CLI 3x +- Kubectl CLI 已安装并配置为访问集群 +- 可选:用于创建自签名证书的 OpenSSL +- Apache APISIX 的 Helm Chart 版本为 0.7.2+ + +### 步骤一:Apache APISIX Helm 配置 + +通过运行以下命令为 Apache APISIX 控制器添加最新的 helm chart repo: + +``` +$ helm repo add apisix https://charts.apiseven.com +$ helm repo update Review comment: ```suggestion helm repo add apisix https://charts.apiseven.com helm repo update ``` ## File path: website/i18n/zh/docusaurus-plugin-content-blog/2021/11/17/dapr-with-apisix.md ## @@ -0,0 +1,211 @@ +--- +title: "如何与 Dapr 集成打造 Apache APISIX 网关控制器" +autho
[GitHub] [apisix-docker] github-actions[bot] closed issue #111: apisix-dashboard: can't load package: package .: no Go files in
github-actions[bot] closed issue #111: URL: https://github.com/apache/apisix-docker/issues/111 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-docker] github-actions[bot] closed issue #195: Request Error Code: 2000001 The manager-api and apache apisix are mismatched.
github-actions[bot] closed issue #195: URL: https://github.com/apache/apisix-docker/issues/195 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-docker] github-actions[bot] closed issue #185: modify nginx.conf not restart apisix
github-actions[bot] closed issue #185: URL: https://github.com/apache/apisix-docker/issues/185 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-docker] github-actions[bot] commented on issue #111: apisix-dashboard: can't load package: package .: no Go files in
github-actions[bot] commented on issue #111: URL: https://github.com/apache/apisix-docker/issues/111#issuecomment-971426360 This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-docker] github-actions[bot] commented on issue #195: Request Error Code: 2000001 The manager-api and apache apisix are mismatched.
github-actions[bot] commented on issue #195: URL: https://github.com/apache/apisix-docker/issues/195#issuecomment-971426496 This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-docker] github-actions[bot] closed issue #193: | nginx: [warn] could not build optimal variables_hash
github-actions[bot] closed issue #193: URL: https://github.com/apache/apisix-docker/issues/193 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-docker] github-actions[bot] commented on issue #144: add docs for apisix-docker
github-actions[bot] commented on issue #144: URL: https://github.com/apache/apisix-docker/issues/144#issuecomment-971426372 This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-docker] github-actions[bot] commented on issue #167: How to migrate data?
github-actions[bot] commented on issue #167: URL: https://github.com/apache/apisix-docker/issues/167#issuecomment-971426394 This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-docker] github-actions[bot] commented on issue #185: modify nginx.conf not restart apisix
github-actions[bot] commented on issue #185: URL: https://github.com/apache/apisix-docker/issues/185#issuecomment-971426419 This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-docker] github-actions[bot] closed issue #144: add docs for apisix-docker
github-actions[bot] closed issue #144: URL: https://github.com/apache/apisix-docker/issues/144 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-docker] github-actions[bot] closed issue #167: How to migrate data?
github-actions[bot] closed issue #167: URL: https://github.com/apache/apisix-docker/issues/167 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-docker] github-actions[bot] closed issue #192: etcdmain: cannot access data directory: mkdir /bitnami/etcd/data: permission denied
github-actions[bot] closed issue #192: URL: https://github.com/apache/apisix-docker/issues/192 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-docker] github-actions[bot] commented on issue #192: etcdmain: cannot access data directory: mkdir /bitnami/etcd/data: permission denied
github-actions[bot] commented on issue #192: URL: https://github.com/apache/apisix-docker/issues/192#issuecomment-971426442 This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-docker] github-actions[bot] commented on issue #193: | nginx: [warn] could not build optimal variables_hash
github-actions[bot] commented on issue #193: URL: https://github.com/apache/apisix-docker/issues/193#issuecomment-971426467 This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] github-actions[bot] commented on issue #2643: request help: Use ngx.var.request_id as unique id for requests and response tracing, not jit-uuid.
github-actions[bot] commented on issue #2643: URL: https://github.com/apache/apisix/issues/2643#issuecomment-971427243 This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] github-actions[bot] closed issue #2643: request help: Use ngx.var.request_id as unique id for requests and response tracing, not jit-uuid.
github-actions[bot] closed issue #2643: URL: https://github.com/apache/apisix/issues/2643 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] github-actions[bot] commented on issue #2883: request help: 配置 jwt-auth 插件 获取 token的时候报错
github-actions[bot] commented on issue #2883: URL: https://github.com/apache/apisix/issues/2883#issuecomment-971427307 This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the d...@apisix.apache.org list. Thank you for your contributions. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] github-actions[bot] commented on issue #2921: request help: How to use OIDC plugin correctly
github-actions[bot] commented on issue #2921: URL: https://github.com/apache/apisix/issues/2921#issuecomment-971427330 This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the d...@apisix.apache.org list. Thank you for your contributions. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] okaybase opened a new issue #2215: the http status description of upstream check is not correct
okaybase opened a new issue #2215: URL: https://github.com/apache/apisix-dashboard/issues/2215 ### Issue description the http status description of upstream check is not correct ### Expected behavior see the Screenshots ### How to Reproduce 1. config Health Check for upstream 2. see the HTTP Status tips ### Screenshots ![image](https://user-images.githubusercontent.com/75366457/142181293-7d2b74f5-05dd-4559-9bf4-ca810c2e08c9.png) ![image](https://user-images.githubusercontent.com/75366457/142181510-37fab152-2dad-4c91-84cb-682ec24af16e.png) ### Environment - apisix version (cmd: `apisix version`): - OS (cmd: `uname -a`): - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): - etcd version, if have (cmd: run `etcd --version`): - apisix-dashboard version, if have: - Browser version, if have: ### Additional context _No response_ -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] okaybase opened a new pull request #2216: chore: correct http status description for the upstream checks
okaybase opened a new pull request #2216: URL: https://github.com/apache/apisix-dashboard/pull/2216 Please answer these questions before submitting a pull request, **or your PR will get closed**. **Why submit this pull request?** - [x] Bugfix - [ ] New feature provided - [ ] Improve performance - [ ] Backport patches **What changes will this PR take into?** Please update this section with detailed description. **Related issues** fix/resolve #2215 **Checklist:** - [x] Did you explain what problem does this PR solve? Or what new features have been added? - [ ] Have you added corresponding test cases? - [ ] Have you modified the corresponding document? - [ ] Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] codecov-commenter commented on pull request #2216: chore: correct http status description for the upstream checks
codecov-commenter commented on pull request #2216: URL: https://github.com/apache/apisix-dashboard/pull/2216#issuecomment-971453254 # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2216?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report > Merging [#2216](https://codecov.io/gh/apache/apisix-dashboard/pull/2216?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (10a2d62) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/5fc0834b6bf3a37b3624fc7a4aa41623efe9562b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5fc0834) will **increase** coverage by `0.05%`. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2216/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2216?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) ```diff @@Coverage Diff @@ ## master#2216 +/- ## == + Coverage 68.07% 68.13% +0.05% == Files 127 127 Lines3352 3352 Branches 824 824 == + Hits 2282 2284 +2 + Misses 1070 1068 -2 ``` | Flag | Coverage Δ | | |---|---|---| | frontend-e2e-test | `68.13% <ø> (+0.05%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2216?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | | |---|---|---| | [web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2216/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9oZWxwZXJzLnRzeA==) | `73.77% <0.00%> (+3.27%)` | :arrow_up: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2216?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2216?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [5fc0834...10a2d62](https://codecov.io/gh/apache/apisix-dashboard/pull/2216?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] tokers commented on a change in pull request #5479: feat(plugin): azure serverless functions
tokers commented on a change in pull request #5479: URL: https://github.com/apache/apisix/pull/5479#discussion_r751131626 ## File path: apisix/plugins/azure-functions.lua ## @@ -0,0 +1,104 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one or more +-- contributor license agreements. See the NOTICE file distributed with +-- this work for additional information regarding copyright ownership. +-- The ASF licenses this file to You under the Apache License, Version 2.0 +-- (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +local core = require("apisix.core") +local http = require("resty.http") +local ngx = ngx +local getenv = os.getenv +local plugin_name = "azure-functions" + +local env_key = { +API = "AZURE_FUNCTIONS_APIKEY", +CLIENT_ID = "AZURE_FUNCTIONS_CLIENTID" +} + +local schema = { +type = "object", +properties = { +function_uri = {type = "string"}, +authorization = { +type = "object", +properties = { +apikey = {type = "string"}, +clientid = {type = "string"} +} +}, +timeout = {type = "integer", minimum = 1000, default = 3000}, +ssl_verify = {type = "boolean", default = true}, +keepalive = {type = "boolean", default = true}, +keepalive_timeout = {type = "integer", minimum = 1000, default = 6}, +keepalive_pool = {type = "integer", minimum = 1, default = 5} +}, +required = {"function_uri"} +} + +local _M = { +version = 0.1, +priority = 505, +name = plugin_name, +schema = schema, +} + +function _M.check_schema(conf) +return core.schema.check(schema, conf) +end + +function _M.access(conf, ctx) +local uri_args = core.request.get_uri_args(ctx) +local headers = core.request.headers(ctx) or {} +local req_body, _ = core.request.get_body() Review comment: Agree, but it's better to add some hints in the document. @bisakhmondal @spacewander -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] bzp2010 commented on pull request #5537: chore: check the error from get_post_args
bzp2010 commented on pull request #5537: URL: https://github.com/apache/apisix/pull/5537#issuecomment-971519671 As far as I know `ngx.req.get_post_args` only supports form submissions using `x-www-form-urlencoded`, not for `form-data` and `json` etc. When the request is for the latter two cases, it will be recognized directly as a string or this (eg. `{"{\"a\":\"a\"}":true}`). Do we have to do this test? -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-ingress-controller] Sindweller commented on pull request #670: feat: expose more prometheus metrics
Sindweller commented on pull request #670: URL: https://github.com/apache/apisix-ingress-controller/pull/670#issuecomment-971540967 Here is the CI log: ``` 2021-11-09T02:50:22Z error apisix/schema.go:69 failed to get schema from APISIX{"name": "plugins/zipkin", "url": "http://localhost:30046/apisix/admin/schema//plugins/zipkin";, "cluster": "default", "error": "Get http://localhost:30046/apisix/admin/schema//plugins/zipkin: dial tcp [::1]:30046: connect: connection refused"} 2021-11-09T02:50:22Z warnapisix/cluster.go:373 failed to get plugin schema {"plugin": "zipkin", "error": "Get http://localhost:30046/apisix/admin/schema//plugins/zipkin: dial tcp [::1]:30046: connect: connection refused"} 2021-11-09T02:50:22Z error apisix/stream_route.go:117 failed to list stream_routes: Get http://localhost:30046/apisix/admin/stream_routes: dial tcp [::1]:30046: connect: connection refused 2021-11-09T02:50:22Z error apisix/cluster.go:215 failed to list stream_routes in APISIX: Get http://localhost:30046/apisix/admin/stream_routes: dial tcp [::1]:30046: connect: connection refused 2021-11-09T02:50:22Z error apisix/schema.go:69 failed to get schema from APISIX{"name": "plugins/request-id", "url": "http://localhost:30046/apisix/admin/schema//plugins/request-id";, "cluster": "default", "error": "Get http://localhost:30046/apisix/admin/schema//plugins/request-id: dial tcp [::1]:30046: connect: connection refused"} 2021-11-09T02:50:22Z warnapisix/cluster.go:373 failed to get plugin schema {"plugin": "request-id", "error": "Get http://localhost:30046/apisix/admin/schema//plugins/request-id: dial tcp [::1]:30046: connect: connection refused"} 2021-11-09T02:50:22Z error apisix/schema.go:69 failed to get schema from APISIX{"name": "plugins/fault-injection", "url": "http://localhost:30046/apisix/admin/schema//plugins/fault-injection";, "cluster": "default", "error": "Get http://localhost:30046/apisix/admin/schema//plugins/fault-injection: dial tcp [::1]:30046: connect: connection refused"} 2021-11-09T02:50:22Z warnapisix/cluster.go:373 failed to get plugin schema {"plugin": "fault-injection", "error": "Get http://localhost:30046/apisix/admin/schema//plugins/fault-injection: dial tcp [::1]:30046: connect: connection refused"} 2021-11-09T02:50:22Z error apisix/schema.go:69 failed to get schema from APISIX{"name": "plugins/serverless-pre-function", "url": "http://localhost:30046/apisix/admin/schema//plugins/serverless-pre-function";, "cluster": "default", "error": "Get http://localhost:30046/apisix/admin/schema//plugins/serverless-pre-function: dial tcp [::1]:30046: connect: connection refused"} 2021-11-09T02:50:22Z warnapisix/cluster.go:373 failed to get plugin schema {"plugin": "serverless-pre-function", "error": "Get http://localhost:30046/apisix/admin/schema//plugins/serverless-pre-function: dial tcp [::1]:30046: connect: connection refused"} 2021-11-09T02:50:22Z error apisix/schema.go:69 failed to get schema from APISIX{"name": "plugins/batch-requests", "url": "http://localhost:30046/apisix/admin/schema//plugins/batch-requests";, "cluster": "default", "error": "Get http://localhost:30046/apisix/admin/schema//plugins/batch-requests: dial tcp [::1]:30046: connect: connection refused"} 2021-11-09T02:50:22Z warnapisix/cluster.go:373 failed to get plugin schema {"plugin": "batch-requests", "error": "Get http://localhost:30046/apisix/admin/schema//plugins/batch-requests: dial tcp [::1]:30046: connect: connection refused"} 2021-11-09T02:50:22Z error apisix/schema.go:69 failed to get schema from APISIX{"name": "plugins/cors", "url": "http://localhost:30046/apisix/admin/schema//plugins/cors";, "cluster": "default", "error": "Get http://localhost:30046/apisix/admin/schema//plugins/cors: dial tcp [::1]:30046: connect: connection refused"} 2021-11-09T02:50:22Z warnapisix/cluster.go:373 failed to get plugin schema {"plugin": "cors", "error": "Get http://localhost:30046/apisix/admin/schema//plugins/cors: dial tcp [::1]:30046: connect: connection refused"} 2021-11-09T02:50:22Z error apisix/schema.go:69 failed to get schema from APISIX{"name": "plugins/ip-restriction", "url": "http://localhost:30046/apisix/admin/schema//plugins/ip-restriction";, "cluster": "default", "error": "Get http://localhost:30046/apisix/admin/schema//plugins/ip-restriction: dial tcp [::1]:30046: connect: connection refused"} 2021-11-09T02:50:22Z warnapisix/cluster.go:373 failed to get plugin schema {"plugin": "ip-restriction", "error": "Get http://localhost:30046/apisix/admin/schema//plugins/ip-restriction: dial tcp [::1]:30046: connect: connection refused"} 2021-11-09T02:50:22Z error apisix/schema.go:69 failed to get schema from APISIX{"name": "plugins/ua-re
[GitHub] [apisix-dashboard] bardolphshampine commented on pull request #2209: test: convert coverage.txt to coverage.html for readability.
bardolphshampine commented on pull request #2209: URL: https://github.com/apache/apisix-dashboard/pull/2209#issuecomment-971544140 Thanks ^_^ everybody. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #670: feat: expose more prometheus metrics
codecov-commenter edited a comment on pull request #670: URL: https://github.com/apache/apisix-ingress-controller/pull/670#issuecomment-916620006 # [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report > Merging [#670](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (11e39a3) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/4a862e206602ae9c7ac534fdfd9a557748b9ad26?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4a862e2) will **increase** coverage by `0.79%`. > The diff coverage is `55.44%`. [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/graphs/tree.svg?width=650&height=150&src=pr&token=WPLQXPY3V0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) ```diff @@Coverage Diff @@ ## master #670 +/- ## == + Coverage 31.70% 32.49% +0.79% == Files 66 65 -1 Lines6640 6767 +127 == + Hits 2105 2199 +94 - Misses 4280 4320 +40 + Partials 255 248 -7 ``` | [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | | |---|---|---| | [pkg/ingress/apisix\_cluster\_config.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvYXBpc2l4X2NsdXN0ZXJfY29uZmlnLmdv) | `0.00% <0.00%> (ø)` | | | [pkg/ingress/apisix\_consumer.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvYXBpc2l4X2NvbnN1bWVyLmdv) | `0.00% <0.00%> (ø)` | | | [pkg/ingress/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvYXBpc2l4X3JvdXRlLmdv) | `0.00% <0.00%> (ø)` | | | [pkg/ingress/apisix\_tls.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvYXBpc2l4X3Rscy5nbw==) | `0.00% <0.00%> (ø)` | | | [pkg/ingress/apisix\_upstream.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvYXBpc2l4X3Vwc3RyZWFtLmdv) | `0.00% <0.00%> (ø)` | | | [pkg/ingress/controller.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvY29udHJvbGxlci5nbw==) | `1.00% <0.00%> (-0.01%)` | :arrow_down: | | [pkg/ingress/endpoint.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvZW5kcG9pbnQuZ28=) | `0.00% <0.00%> (ø)` | | | [pkg/ingress/endpointslice.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvZW5kcG9pbnRzbGljZS5nbw==) | `0.00% <0.00%> (ø)` | | | [pkg/ingress/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Th
[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #670: feat: expose more prometheus metrics
codecov-commenter edited a comment on pull request #670: URL: https://github.com/apache/apisix-ingress-controller/pull/670#issuecomment-916620006 # [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report > Merging [#670](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (60cd7b0) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/4a862e206602ae9c7ac534fdfd9a557748b9ad26?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4a862e2) will **increase** coverage by `0.49%`. > The diff coverage is `55.44%`. [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/graphs/tree.svg?width=650&height=150&src=pr&token=WPLQXPY3V0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) ```diff @@Coverage Diff @@ ## master #670 +/- ## == + Coverage 31.70% 32.20% +0.49% == Files 66 65 -1 Lines6640 6767 +127 == + Hits 2105 2179 +74 - Misses 4280 4333 +53 Partials 255 255 ``` | [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | | |---|---|---| | [pkg/ingress/apisix\_cluster\_config.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvYXBpc2l4X2NsdXN0ZXJfY29uZmlnLmdv) | `0.00% <0.00%> (ø)` | | | [pkg/ingress/apisix\_consumer.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvYXBpc2l4X2NvbnN1bWVyLmdv) | `0.00% <0.00%> (ø)` | | | [pkg/ingress/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvYXBpc2l4X3JvdXRlLmdv) | `0.00% <0.00%> (ø)` | | | [pkg/ingress/apisix\_tls.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvYXBpc2l4X3Rscy5nbw==) | `0.00% <0.00%> (ø)` | | | [pkg/ingress/apisix\_upstream.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvYXBpc2l4X3Vwc3RyZWFtLmdv) | `0.00% <0.00%> (ø)` | | | [pkg/ingress/controller.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvY29udHJvbGxlci5nbw==) | `1.00% <0.00%> (-0.01%)` | :arrow_down: | | [pkg/ingress/endpoint.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvZW5kcG9pbnQuZ28=) | `0.00% <0.00%> (ø)` | | | [pkg/ingress/endpointslice.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvZW5kcG9pbnRzbGljZS5nbw==) | `0.00% <0.00%> (ø)` | | | [pkg/ingress/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/670/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Th
[GitHub] [apisix] tzssangglass commented on issue #5344: request help: kafka logger supports logging response body
tzssangglass commented on issue #5344: URL: https://github.com/apache/apisix/issues/5344#issuecomment-971588682 > > see: #5501 > > 但是我看这个issue里描述的内容不是requestBody么?好像没有responseBody my mistake. wait for someone to take this. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #670: feat: expose more prometheus metrics
tao12345666333 commented on pull request #670: URL: https://github.com/apache/apisix-ingress-controller/pull/670#issuecomment-971612484 Could you merge master branch? -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] Yullin opened a new issue #5539: bug: apisix access error status code 500
Yullin opened a new issue #5539: URL: https://github.com/apache/apisix/issues/5539 ### Issue description My Config: ``` { "createdIndex": 247285, "key": "/apisix/routes/00247284", "modifiedIndex": 322859, "value": { "create_time": 1634879659, "enable_websocket": false, "host": "static.xxx.com", "id": "00247284", "methods": [ "GET" ], "priority": 0, "status": 1, "update_time": 1637146869, "upstream": { "hash_on": "vars", "nodes": { "s3.cn-north-1.amazonaws.com.cn:80": 1 }, "pass_host": "pass", "retries": 2, "scheme": "http", "type": "roundrobin" }, "uri": "/*" } } ``` Access log with http code 500: ``` 121.12.105.56 2021-11-17T18:50:16+08:00 1637146216.662 0.001 819 317865817 1 /videos/web/contract.mp4 "GET /videos/web/contract.mp4 HTTP/1.1" 500 565 - "-" "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36 Edg/95.0.1020.53" "218.79.227.143" "-" static.xxx.com - - - 157.255.131.125 2021-11-17T18:50:17+08:00 1637146217.120 0.000 710 317865837 1 /favicon.ico "GET /favicon.ico HTTP/1.1" 500 565 - "-" "http://static.xxx.com/videos/web/contract.mp4"; "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36 Edg/95.0.1020.53" "218.79.227.143" "-" static.xxx.com - - - ``` error gone when I changed nodes to ``` "nodes": {"1.1.1.1:80": 1} ``` Don't know how to reproduce this error. As those errors comes up, other config works fine. ### Environment - apisix version (cmd: `apisix version`): image: apache/apisix:2.9-alpine - OS (cmd: `uname -a`): Amazon Linux 2 - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): - apisix-dashboard version, if have: - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner): - luarocks version, if the issue is about installation (cmd: `luarocks --version`): ### Steps to reproduce Cann't reproduce ### Actual result None ### Error log 2021/11/17 18:55:47 [error] 227#227: *317887834 lua entry thread aborted: runtime error: stack overflow stack traceback: coroutine 0: [C]: in function 'nkeys' /usr/local/apisix/apisix/core/table.lua:108: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' /usr/local/apisix/apisix/core/table.lua:111: in function '_deepcopy' ..., client: 119.167.231.42, server: _, request: "GET /favicon.ico HTTP/1.1", host: "static.xxx.com" ### Expected result _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, plea
[GitHub] [apisix] bisakhmondal commented on a change in pull request #5479: feat(plugin): azure serverless functions
bisakhmondal commented on a change in pull request #5479: URL: https://github.com/apache/apisix/pull/5479#discussion_r751273433 ## File path: apisix/plugins/azure-functions.lua ## @@ -0,0 +1,113 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one or more +-- contributor license agreements. See the NOTICE file distributed with +-- this work for additional information regarding copyright ownership. +-- The ASF licenses this file to You under the Apache License, Version 2.0 +-- (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +local core = require("apisix.core") +local http = require("resty.http") +local ngx = ngx +local getenv = os.getenv +local plugin_name = "azure-functions" + +local env_key = { +API = "AZURE_FUNCTIONS_APIKEY", +CLIENT_ID = "AZURE_FUNCTIONS_CLIENTID" +} + +local schema = { +type = "object", +properties = { +function_uri = {type = "string"}, +authorization = { +type = "object", +properties = { +apikey = {type = "string"}, +clientid = {type = "string"} +} +}, +timeout = {type = "integer", minimum = 1000, default = 3000}, +ssl_verify = {type = "boolean", default = true}, +keepalive = {type = "boolean", default = true}, +keepalive_timeout = {type = "integer", minimum = 1000, default = 6}, +keepalive_pool = {type = "integer", minimum = 1, default = 5} +}, +required = {"function_uri"} +} + +local _M = { +version = 0.1, +priority = 505, +name = plugin_name, +schema = schema, +} + +function _M.check_schema(conf) +return core.schema.check(schema, conf) +end + +function _M.access(conf, ctx) +local uri_args = core.request.get_uri_args(ctx) +local headers = core.request.headers(ctx) or {} +local req_body, err = core.request.get_body() + +if err then +core.log.error("error while reading request body: " .. err) +return 400 +end + +-- set authorization headers if not already set by the client +-- we are following not to overwrite the authz keys +if not headers["x-functions-key"] and +not headers["x-functions-clientid"] then +if conf.authorization then +headers["x-functions-key"] = conf.authorization.apikey or "" +headers["x-functions-clientid"] = conf.authorization.clientid or "" +else +headers["x-functions-key"] = getenv(env_key.API) +headers["x-functions-clientid"] = getenv(env_key.CLIENT_ID) +end +end + +local params = { +method = ngx.req.get_method(), +body = req_body, +query = uri_args, +headers = headers, Review comment: Done, It was the root of many problem. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] bisakhmondal commented on a change in pull request #5479: feat(plugin): azure serverless functions
bisakhmondal commented on a change in pull request #5479: URL: https://github.com/apache/apisix/pull/5479#discussion_r751275491 ## File path: apisix/plugins/azure-functions.lua ## @@ -0,0 +1,104 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one or more +-- contributor license agreements. See the NOTICE file distributed with +-- this work for additional information regarding copyright ownership. +-- The ASF licenses this file to You under the Apache License, Version 2.0 +-- (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +local core = require("apisix.core") +local http = require("resty.http") +local ngx = ngx +local getenv = os.getenv +local plugin_name = "azure-functions" + +local env_key = { +API = "AZURE_FUNCTIONS_APIKEY", +CLIENT_ID = "AZURE_FUNCTIONS_CLIENTID" +} + +local schema = { +type = "object", +properties = { +function_uri = {type = "string"}, +authorization = { +type = "object", +properties = { +apikey = {type = "string"}, +clientid = {type = "string"} +} +}, +timeout = {type = "integer", minimum = 1000, default = 3000}, +ssl_verify = {type = "boolean", default = true}, +keepalive = {type = "boolean", default = true}, +keepalive_timeout = {type = "integer", minimum = 1000, default = 6}, +keepalive_pool = {type = "integer", minimum = 1, default = 5} +}, +required = {"function_uri"} +} + +local _M = { +version = 0.1, +priority = 505, +name = plugin_name, +schema = schema, +} + +function _M.check_schema(conf) +return core.schema.check(schema, conf) +end + +function _M.access(conf, ctx) +local uri_args = core.request.get_uri_args(ctx) +local headers = core.request.headers(ctx) or {} +local req_body, _ = core.request.get_body() + + +-- set authorization headers +if conf.authorization then +headers["x-functions-key"] = conf.authorization.apikey or "" +headers["x-functions-clientid"] = conf.authorization.clientid or "" +else +headers["x-functions-key"] = getenv(env_key.API) Review comment: Removed env vars and added metadata as a fallback option -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] Applenice commented on a change in pull request #2210: fix: build then launch link
Applenice commented on a change in pull request #2210: URL: https://github.com/apache/apisix-dashboard/pull/2210#discussion_r751316530 ## File path: README.md ## @@ -77,9 +77,9 @@ Password: admin Support the following ways currently. -- [Source Codes](./docs/en/latest/deploy.md) +- [Source Codes](./docs/en/latest/install.md#source-source) - [Docker](./docs/en/latest/deploy-with-docker.md) -- [RPM package(only for CentOS 7)](./docs/en/latest/deploy-with-rpm.md) +- [RPM package(only for CentOS 7)](./docs/en/latest/install.md#rpm-rpm) Review comment: 😮I have updated once, you can see it? -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-ingress-controller] rupipal opened a new pull request #757: Update proxy-the-httpbin-service.md
rupipal opened a new pull request #757: URL: https://github.com/apache/apisix-ingress-controller/pull/757 Updation required in the in the document ( https://apisix.apache.org/docs/ingress-controller/practices/proxy-the-httpbin-service/ ) describing an example in the installation instructions for Minikube ( https://apisix.apache.org/docs/ingress-controller/deployments/minikube ). @tokers -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] moonming commented on pull request #4880: feat: add k8s discovery module
moonming commented on pull request #4880: URL: https://github.com/apache/apisix/pull/4880#issuecomment-971709023 any update for this PR? can we merge this PR first? -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] moonming commented on a change in pull request #5449: feat(oidc): make it possible to validate tokens against provider host…
moonming commented on a change in pull request #5449: URL: https://github.com/apache/apisix/pull/5449#discussion_r751377492 ## File path: t/plugin/openid-connect.t ## @@ -1487,3 +1487,140 @@ GET /t {"access_token_in_authorization_header":false,"bearer_only":false,"client_id":"kbyuFDidLLm280LIwVFiazOqjO3ty8KH","client_secret":"60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa","discovery":"http://127.0.0.1:1980/.well-known/openid-configuration","introspection_endpoint_auth_method":"client_secret_basic","logout_path":"/logout","realm":"apisix","scope":"openid","set_access_token_header":true,"set_id_token_header":true,"set_userinfo_header":true,"ssl_verify":false,"timeout":3} --- no_error_log [error] + + + +=== TEST 25: Update plugin with ID provider jwks endpoint for token verification. +--- config +location /t { +content_by_lua_block { +local t = require("lib.test_admin").test +local code, body = t('/apisix/admin/routes/1', + ngx.HTTP_PUT, + [[{ "plugins": { +"openid-connect": { +"client_id": "kbyuFDidLLm280LIwVFiazOqjO3ty8KH", +"client_secret": "60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa", +"discovery": "https://samples.auth0.com/.well-known/openid-configuration";, +"redirect_uri": "https://iresty.com";, +"ssl_verify": false, +"timeout": 10, +"bearer_only": true, +"scope": "apisix", +"use_jwks": true, +"token_signing_alg_values_expected": "RS256" +} +}, +"upstream": { +"nodes": { +"127.0.0.1:1980": 1 +}, +"type": "roundrobin" +}, +"uri": "/hello" +}]], +[[{ "node": { +"value": { +"plugins": { +"openid-connect": { +"client_id": "kbyuFDidLLm280LIwVFiazOqjO3ty8KH", +"client_secret": "60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa", +"discovery": "https://samples.auth0.com/.well-known/openid-configuration";, +"redirect_uri": "https://iresty.com";, +"ssl_verify": false, +"timeout": 10, +"bearer_only": true, +"scope": "apisix", +"use_jwks": true, +"token_signing_alg_values_expected": "RS256" +} +}, +"upstream": { +"nodes": { +"127.0.0.1:1980": 1 +}, +"type": "roundrobin" +}, +"uri": "/hello" +}, +"key": "/apisix/routes/1" +}, +"action": "set" +}]] +) + +if code >= 300 then +ngx.status = code +end +ngx.say(body) +} +} +--- request +GET /t +--- response_body +passed +--- no_error_log +[error] + + + +=== TEST 26: Access route with valid token. Review comment: @tzssangglass Can you provide some help? thanks. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #2209: test: convert coverage.txt to coverage.html for readability.
juzhiyuan commented on pull request #2209: URL: https://github.com/apache/apisix-dashboard/pull/2209#issuecomment-972384906 @bardolphshampine Thanks you, too!! -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] spacewander commented on pull request #5537: chore: check the error from get_post_args
spacewander commented on pull request #5537: URL: https://github.com/apache/apisix/pull/5537#issuecomment-972386059 > > > As far as I know `ngx.req.get_post_args` only supports form submissions using `x-www-form-urlencoded`, not for `form-data` and `json` etc. When the request is for the latter two cases, it will be recognized directly as a string or this (eg. `{"{\"a\":\"a\"}":true}`). > > Do we have to do this test? `ngx.req.get_post_args` doesn't take care of the content-type. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] spacewander commented on a change in pull request #5479: feat(plugin): azure serverless functions
spacewander commented on a change in pull request #5479: URL: https://github.com/apache/apisix/pull/5479#discussion_r751805107 ## File path: apisix/plugins/azure-functions.lua ## @@ -0,0 +1,137 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one or more +-- contributor license agreements. See the NOTICE file distributed with +-- this work for additional information regarding copyright ownership. +-- The ASF licenses this file to You under the Apache License, Version 2.0 +-- (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +local core = require("apisix.core") +local http = require("resty.http") +local plugin = require("apisix.plugin") +local ngx = ngx +local plugin_name = "azure-functions" + +local schema = { +type = "object", +properties = { +function_uri = {type = "string"}, +authorization = { +type = "object", +properties = { +apikey = {type = "string"}, +clientid = {type = "string"} +} +}, +timeout = {type = "integer", minimum = 100, default = 3000}, +ssl_verify = {type = "boolean", default = true}, +keepalive = {type = "boolean", default = true}, +keepalive_timeout = {type = "integer", minimum = 1000, default = 6}, +keepalive_pool = {type = "integer", minimum = 1, default = 5} +}, +required = {"function_uri"} +} + +local metadata_schema = { +type = "object", +properties = { +master_apikey = {type = "string", default = ""}, +master_clientid = {type = "string", default = ""} +} +} + +local _M = { +version = 0.1, +priority = -1900, +name = plugin_name, +schema = schema, +metadata_schema = metadata_schema +} + +function _M.check_schema(conf, schema_type) +if schema_type == core.schema.TYPE_METADATA then +return core.schema.check(metadata_schema, conf) +end +return core.schema.check(schema, conf) +end + +function _M.access(conf, ctx) +local uri_args = core.request.get_uri_args(ctx) +local headers = core.request.headers(ctx) or {} +local req_body, err = core.request.get_body() + +if err then +core.log.error("error while reading request body: " .. err) +return 400 +end + +-- set authorization headers if not already set by the client +-- we are following not to overwrite the authz keys +if not headers["x-functions-key"] and +not headers["x-functions-clientid"] then +if conf.authorization then +headers["x-functions-key"] = conf.authorization.apikey +headers["x-functions-clientid"] = conf.authorization.clientid +else +-- If neither api keys are set with the client request nor inside the plugin attributes +-- plugin will fallback to the master key (if any) present inside the metadata. +local metadata = plugin.plugin_metadata(plugin_name) +if metadata then +headers["x-functions-key"] = metadata.value.master_apikey +headers["x-functions-clientid"] = metadata.value.master_clientid +end +end +end + +headers["Host"], headers["host"] = nil, nil Review comment: ```suggestion headers["host"] = nil ``` is enough. The fetched header is in lowercase. ## File path: t/plugin/azure-functions.t ## @@ -0,0 +1,372 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +use t::APISIX 'no_plan'; + +repeat_each(1); +no_long_string(); +no_root_location(); +no_shuffle(); + +add_block_preprocessor(sub { +my ($block) = @_; + +my $inside_lua_block = $block->inside_lua_block // ""; +chomp($inside_lua_block); +my $http_confi
[GitHub] [apisix] spacewander commented on issue #5539: bug: apisix access error status code 500
spacewander commented on issue #5539: URL: https://github.com/apache/apisix/issues/5539#issuecomment-972396002 Duplicate of #4938 Consider solved. Feel free to reopen it if need. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] spacewander closed issue #5539: bug: apisix access error status code 500
spacewander closed issue #5539: URL: https://github.com/apache/apisix/issues/5539 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-ingress-controller] Sindweller commented on pull request #670: feat: expose more prometheus metrics
Sindweller commented on pull request #670: URL: https://github.com/apache/apisix-ingress-controller/pull/670#issuecomment-972422304 > Could you merge master branch? Already done. Here is the `git log` locally. ``` commit 60cd7b0d651f9228cc84379b961d1af391f9a79b (HEAD -> other-metrics, origin/other-metrics) Author: Sindweller Date: Wed Nov 17 20:52:11 2021 +0800 fix some err commit 11e39a33c6a30175bf9e4d443d65faf8fabdaca9 Merge: d825c18 774077a Author: Sindweller Date: Wed Nov 17 19:46:01 2021 +0800 resolve conflict commit 774077a527e43775bcd6346bebdb2ae0b3f80c22 (upstream/master) Author: Jintao Zhang Date: Sat Nov 13 18:40:50 2021 +0800 docs: Customize the namespace used for installation (#747) commit 4a862e206602ae9c7ac534fdfd9a557748b9ad26 Author: Nic Date: Fri Nov 12 11:59:54 2021 +0800 fix: use independent dns service for UDP e2e test (#753) ... ``` -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] spacewander merged pull request #5501: feat(kafka-logger): supports logging request body
spacewander merged pull request #5501: URL: https://github.com/apache/apisix/pull/5501 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] spacewander closed issue #5343: request help: kafka logger supports logging request body
spacewander closed issue #5343: URL: https://github.com/apache/apisix/issues/5343 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix] branch master updated (2c12b36 -> 5394dce)
This is an automated email from the ASF dual-hosted git repository. spacewander pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/apisix.git. from 2c12b36 fix(wasm): the conf can't be empty (#5514) add 5394dce feat(kafka-logger): supports logging request body (#5501) No new revisions were added by this update. Summary of changes: apisix/plugins/kafka-logger.lua| 20 + apisix/utils/log-util.lua | 38 +--- docs/en/latest/plugins/kafka-logger.md | 1 + docs/zh/latest/plugins/kafka-logger.md | 1 + t/plugin/kafka-logger.t| 79 ++ 5 files changed, 132 insertions(+), 7 deletions(-)
[GitHub] [apisix] tzssangglass commented on a change in pull request #5449: feat(oidc): make it possible to validate tokens against provider host…
tzssangglass commented on a change in pull request #5449: URL: https://github.com/apache/apisix/pull/5449#discussion_r751821547 ## File path: t/plugin/openid-connect.t ## @@ -1487,3 +1487,140 @@ GET /t {"access_token_in_authorization_header":false,"bearer_only":false,"client_id":"kbyuFDidLLm280LIwVFiazOqjO3ty8KH","client_secret":"60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa","discovery":"http://127.0.0.1:1980/.well-known/openid-configuration","introspection_endpoint_auth_method":"client_secret_basic","logout_path":"/logout","realm":"apisix","scope":"openid","set_access_token_header":true,"set_id_token_header":true,"set_userinfo_header":true,"ssl_verify":false,"timeout":3} --- no_error_log [error] + + + +=== TEST 25: Update plugin with ID provider jwks endpoint for token verification. +--- config +location /t { +content_by_lua_block { +local t = require("lib.test_admin").test +local code, body = t('/apisix/admin/routes/1', + ngx.HTTP_PUT, + [[{ "plugins": { +"openid-connect": { +"client_id": "kbyuFDidLLm280LIwVFiazOqjO3ty8KH", +"client_secret": "60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa", +"discovery": "https://samples.auth0.com/.well-known/openid-configuration";, +"redirect_uri": "https://iresty.com";, +"ssl_verify": false, +"timeout": 10, +"bearer_only": true, +"scope": "apisix", +"use_jwks": true, +"token_signing_alg_values_expected": "RS256" +} +}, +"upstream": { +"nodes": { +"127.0.0.1:1980": 1 +}, +"type": "roundrobin" +}, +"uri": "/hello" +}]], +[[{ "node": { +"value": { +"plugins": { +"openid-connect": { +"client_id": "kbyuFDidLLm280LIwVFiazOqjO3ty8KH", +"client_secret": "60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa", +"discovery": "https://samples.auth0.com/.well-known/openid-configuration";, +"redirect_uri": "https://iresty.com";, +"ssl_verify": false, +"timeout": 10, +"bearer_only": true, +"scope": "apisix", +"use_jwks": true, +"token_signing_alg_values_expected": "RS256" +} +}, +"upstream": { +"nodes": { +"127.0.0.1:1980": 1 +}, +"type": "roundrobin" +}, +"uri": "/hello" +}, +"key": "/apisix/routes/1" +}, +"action": "set" +}]] +) + +if code >= 300 then +ngx.status = code +end +ngx.say(body) +} +} +--- request +GET /t +--- response_body +passed +--- no_error_log +[error] + + + +=== TEST 26: Access route with valid token. Review comment: ok, I will. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-website] yzeng25 commented on a change in pull request #751: docs: add Dapr with APISIX Ingress
yzeng25 commented on a change in pull request #751: URL: https://github.com/apache/apisix-website/pull/751#discussion_r751826806 ## File path: website/blog/2021/11/17/dapr-with-apisix.md ## @@ -0,0 +1,209 @@ +--- +title: "How to integrate with Dapr to build Apache APISIX Gateway Controller" +author: "Shanyou Zhang" +authorURL: "https://github.com/geffzhang"; +authorImageURL: "https://avatars.githubusercontent.com/u/439390?v=4"; +keywords: +- Apache APISIX +- Dapr +- Kubernetes +- API Gateway +- Sidecar +description: This article will show you how to create an Apache APISIX controller by integrating Dapr, includes the concept of the project and the specific operation steps. +tags: [Technology] +--- + +> This article will show you how to create an Apache APISIX controller by integrating Dapr, includes the concept of the project and the specific operation steps. + + + +Essentially, the Apache APISIX controller will configure the same standard DAPR annotations to inject DAPRD sidecar. Exposing this sidecar allows external applications to communicate with applications in the cluster that have Dapr enabled. + +The following diagram shows the architectural flow of the actual project: + +![Overview](https://static.apiseven.com/202108/1637119221118-75dab9f1-4092-4684-ad23-34932d8a7eac.png) + +## Overview + +### Apache APISIX Ingress + +In the K8s ecosystem, Ingress is a resource that represents the entry point for K8s traffic. To make it effective, an Ingress Controller is needed to listen to the Ingress resources in K8s, resolve the rules for those resources, and actually carry the traffic. The most widely used Ingress Controller implementations in today's trends are Kubernetes Ingress Nginx. + +APISIX Ingress is another implementation of the Ingress Controller. The main difference from Kubernetes Ingress Nginx is that APISIX Ingress uses Apache APISIX as the actual data plane for hosting business traffic. As shown in the figure below, when a user requests a specific service/API/web page, the entire business traffic/user request is transferred to the K8s cluster through an external proxy and then processed by APISIX Ingress. + +![APISIX Ingress](https://static.apiseven.com/202108/1637119221119-71bbe219-dd19-46be-90fb-20cd667d9805.png) + +As you can see from the above diagram, APISIX Ingress is divided into two parts. One part is the APISIX Ingress Controller, which serves as the control plane for configuration management and distribution. The other part is the APISIX Proxy Pod, which is responsible for carrying business traffic and is implemented through CRD (Custom Resource Definitions). Apache APISIX Ingress supports not only custom resources but also native K8s Ingress resources. + +[Click here](https://www.apiseven.com/zh/blog/apisix-ingress-details) for more details. + +## Dapr Review comment: ```suggestion ### Dapr ``` -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] cache-missing opened a new pull request #5540: 🐞 fix(plugin): fix str concat error
cache-missing opened a new pull request #5540: URL: https://github.com/apache/apisix/pull/5540 ### What this PR does / why we need it: ### Pre-submission checklist: * [ ] Did you explain what problem does this PR solve? Or what new features have been added? * [ ] Have you added corresponding test cases? * [ ] Have you modified the corresponding document? * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first** -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] tokers commented on pull request #5540: 🐞 fix(plugin): fix str concat error
tokers commented on pull request #5540: URL: https://github.com/apache/apisix/pull/5540#issuecomment-972438004 @cache-missing The PR title is not semantic, please fix it, see https://github.com/zeke/semantic-pull-requests. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] dmsolr commented on issue #5344: request help: kafka logger supports logging response body
dmsolr commented on issue #5344: URL: https://github.com/apache/apisix/issues/5344#issuecomment-972463294 May I pick this one up? -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] jagerzhang commented on issue #5399: Proposal: support advanced matching based on POST form
jagerzhang commented on issue #5399: URL: https://github.com/apache/apisix/issues/5399#issuecomment-972463906 @tzssangglass 那还是只能用serverless解决body字段路由的问题了~ 希望可以支持下。。。 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] moonming commented on a change in pull request #5540: 🐞 fix(plugin): fix str concat error
moonming commented on a change in pull request #5540: URL: https://github.com/apache/apisix/pull/5540#discussion_r751863086 ## File path: apisix/plugin.lua ## @@ -264,7 +264,7 @@ function _M.load(config) local_conf, err = core.config.local_conf(true) if not local_conf then -- the error is unrecoverable, so we need to raise it -error("failed to load the configuration file: ", err) +error("failed to load the configuration file: " .. err) Review comment: ```suggestion core.log.error("failed to load the configuration file: ", err) ``` -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] jagerzhang commented on issue #5451: request help: Does response-rewrite plugin support partial or regular substitution
jagerzhang commented on issue #5451: URL: https://github.com/apache/apisix/issues/5451#issuecomment-972464521 @tzssangglass @tokers 非常期待能支持一下这个Openresty默认支持的特性。 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] jagerzhang commented on issue #5451: request help: Does response-rewrite plugin support partial or regular substitution
jagerzhang commented on issue #5451: URL: https://github.com/apache/apisix/issues/5451#issuecomment-972465271 > > @tokers 在APISIX配置中使用Nginx或openresty的配置,求一个指引文档,多谢~ > > Please check out [Customize Nginx Configuration](http://apisix.apache.org/docs/apisix/customize-nginx-configuration/). 粗略看了下,这样用需要改动配置文件,相当于每次改动都需要reload或重启,动作比较重。还是期待能在插件里面动态支持~ -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] nanamikon opened a new issue #5541: request help: Found "Lua code block missing the closing long bracket" when running ci test
nanamikon opened a new issue #5541: URL: https://github.com/apache/apisix/issues/5541 ### Issue description Hi I try to run ci test in my own ubuntu image, I found this message as follow ``` t/plugin/traffic-split2.t .. nginx: [emerg] Lua code block missing the closing long bracket "]=]" in /data/app/huya-proxy-nginx-ci/t/servroot/conf/nginx.conf:193 nginx: [emerg] Lua code block missing the closing long bracket "]=]" in /data/app/huya-proxy-nginx-ci/t/servroot/conf/nginx.conf:193 nginx: [emerg] Lua code block missing the closing long bracket "]=]" in /data/app/huya-proxy-nginx-ci/t/servroot/conf/nginx.conf:193 nginx: [emerg] Lua code block missing the closing long bracket "]=]" in /data/app/huya-proxy-nginx-ci/t/servroot/conf/nginx.conf:193 nginx: [emerg] Lua code block missing the closing long bracket "]=]" in /data/app/huya-proxy-nginx-ci/t/servroot/conf/nginx.conf:193 nginx: [emerg] Lua code block missing the closing long bracket "]=]" in /data/app/huya-proxy-nginx-ci/t/servroot/conf/nginx.conf:193 ``` And I found it relate to this issue https://github.com/openresty/lua-nginx-module/issues/1622 Should I modify this test file ? But this test case pass in my mac. Is there any tips for me to fix it , thanks ### Environment - apisix version (cmd: `apisix version`):2.9 - OS (cmd: `uname -a`):ubuntu 16 - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): 1.19.3.2 - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): - apisix-dashboard version, if have: - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner): - luarocks version, if the issue is about installation (cmd: `luarocks --version`):3.5 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] lifeblood commented on issue #5533: systemctl enable apisix is not avialiable
lifeblood commented on issue #5533: URL: https://github.com/apache/apisix/issues/5533#issuecomment-972497464 [root@openresty-2 ~]# cat /usr/lib/systemd/system/apisix.service [Unit] Description=apisix Conflicts=apisix.service After=network-online.target [Service] Type=forking WorkingDirectory=/usr/local/apisix ExecStart=/usr/bin/apisix start ExecStop=/usr/bin/apisix stop ExecReload=/usr/bin/apisix reload -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] spacewander commented on a change in pull request #5540: 🐞 fix(plugin): fix str concat error
spacewander commented on a change in pull request #5540: URL: https://github.com/apache/apisix/pull/5540#discussion_r751886067 ## File path: apisix/plugin.lua ## @@ -264,7 +264,7 @@ function _M.load(config) local_conf, err = core.config.local_conf(true) if not local_conf then -- the error is unrecoverable, so we need to raise it -error("failed to load the configuration file: ", err) +error("failed to load the configuration file: " .. err) Review comment: We need to raise error here as it is unrecoverable. Otherwise, APISIX is still in trouble. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-ingress-controller] GhangZh opened a new issue #758: request help:
GhangZh opened a new issue #758: URL: https://github.com/apache/apisix-ingress-controller/issues/758 ### Issue description apisix-ingress-controller has many reported errors,And there is no manual creation of resources via dashboard. ![image](https://user-images.githubusercontent.com/92301646/142347990-3ffd3596-05e5-4af8-af34-32e0d67683ed.png) ![image](https://user-images.githubusercontent.com/92301646/142348006-0f1d3ec1-907a-4dd3-b3e4-6654c473abca.png) ![image](https://user-images.githubusercontent.com/92301646/142348011-05b87ee1-bd4c-4a74-823c-1b42c81b2977.png) ![image](https://user-images.githubusercontent.com/92301646/142347998-406142f7-ff8b-4118-ae3a-b12785069639.png) ### Environment * your apisix-ingress-controller version (output of `apisix-ingress-controller version --long`); Version: 1.2.0 Git SHA: no-git-module Go Version: go1.13.8 Building OS/Arch: linux/amd64 Running OS/Arch: linux/amd64 * your Kubernetes cluster version (output of `kubectl version`);v1.18.10 * if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (`uname -a`). Linux apisix-ingress-controller-8756d4d77-dvfzd 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 Linux -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix] branch master updated: chore: check the error from get_post_args (#5537)
This is an automated email from the ASF dual-hosted git repository. spacewander pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/apisix.git The following commit(s) were added to refs/heads/master by this push: new 7c4f10e chore: check the error from get_post_args (#5537) 7c4f10e is described below commit 7c4f10e445618e30c538a6edce9ffd0da09b0816 Author: 罗泽轩 AuthorDate: Thu Nov 18 11:57:56 2021 +0800 chore: check the error from get_post_args (#5537) --- apisix/core/request.lua | 7 ++- t/core/request.t| 29 + 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/apisix/core/request.lua b/apisix/core/request.lua index f098f63..7d9bf80 100644 --- a/apisix/core/request.lua +++ b/apisix/core/request.lua @@ -161,7 +161,12 @@ function _M.get_post_args(ctx) -- use 0 to avoid truncated result and keep the behavior as the -- same as other platforms -local args = req_get_post_args(0) +local args, err = req_get_post_args(0) +if not args then +-- do we need a way to handle huge post forms? +log.error("the post form is too large: ", err) +args = {} +end ctx.req_post_args = args end diff --git a/t/core/request.t b/t/core/request.t index e9dca7b..06256dc 100644 --- a/t/core/request.t +++ b/t/core/request.t @@ -408,3 +408,32 @@ z_z x x --- no_error_log [error] + + + +=== TEST 12: get_post_args when the body is stored in temp file +--- config +location = /hello { +client_body_in_file_only clean; +content_by_lua_block { +local core = require("apisix.core") +local ngx_ctx = ngx.ctx +local api_ctx = ngx_ctx.api_ctx +if api_ctx == nil then +api_ctx = core.tablepool.fetch("api_ctx", 0, 32) +ngx_ctx.api_ctx = api_ctx +end + +core.ctx.set_vars_meta(api_ctx) + +local args = core.request.get_post_args(ngx.ctx.api_ctx) +ngx.say(args["c"]) +} +} +--- request +POST /hello +c=z_z&v=x%20x +--- response_body +nil +--- error_log +the post form is too large: request body in temp file not supported
[GitHub] [apisix] spacewander merged pull request #5537: chore: check the error from get_post_args
spacewander merged pull request #5537: URL: https://github.com/apache/apisix/pull/5537 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] junmaqiang opened a new issue #5542: request help: 请教如何在dashbrod设置没有路由绑定的请求全部统一处理
junmaqiang opened a new issue #5542: URL: https://github.com/apache/apisix/issues/5542 ### Issue description 官方文档中没有看到类似设置,请教下 ### Environment - apisix version (cmd: `apisix version`): 2.9 - OS (cmd: `uname -a`):Mac - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): 3.5 - apisix-dashboard version, if have: 2.9 - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner): - luarocks version, if the issue is about installation (cmd: `luarocks --version`): -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-website] dependabot[bot] opened a new pull request #752: chore(deps): bump actions/setup-python from 2.2.2 to 2.3.0
dependabot[bot] opened a new pull request #752: URL: https://github.com/apache/apisix-website/pull/752 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2.2.2 to 2.3.0. Release notes Sourced from https://github.com/actions/setup-python/releases";>actions/setup-python's releases. Support caching dependencies This release introduces dependency caching support (https://github-redirect.dependabot.com/actions/setup-python/pull/266";>actions/setup-python#266) Caching dependencies. The action has a built-in functionality for caching and restoring pip/pipenv dependencies. The cache input is optional, and caching is turned off by default. Besides, this release introduces dependency caching support for mono repos and repositories with complex structure. By default, the action searches for the dependency file (requirements.txt for pip or Pipfile.lock for pipenv) in the whole repository. Use the cache-dependency-path input for cases when you want to override current behaviour and use different file for hash generation (for example requirements-dev.txt). This input supports wildcards or a list of file names for caching multiple dependencies. Caching pip dependencies: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: python-version: '3.9' cache: 'pip' - run: pip install -r requirements.txt - run: pip test Caching pipenv dependencies: steps: - uses: actions/checkout@v2 - name: Install pipenv run: pipx install pipenv - uses: actions/setup-python@v2 with: python-version: '3.9' cache: 'pipenv' - run: pipenv install - run: pipenv test Change dependency file: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: python-version: '3.9' cache: 'pip' cache-dependency-path: '**/requirements-dev.txt' - run: pip install -r subdirectory/requirements-dev.txt - run: pip test Commits https://github.com/actions/setup-python/commit/0066b88440aa9562be742e2c60ee750fc57d8849";>0066b88 Add a workflow to release a new version of the action (https://github-redirect.dependabot.com/actions/setup-python/issues/274";>#274) https://github.com/actions/setup-python/commit/280924fbefbb16de742b89e8dd82ba01b5769011";>280924f Implementation of python's caching (https://github-redirect.dependabot.com/actions/setup-python/issues/266";>#266) https://github.com/actions/setup-python/commit/52636cf49aeef8753e61f027f11758ed8a3e9f77";>52636cf Fix consistency in README (https://github-redirect.dependabot.com/actions/setup-python/issues/250";>#250) https://github.com/actions/setup-python/commit/ca5c59064f84b344ed097d6094ee1ce7137e4dee";>ca5c590 Update version for setup-python in package.json (https://github-redirect.dependabot.com/actions/setup-python/issues/264";>#264) https://github.com/actions/setup-python/commit/feeaa3ba49f2b4104b79d61cc6a65fbe66e4637a";>feeaa3b Add issue and pull request templates (https://github-redirect.dependabot.com/actions/setup-python/issues/258";>#258) https://github.com/actions/setup-python/commit/002b1e40449cd70913538589c187c2728a41cb61";>002b1e4 Change python version for pypy in workflow files (https://github-redirect.dependabot.com/actions/setup-python/issues/259";>#259) https://github.com/actions/setup-python/commit/d12543aa2aa2d1de65cea946cbe1f0c3b720eaae";>d12543a Merge pull request https://github-redirect.dependabot.com/actions/setup-python/issues/252";>#252 from dmitry-shibanov/v-dmshib/update-dependencies https://github.com/actions/setup-python/commit/4aa563ba8c162b807c18c46445057827cf6e2cb8";>4aa563b update dependencies https://github.com/actions/setup-python/commit/70e2063f710ccef775ec81349f16fb39eecee9ef";>70e2063 Update test-python.yml (https://github-redirect.dependabot.com/actions/setup-python/issues/246";>#246) https://github.com/actions/setup-python/commit/2d803e7feaf26323835f529f28efa6400f18ad01";>2d803e7 Create check-dist.yml (https://github-redirect.dependabot.com/actions/setup-python/issues/236";>#236) Additional commits viewable in https://github.com/actions/setup-python/compare/v2.2.2...v2.3.0";>compare view [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-python&package-manager=github_actions&previous-version=2.2.2&new-version=2.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger D
[apisix-website] branch dependabot/github_actions/actions/setup-python-2.3.0 created (now 5286a31)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/github_actions/actions/setup-python-2.3.0 in repository https://gitbox.apache.org/repos/asf/apisix-website.git. at 5286a31 chore(deps): bump actions/setup-python from 2.2.2 to 2.3.0 No new revisions were added by this update.
[GitHub] [apisix] bisakhmondal commented on a change in pull request #5479: feat(plugin): azure serverless functions
bisakhmondal commented on a change in pull request #5479: URL: https://github.com/apache/apisix/pull/5479#discussion_r751909344 ## File path: apisix/plugins/azure-functions.lua ## @@ -0,0 +1,137 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one or more +-- contributor license agreements. See the NOTICE file distributed with +-- this work for additional information regarding copyright ownership. +-- The ASF licenses this file to You under the Apache License, Version 2.0 +-- (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +local core = require("apisix.core") +local http = require("resty.http") +local plugin = require("apisix.plugin") +local ngx = ngx +local plugin_name = "azure-functions" + +local schema = { +type = "object", +properties = { +function_uri = {type = "string"}, +authorization = { +type = "object", +properties = { +apikey = {type = "string"}, +clientid = {type = "string"} +} +}, +timeout = {type = "integer", minimum = 100, default = 3000}, +ssl_verify = {type = "boolean", default = true}, +keepalive = {type = "boolean", default = true}, +keepalive_timeout = {type = "integer", minimum = 1000, default = 6}, +keepalive_pool = {type = "integer", minimum = 1, default = 5} +}, +required = {"function_uri"} +} + +local metadata_schema = { +type = "object", +properties = { +master_apikey = {type = "string", default = ""}, +master_clientid = {type = "string", default = ""} +} +} + +local _M = { +version = 0.1, +priority = -1900, +name = plugin_name, +schema = schema, +metadata_schema = metadata_schema +} + +function _M.check_schema(conf, schema_type) +if schema_type == core.schema.TYPE_METADATA then +return core.schema.check(metadata_schema, conf) +end +return core.schema.check(schema, conf) +end + +function _M.access(conf, ctx) +local uri_args = core.request.get_uri_args(ctx) +local headers = core.request.headers(ctx) or {} +local req_body, err = core.request.get_body() + +if err then +core.log.error("error while reading request body: " .. err) +return 400 +end + +-- set authorization headers if not already set by the client +-- we are following not to overwrite the authz keys +if not headers["x-functions-key"] and +not headers["x-functions-clientid"] then +if conf.authorization then +headers["x-functions-key"] = conf.authorization.apikey +headers["x-functions-clientid"] = conf.authorization.clientid +else +-- If neither api keys are set with the client request nor inside the plugin attributes +-- plugin will fallback to the master key (if any) present inside the metadata. +local metadata = plugin.plugin_metadata(plugin_name) +if metadata then +headers["x-functions-key"] = metadata.value.master_apikey +headers["x-functions-clientid"] = metadata.value.master_clientid +end +end +end + +headers["Host"], headers["host"] = nil, nil Review comment: Cool -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] webup commented on issue #4744: k8s 环境apisix集成prometheus,apisix和prometheus的配置如何设置?request help:
webup commented on issue #4744: URL: https://github.com/apache/apisix/issues/4744#issuecomment-972557179 > It has been solved. This is my way to deal with it: > > 1. Add job to the configmap of prometheus-server > > ``` > scrape_configs: > - job_name: apisix-prom > metrics_path: '/apisix/prometheus/metrics' #This is a fixed path and cannot be changed > static_configs: > - targets: > - your-svc.your-namespace:9091 > ``` > > 1. Add port to SVC of apisix-admin > > ``` > - name: apisix-prom > port: 9091 > ``` > > 1. Add the configuration of the apisix plugin_attr > > ``` > plugin_attr: > prometheus: >export_addr: > ip: "0.0.0.0" > port: 9091 > ``` This works, but seems the plugin configuration made in dashboard could not overwrite this `plugin_attr` content. :( -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] bisakhmondal commented on a change in pull request #5479: feat(plugin): azure serverless functions
bisakhmondal commented on a change in pull request #5479: URL: https://github.com/apache/apisix/pull/5479#discussion_r751922165 ## File path: t/plugin/azure-functions.t ## @@ -0,0 +1,372 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +use t::APISIX 'no_plan'; + +repeat_each(1); +no_long_string(); +no_root_location(); +no_shuffle(); + +add_block_preprocessor(sub { +my ($block) = @_; + +my $inside_lua_block = $block->inside_lua_block // ""; +chomp($inside_lua_block); +my $http_config = $block->http_config // <<_EOC_; + +server { +listen 8765; + +location /httptrigger { +content_by_lua_block { +ngx.req.read_body() +local msg = "faas invoked" +ngx.header['Content-Length'] = #msg + 1 +ngx.header['X-Extra-Header'] = "MUST" +ngx.header['Connection'] = "Keep-Alive" +ngx.say(msg) +} +} + +location /azure-demo { +content_by_lua_block { +$inside_lua_block +} +} +} +_EOC_ + +$block->set_value("http_config", $http_config); + +if (!$block->request) { +$block->set_value("request", "GET /t"); +} +if (!$block->no_error_log && !$block->error_log) { +$block->set_value("no_error_log", "[error]\n[alert]"); +} +}); + +run_tests; + +__DATA__ + +=== TEST 1: sanity +--- config +location /t { +content_by_lua_block { +local plugin = require("apisix.plugins.azure-functions") +local conf = { +function_uri = "http://some-url.com"; +} +local ok, err = plugin.check_schema(conf) +if not ok then +ngx.say(err) +end +ngx.say("done") +} +} +--- response_body +done + + + +=== TEST 2: function_uri missing +--- config +location /t { +content_by_lua_block { +local plugin = require("apisix.plugins.azure-functions") +local ok, err = plugin.check_schema({}) +if not ok then +ngx.say(err) +else +ngx.say("done") +end +} +} +--- response_body +property "function_uri" is required + + + +=== TEST 3: create route with azure-function plugin enabled +--- config +location /t { +content_by_lua_block { +local t = require("lib.test_admin").test + +local code, body = t('/apisix/admin/routes/1', + ngx.HTTP_PUT, + [[{ +"plugins": { +"azure-functions": { +"function_uri": "http://localhost:8765/httptrigger"; +} +}, +"upstream": { +"nodes": { +"127.0.0.1:1982": 1 +}, +"type": "roundrobin" +}, +"uri": "/azure" +}]], +[[{ +"node": { +"value": { +"plugins": { +"azure-functions": { +"keepalive": true, +"timeout": 3000, +"ssl_verify": true, +"keepalive_timeout": 6, +"keepalive_pool": 5, +"function_uri": "http://localhost:8765/httptrigger"; +} +}, +"upstream": { +"nodes": { +"127.0.0.1:1982": 1 +}, +"type": "roundrobin" +}, +"uri": "/azure" +}, +"key": "/apisix/routes/1" +}, +"action": "set" +}]]
[GitHub] [apisix] moonming commented on a change in pull request #5540: fix: str concat in error call
moonming commented on a change in pull request #5540: URL: https://github.com/apache/apisix/pull/5540#discussion_r751926905 ## File path: apisix/plugin.lua ## @@ -264,7 +264,7 @@ function _M.load(config) local_conf, err = core.config.local_conf(true) if not local_conf then -- the error is unrecoverable, so we need to raise it -error("failed to load the configuration file: ", err) +error("failed to load the configuration file: " .. err) Review comment: got it -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] moonming commented on issue #5542: request help: 请教如何在dashbrod设置没有路由绑定的请求全部统一处理
moonming commented on issue #5542: URL: https://github.com/apache/apisix/issues/5542#issuecomment-972562630 @junmaqiang Please use English in the public channel, thx -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] junmaqiang opened a new issue #2217: request help: 请教如何在dashbrod设置没有路由绑定的请求全部统一处理
junmaqiang opened a new issue #2217: URL: https://github.com/apache/apisix-dashboard/issues/2217 ### Issue description 官方文档中没有看到类似设置,请教下 ### Environment - apisix version (cmd: `apisix version`): 2.9 - OS (cmd: `uname -a`):Mac - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): 3.5 - apisix-dashboard version, if have: 2.9 - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner): - luarocks version, if the issue is about installation (cmd: `luarocks --version`): -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] membphis commented on issue #5502: docs: APISIX supports multi-language architecture diagram
membphis commented on issue #5502: URL: https://github.com/apache/apisix/issues/5502#issuecomment-972563896 I think we can put it into https://github.com/apache/apisix#features Is there anybody want to do this? -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] bisakhmondal commented on issue #5502: docs: APISIX supports multi-language architecture diagram
bisakhmondal commented on issue #5502: URL: https://github.com/apache/apisix/issues/5502#issuecomment-972564213 /assign -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] membphis commented on issue #5502: docs: APISIX supports multi-language architecture diagram
membphis commented on issue #5502: URL: https://github.com/apache/apisix/issues/5502#issuecomment-972564908 Many thanks. Waiting for your PR @bisakhmondal -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix-dashboard] branch dependabot/github_actions/actions/setup-python-2.3.0 created (now dcee8b0)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/github_actions/actions/setup-python-2.3.0 in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git. at dcee8b0 chore(deps): bump actions/setup-python from 2.2.2 to 2.3.0 No new revisions were added by this update.
[GitHub] [apisix-dashboard] dependabot[bot] opened a new pull request #2218: chore(deps): bump actions/setup-python from 2.2.2 to 2.3.0
dependabot[bot] opened a new pull request #2218: URL: https://github.com/apache/apisix-dashboard/pull/2218 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2.2.2 to 2.3.0. Release notes Sourced from https://github.com/actions/setup-python/releases";>actions/setup-python's releases. Support caching dependencies This release introduces dependency caching support (https://github-redirect.dependabot.com/actions/setup-python/pull/266";>actions/setup-python#266) Caching dependencies. The action has a built-in functionality for caching and restoring pip/pipenv dependencies. The cache input is optional, and caching is turned off by default. Besides, this release introduces dependency caching support for mono repos and repositories with complex structure. By default, the action searches for the dependency file (requirements.txt for pip or Pipfile.lock for pipenv) in the whole repository. Use the cache-dependency-path input for cases when you want to override current behaviour and use different file for hash generation (for example requirements-dev.txt). This input supports wildcards or a list of file names for caching multiple dependencies. Caching pip dependencies: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: python-version: '3.9' cache: 'pip' - run: pip install -r requirements.txt - run: pip test Caching pipenv dependencies: steps: - uses: actions/checkout@v2 - name: Install pipenv run: pipx install pipenv - uses: actions/setup-python@v2 with: python-version: '3.9' cache: 'pipenv' - run: pipenv install - run: pipenv test Change dependency file: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: python-version: '3.9' cache: 'pip' cache-dependency-path: '**/requirements-dev.txt' - run: pip install -r subdirectory/requirements-dev.txt - run: pip test Commits https://github.com/actions/setup-python/commit/0066b88440aa9562be742e2c60ee750fc57d8849";>0066b88 Add a workflow to release a new version of the action (https://github-redirect.dependabot.com/actions/setup-python/issues/274";>#274) https://github.com/actions/setup-python/commit/280924fbefbb16de742b89e8dd82ba01b5769011";>280924f Implementation of python's caching (https://github-redirect.dependabot.com/actions/setup-python/issues/266";>#266) https://github.com/actions/setup-python/commit/52636cf49aeef8753e61f027f11758ed8a3e9f77";>52636cf Fix consistency in README (https://github-redirect.dependabot.com/actions/setup-python/issues/250";>#250) https://github.com/actions/setup-python/commit/ca5c59064f84b344ed097d6094ee1ce7137e4dee";>ca5c590 Update version for setup-python in package.json (https://github-redirect.dependabot.com/actions/setup-python/issues/264";>#264) https://github.com/actions/setup-python/commit/feeaa3ba49f2b4104b79d61cc6a65fbe66e4637a";>feeaa3b Add issue and pull request templates (https://github-redirect.dependabot.com/actions/setup-python/issues/258";>#258) https://github.com/actions/setup-python/commit/002b1e40449cd70913538589c187c2728a41cb61";>002b1e4 Change python version for pypy in workflow files (https://github-redirect.dependabot.com/actions/setup-python/issues/259";>#259) https://github.com/actions/setup-python/commit/d12543aa2aa2d1de65cea946cbe1f0c3b720eaae";>d12543a Merge pull request https://github-redirect.dependabot.com/actions/setup-python/issues/252";>#252 from dmitry-shibanov/v-dmshib/update-dependencies https://github.com/actions/setup-python/commit/4aa563ba8c162b807c18c46445057827cf6e2cb8";>4aa563b update dependencies https://github.com/actions/setup-python/commit/70e2063f710ccef775ec81349f16fb39eecee9ef";>70e2063 Update test-python.yml (https://github-redirect.dependabot.com/actions/setup-python/issues/246";>#246) https://github.com/actions/setup-python/commit/2d803e7feaf26323835f529f28efa6400f18ad01";>2d803e7 Create check-dist.yml (https://github-redirect.dependabot.com/actions/setup-python/issues/236";>#236) Additional commits viewable in https://github.com/actions/setup-python/compare/v2.2.2...v2.3.0";>compare view [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-python&package-manager=github_actions&previous-version=2.2.2&new-version=2.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigg
[apisix] branch master updated: fix: str concat in error call (#5540)
This is an automated email from the ASF dual-hosted git repository. spacewander pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/apisix.git The following commit(s) were added to refs/heads/master by this push: new 1018576 fix: str concat in error call (#5540) 1018576 is described below commit 1018576e30477a9d1e70710386aac998a68acc68 Author: cache-missing <90820067+cache-miss...@users.noreply.github.com> AuthorDate: Thu Nov 18 14:18:19 2021 +0800 fix: str concat in error call (#5540) Co-authored-by: kaihaojiang --- apisix/plugin.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apisix/plugin.lua b/apisix/plugin.lua index efdffe4..b1b7d66 100644 --- a/apisix/plugin.lua +++ b/apisix/plugin.lua @@ -264,7 +264,7 @@ function _M.load(config) local_conf, err = core.config.local_conf(true) if not local_conf then -- the error is unrecoverable, so we need to raise it -error("failed to load the configuration file: ", err) +error("failed to load the configuration file: " .. err) end http_plugin_names = local_conf.plugins
[GitHub] [apisix] spacewander merged pull request #5540: fix: str concat in error call
spacewander merged pull request #5540: URL: https://github.com/apache/apisix/pull/5540 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] bisakhmondal opened a new pull request #5543: doc: addition of multi language support into readme
bisakhmondal opened a new pull request #5543: URL: https://github.com/apache/apisix/pull/5543 ### What this PR does / why we need it: closes #5502 ### Pre-submission checklist: * [x] Did you explain what problem does this PR solve? Or what new features have been added? * [ ] Have you added corresponding test cases? * [ ] Have you modified the corresponding document? * [x] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first** -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] bisakhmondal commented on pull request #5543: docs: addition of multi language support into readme
bisakhmondal commented on pull request #5543: URL: https://github.com/apache/apisix/pull/5543#issuecomment-972576479 cc @membphis -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] membphis commented on a change in pull request #5479: feat(plugin): azure serverless functions
membphis commented on a change in pull request #5479: URL: https://github.com/apache/apisix/pull/5479#discussion_r751935568 ## File path: apisix/plugins/azure-functions.lua ## @@ -0,0 +1,137 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one or more +-- contributor license agreements. See the NOTICE file distributed with +-- this work for additional information regarding copyright ownership. +-- The ASF licenses this file to You under the Apache License, Version 2.0 +-- (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +local core = require("apisix.core") +local http = require("resty.http") +local plugin = require("apisix.plugin") +local ngx = ngx +local plugin_name = "azure-functions" + +local schema = { +type = "object", +properties = { +function_uri = {type = "string"}, +authorization = { +type = "object", +properties = { +apikey = {type = "string"}, +clientid = {type = "string"} +} +}, +timeout = {type = "integer", minimum = 100, default = 3000}, +ssl_verify = {type = "boolean", default = true}, +keepalive = {type = "boolean", default = true}, +keepalive_timeout = {type = "integer", minimum = 1000, default = 6}, +keepalive_pool = {type = "integer", minimum = 1, default = 5} +}, +required = {"function_uri"} +} + +local metadata_schema = { +type = "object", +properties = { +master_apikey = {type = "string", default = ""}, +master_clientid = {type = "string", default = ""} +} +} + +local _M = { +version = 0.1, +priority = -1900, +name = plugin_name, +schema = schema, +metadata_schema = metadata_schema +} + +function _M.check_schema(conf, schema_type) +if schema_type == core.schema.TYPE_METADATA then +return core.schema.check(metadata_schema, conf) +end +return core.schema.check(schema, conf) +end + +function _M.access(conf, ctx) +local uri_args = core.request.get_uri_args(ctx) +local headers = core.request.headers(ctx) or {} +local req_body, err = core.request.get_body() + +if err then +core.log.error("error while reading request body: " .. err) Review comment: bad style, it should be `core.log.error("error while reading request body: ", err)` -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] sandy420 commented on issue #5500: request help: the request will be triggered from time to time after the request enters apisix, and the request will be sent to the back end with a
sandy420 commented on issue #5500: URL: https://github.com/apache/apisix/issues/5500#issuecomment-972582852 @tzssangglassBrother, is there any progress?Do I need to provide anything more? -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] membphis commented on a change in pull request #5543: docs: addition of multi language support into readme
membphis commented on a change in pull request #5543: URL: https://github.com/apache/apisix/pull/5543#discussion_r751949556 ## File path: README.md ## @@ -146,6 +146,12 @@ A/B testing, canary release, blue-green deployment, limit rate, defense against - Custom load balancing algorithms: You can use custom load balancing algorithms during the `balancer` phase. - Custom routing: Support users to implement routing algorithms themselves. +- **Multi-Language support** + - Apache APISIX is a multi-language gateway for plugin development and provides support via `WASM` and `RPC`. + ![Multi Language Support into Apache APISIX](docs/assets/images/apisix-multi-lang-support.png) + - The WASM or WebAssembly, is the modern way. If we look at the left part, APISIX can load and run WASM bytecode via APISIX wasm plugin, so developers only need to write the code according to the SDK and then compile it into a WASM bytecode file and put it in the APISIX folder. As of now, APISIX has support for Golang SDK and Rust SDK - more language SDKs will be supported in the future. Review comment: we can add a link for `Golang SDK` and `Rust SDK` later. ## File path: README.md ## @@ -146,6 +146,12 @@ A/B testing, canary release, blue-green deployment, limit rate, defense against - Custom load balancing algorithms: You can use custom load balancing algorithms during the `balancer` phase. - Custom routing: Support users to implement routing algorithms themselves. +- **Multi-Language support** + - Apache APISIX is a multi-language gateway for plugin development and provides support via `WASM` and `RPC`. + ![Multi Language Support into Apache APISIX](docs/assets/images/apisix-multi-lang-support.png) + - The WASM or WebAssembly, is the modern way. If we look at the left part, APISIX can load and run WASM bytecode via APISIX wasm plugin, so developers only need to write the code according to the SDK and then compile it into a WASM bytecode file and put it in the APISIX folder. As of now, APISIX has support for Golang SDK and Rust SDK - more language SDKs will be supported in the future. + - The RPC way, is a traditional way. If we look at the right part, developers can choose the language according to their needs. After starting an independent process with the RPC, it exchanges data with APISIX through local RPC communication. Till this moment, APISIX has support for Java, Golang, Python and Node.js. Review comment: same issue, we can add a link to `Golang`, `Python` and `Java`. eg: the Java should be linked to https://github.com/apache/apisix-java-plugin-runner -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] bisakhmondal commented on a change in pull request #5479: feat(plugin): azure serverless functions
bisakhmondal commented on a change in pull request #5479: URL: https://github.com/apache/apisix/pull/5479#discussion_r751960482 ## File path: apisix/plugins/azure-functions.lua ## @@ -0,0 +1,137 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one or more +-- contributor license agreements. See the NOTICE file distributed with +-- this work for additional information regarding copyright ownership. +-- The ASF licenses this file to You under the Apache License, Version 2.0 +-- (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +local core = require("apisix.core") +local http = require("resty.http") +local plugin = require("apisix.plugin") +local ngx = ngx +local plugin_name = "azure-functions" + +local schema = { +type = "object", +properties = { +function_uri = {type = "string"}, +authorization = { +type = "object", +properties = { +apikey = {type = "string"}, +clientid = {type = "string"} +} +}, +timeout = {type = "integer", minimum = 100, default = 3000}, +ssl_verify = {type = "boolean", default = true}, +keepalive = {type = "boolean", default = true}, +keepalive_timeout = {type = "integer", minimum = 1000, default = 6}, +keepalive_pool = {type = "integer", minimum = 1, default = 5} +}, +required = {"function_uri"} +} + +local metadata_schema = { +type = "object", +properties = { +master_apikey = {type = "string", default = ""}, +master_clientid = {type = "string", default = ""} +} +} + +local _M = { +version = 0.1, +priority = -1900, +name = plugin_name, +schema = schema, +metadata_schema = metadata_schema +} + +function _M.check_schema(conf, schema_type) +if schema_type == core.schema.TYPE_METADATA then +return core.schema.check(metadata_schema, conf) +end +return core.schema.check(schema, conf) +end + +function _M.access(conf, ctx) +local uri_args = core.request.get_uri_args(ctx) +local headers = core.request.headers(ctx) or {} +local req_body, err = core.request.get_body() + +if err then +core.log.error("error while reading request body: " .. err) Review comment: Ack. Thanks for pointing it out! -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] particlec commented on issue #487: Who is using APISIX?(欢迎使用 APISIX 的个人和公司在此留言)
particlec commented on issue #487: URL: https://github.com/apache/apisix/issues/487#issuecomment-972613367 组织机构:优特科技 地点:中国珠海 联系人:906266...@qq.com 目的:原网关升级 组织:广州优特云科技有限公司 地点:中国珠海 方式:906266...@qq.com 使用场景:开发中台,供多家子公司使用,apisix java自定义插件 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix-website] branch master updated: docs: add Dapr with APISIX Ingress (#751)
This is an automated email from the ASF dual-hosted git repository. bzp2010 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/apisix-website.git The following commit(s) were added to refs/heads/master by this push: new 18eebaf docs: add Dapr with APISIX Ingress (#751) 18eebaf is described below commit 18eebaf628f2eead3afc4f88a3eef6c36832a180 Author: Sylvia <39793568+sylviab...@users.noreply.github.com> AuthorDate: Thu Nov 18 15:45:49 2021 +0800 docs: add Dapr with APISIX Ingress (#751) --- website/blog/2021/11/17/dapr-with-apisix.md| 209 + .../2021/11/17/dapr-with-apisix.md | 209 + 2 files changed, 418 insertions(+) diff --git a/website/blog/2021/11/17/dapr-with-apisix.md b/website/blog/2021/11/17/dapr-with-apisix.md new file mode 100644 index 000..1571119 --- /dev/null +++ b/website/blog/2021/11/17/dapr-with-apisix.md @@ -0,0 +1,209 @@ +--- +title: "How to integrate with Dapr to build Apache APISIX Gateway Controller" +author: "Shanyou Zhang" +authorURL: "https://github.com/geffzhang"; +authorImageURL: "https://avatars.githubusercontent.com/u/439390?v=4"; +keywords: +- Apache APISIX +- Dapr +- Kubernetes +- API Gateway +- Sidecar +description: This article will show you how to create an Apache APISIX controller by integrating Dapr, includes the concept of the project and the specific operation steps. +tags: [Technology] +--- + +> This article will show you how to create an Apache APISIX controller by integrating Dapr, includes the concept of the project and the specific operation steps. + + + +Essentially, the Apache APISIX controller will configure the same standard DAPR annotations to inject DAPRD sidecar. Exposing this sidecar allows external applications to communicate with applications in the cluster that have Dapr enabled. + +The following diagram shows the architectural flow of the actual project: + +![Overview](https://static.apiseven.com/202108/1637119221118-75dab9f1-4092-4684-ad23-34932d8a7eac.png) + +## Overview + +### Apache APISIX Ingress + +In the K8s ecosystem, Ingress is a resource that represents the entry point for K8s traffic. To make it effective, an Ingress Controller is needed to listen to the Ingress resources in K8s, resolve the rules for those resources, and actually carry the traffic. The most widely used Ingress Controller implementations in today's trends are Kubernetes Ingress Nginx. + +APISIX Ingress is another implementation of the Ingress Controller. The main difference from Kubernetes Ingress Nginx is that APISIX Ingress uses Apache APISIX as the actual data plane for hosting business traffic. As shown in the figure below, when a user requests a specific service/API/web page, the entire business traffic/user request is transferred to the K8s cluster through an external proxy and then processed by APISIX Ingress. + +![APISIX Ingress](https://static.apiseven.com/202108/1637119221119-71bbe219-dd19-46be-90fb-20cd667d9805.png) + +As you can see from the above diagram, APISIX Ingress is divided into two parts. One part is the APISIX Ingress Controller, which serves as the control plane for configuration management and distribution. The other part is the APISIX Proxy Pod, which is responsible for carrying business traffic and is implemented through CRD (Custom Resource Definitions). Apache APISIX Ingress supports not only custom resources but also native K8s Ingress resources. + +[Click here](https://www.apiseven.com/zh/blog/apisix-ingress-details) for more details. + +### Dapr + +Dapr is a portable, event-driven runtime. It makes it simple for developers to build elastic, stateless and stateful applications running on the cloud and edge, and includes multiple languages and developer frameworks. + +![Dapr](https://static.apiseven.com/202108/1637119221120-15a5be20-17a2-4c18-a82e-91e1ff3709f0.png) + +Today, we are experiencing a wave of cloud applications. Developers are familiar with web+ database application architectures (e.g., classic 3-tier designs), but not with what is essentially a distributed microservice application architecture. Developers want to focus on business logic while relying on the platform to infuse their applications with scalability, elasticity, maintainability, resiliency, and other attributes of native cloud architectures. + +This is where Dapr comes in. + +Dapr can codify best practices for building microservice applications into open, independent building blocks, enabling users to build portable applications using the language and framework of their choice. Each building block is completely independent and one or more of them can be used in an application. + +In addition, Dapr is platform agnostic, which means users can run applications natively in any Kubernetes cluster and other hosting environments that integrate with Dapr. + +[Click here](https://docs.dapr.io/zh-hans/concepts/overview/) for mor
[GitHub] [apisix-website] bzp2010 merged pull request #751: docs: add Dapr with APISIX Ingress
bzp2010 merged pull request #751: URL: https://github.com/apache/apisix-website/pull/751 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org