You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/04/29 07:24:52 UTC

[GitHub] [apisix-ingress-controller] Chever-John opened a new pull request, #994: docs: add "how to use go plugin runner in APISIX Ingress"

Chever-John opened a new pull request, #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994

   about how to use go plugin runner in APISIX Ingress.
   
   Methion issue #921 
   
   <!-- Please answer these questions before submitting a pull request -->
   
   ### Type of change:
   
   <!-- Please delete options that are not relevant. -->
   
   - [ ] Bugfix
   - [ ] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   <!--- If it fixes an open issue, please link to the issue here. -->
   
   ### Pre-submission checklist:
   
   <!--
   Please follow the requirements:
   1. Use Draft if the PR is not ready to be reviewed
   2. Test is required for the feat/fix PR, unless you have a good reason
   3. Doc is required for the feat PR
   4. Use a new commit to resolve review instead of `push -f`
   5. Use "request review" to notify the reviewer once you have resolved the review
   -->
   
   * [ ] 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-ingress-controller#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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866121211


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description

Review Comment:
   OK, I will check this section.



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"

Review Comment:
   The following installation commands?



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner/cmd/go-runner$ tree -L 1
+.
+├── go-runner
+├── main.go
+├── main_test.go
+├── plugins
+└── version.go
+
+1 directory, 4 files
+```
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+RUN set -x \
+    && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
+    && apk add --no-cache --virtual .builddeps \
+        build-base \
+        automake \
+        autoconf \
+        make \
+        libtool \
+        pkgconfig \
+        cmake \
+        unzip \
+        curl \
+        openssl \
+        git \
+        openldap-dev \
+    && luarocks install https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
+    && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
+    && (function ver_lt { [ "$1" = "$2" ] && return 1 || [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]; };  if [ "$APISIX_VERSION" = "master" ] || ver_lt 2.2.0 $APISIX_VERSION; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
+    && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
+    && apk del .builddeps \
+    && apk add --no-cache \
+        bash \
+        curl \
+        libstdc++ \
+        openldap \
+        tzdata \
+    # forward request and error logs to docker log collector
+    && ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
+    && ln -sf /dev/stderr /usr/local/apisix/logs/error.log
+
+WORKDIR /usr/local/apisix
+
+ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
+
+EXPOSE 9080 9443
+
+CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]
+
+STOPSIGNAL SIGQUIT
+```
+
+This Dockerfile configuration document, from this [link](https://github.com/apache/apisix-docker/blob/master/alpine/Dockerfile). The only changes I made were as follows:
+
+```bash
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+
+```
+
+Package all the `/apisix-go-plugin-runner` files in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory into a Docker image. Note down the location of the executable `apisix-go-plugin-runner/cmd/go-runner/go-runner` and the location of the `/usr/local/apisix-go-plugin-runner` directory in the Dockerfile above to get the final location of the executable in the Docker image is located as follows.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.

Review Comment:
   Will this be the decisive reason? Maybe let me know what you would do if it were you, appreciate it!
   



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:

Review Comment:
   Is it possible to make it clearer? I understand that you want me to put the packing steps in the image?
   
   



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866587898


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"

Review Comment:
   @tao12345666333  Got it~
   I am testing this process.



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#issuecomment-1123121681

   @Chever-John any update? 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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866132286


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner/cmd/go-runner$ tree -L 1
+.
+├── go-runner
+├── main.go
+├── main_test.go
+├── plugins
+└── version.go
+
+1 directory, 4 files
+```
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+RUN set -x \
+    && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
+    && apk add --no-cache --virtual .builddeps \
+        build-base \
+        automake \
+        autoconf \
+        make \
+        libtool \
+        pkgconfig \
+        cmake \
+        unzip \
+        curl \
+        openssl \
+        git \
+        openldap-dev \
+    && luarocks install https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
+    && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
+    && (function ver_lt { [ "$1" = "$2" ] && return 1 || [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]; };  if [ "$APISIX_VERSION" = "master" ] || ver_lt 2.2.0 $APISIX_VERSION; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
+    && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
+    && apk del .builddeps \
+    && apk add --no-cache \
+        bash \
+        curl \
+        libstdc++ \
+        openldap \
+        tzdata \
+    # forward request and error logs to docker log collector
+    && ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
+    && ln -sf /dev/stderr /usr/local/apisix/logs/error.log
+
+WORKDIR /usr/local/apisix
+
+ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
+
+EXPOSE 9080 9443
+
+CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]
+
+STOPSIGNAL SIGQUIT
+```
+
+This Dockerfile configuration document, from this [link](https://github.com/apache/apisix-docker/blob/master/alpine/Dockerfile). The only changes I made were as follows:
+
+```bash
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+
+```
+
+Package all the `/apisix-go-plugin-runner` files in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory into a Docker image. Note down the location of the executable `apisix-go-plugin-runner/cmd/go-runner/go-runner` and the location of the `/usr/local/apisix-go-plugin-runner` directory in the Dockerfile above to get the final location of the executable in the Docker image is located as follows.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.
+
+#### Begin to build Docker Image
+
+Start building a Docker image based on the Dockerfile. The command is executed in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory. The command is as follows:
+
+```bash
+docker build -t apisix/forrunner:0.1 .
+```
+
+Command Explanation: Build an image with the name `apisix/forrunner` and mark it as version 0.1.
+
+#### Load the image to the cluster environment
+
+```bash
+kind load docker-image apisix/forrunner:0.1
+```
+
+Load the image into the kind cluster environment to pull the custom local image for installation during the helm installation.
+
+### Install APISIX Ingress
+
+#### Customize the helm chart
+
+This section focuses on modifying the `values.yaml` file in the official helm package so that it can install locally packaged images and run the `go-plugin-runner` executable properly.
+
+##### Fetch Official helm chart
+
+First, fetch the latest apisix helm chart package with the following command:
+
+```bash
+helm fetch apisix/apisix
+```
+
+The file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix-0.9.1.tgz
+└── apisix-go-plugin-runner
+
+1 directory, 1 file
+```
+
+##### Unzip
+
+Unzip the `apisix-0.9.1.tgz` file and prepare to rewrite the configuration. The unzip command is as follows.
+
+```bash
+tar zxvf apisix-0.9.1.tgz
+```
+
+The file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix
+├── apisix-0.9.1.tgz
+└── apisix-go-plugin-runner
+
+2 directories, 1 file
+```
+
+##### Change `values.yaml`
+
+Go to the `apisix` folder and modify the `values.yaml` file. The two changes are as follows:
+
+```yaml
+image:
+  repository: apisix/forrunner
+  pullPolicy: IfNotPresent
+  # Overrides the image tag whose default is the chart appVersion.
+  tag: 0.1
+```
+
+The first change sets the image for the helm installation to be a locally packaged image of your own.
+
+```yaml
+extPlugin:
+  enabled: true
+  cmd: ["/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner", "run"]
+```
+
+The second change sets the position of go-runner in the container after running the container.
+
+##### Compress the modified helm chart
+
+Once configured, compress the `apisix` file. The compression command is as follows:
+
+```bash
+tar zcvf apisix.tgz apisix/
+```
+
+The compressed file is obtained, at which point the file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix
+├── apisix-0.9.1.tgz
+├── apisix-go-plugin-runner
+└── apisix.tgz
+
+2 directories, 2 files
+```
+

Review Comment:
   This reason is not sufficient.
   Even without compression, the result won't make any difference



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] navendu-pottekkat commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
navendu-pottekkat commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866475974


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,375 @@
+# How to use go-plugin-runner in APISIX Ingress

Review Comment:
   Shouldn't we follow this format:
   
   ```yaml
   ---
   title: Title
   keywords:
     - APISIX
     - Ingress
     - ...
     - ...
   description: This document contains information about ...
   ---
   ```



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,375 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.

Review Comment:
   Would it be better to express the different steps in a list?



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:

Review Comment:
   I would suggest the same. Instead of rewriting, we should always have a single source of truth which we should link to. So, even when the truth changes, it would not require rewriting the blogs.



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"

Review Comment:
   @tao12345666333 Why is it not necessary?



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,375 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.

Review Comment:
   ```suggestion
   1. Put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
   ```



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866614135


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -23,7 +23,14 @@ title: How to use go-plugin-runner in APISIX Ingress
 
 ## Proposal Description
 
-Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Build the cluster;
+2. Build the image;
+3. Customize the helm chart package;

Review Comment:
   Solved~



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r877763878


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,207 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the go-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.
+
+It is guaranteed that the final result can be derived in full based on this environment example as follows:
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+kind: v0.12.0
+kubectl version(Client/Server): v1.23.5/v1.23.4
+golang: 1.18
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder. Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory.
+
+After writing the plugins, start compiling the executable formally, and note here that you should build **static executables**, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable in the `apisix-go-plugin-runner/cmd/go-runner/` directory.
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.

Review Comment:
   Solved



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866432320


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description

Review Comment:
   Solved~



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner/cmd/go-runner$ tree -L 1
+.
+├── go-runner
+├── main.go
+├── main_test.go
+├── plugins
+└── version.go
+
+1 directory, 4 files
+```
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+RUN set -x \
+    && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
+    && apk add --no-cache --virtual .builddeps \
+        build-base \
+        automake \
+        autoconf \
+        make \
+        libtool \
+        pkgconfig \
+        cmake \
+        unzip \
+        curl \
+        openssl \
+        git \
+        openldap-dev \
+    && luarocks install https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
+    && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
+    && (function ver_lt { [ "$1" = "$2" ] && return 1 || [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]; };  if [ "$APISIX_VERSION" = "master" ] || ver_lt 2.2.0 $APISIX_VERSION; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
+    && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
+    && apk del .builddeps \
+    && apk add --no-cache \
+        bash \
+        curl \
+        libstdc++ \
+        openldap \
+        tzdata \
+    # forward request and error logs to docker log collector
+    && ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
+    && ln -sf /dev/stderr /usr/local/apisix/logs/error.log
+
+WORKDIR /usr/local/apisix
+
+ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
+
+EXPOSE 9080 9443
+
+CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]
+
+STOPSIGNAL SIGQUIT
+```
+
+This Dockerfile configuration document, from this [link](https://github.com/apache/apisix-docker/blob/master/alpine/Dockerfile). The only changes I made were as follows:
+
+```bash
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+
+```
+
+Package all the `/apisix-go-plugin-runner` files in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory into a Docker image. Note down the location of the executable `apisix-go-plugin-runner/cmd/go-runner/go-runner` and the location of the `/usr/local/apisix-go-plugin-runner` directory in the Dockerfile above to get the final location of the executable in the Docker image is located as follows.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.

Review Comment:
   waiting for more suggestions~



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"

Review Comment:
   waiting for more suggestions.



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner/cmd/go-runner$ tree -L 1
+.
+├── go-runner
+├── main.go
+├── main_test.go
+├── plugins
+└── version.go
+
+1 directory, 4 files
+```
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+RUN set -x \
+    && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
+    && apk add --no-cache --virtual .builddeps \
+        build-base \
+        automake \
+        autoconf \
+        make \
+        libtool \
+        pkgconfig \
+        cmake \
+        unzip \
+        curl \
+        openssl \
+        git \
+        openldap-dev \
+    && luarocks install https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
+    && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
+    && (function ver_lt { [ "$1" = "$2" ] && return 1 || [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]; };  if [ "$APISIX_VERSION" = "master" ] || ver_lt 2.2.0 $APISIX_VERSION; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
+    && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
+    && apk del .builddeps \
+    && apk add --no-cache \
+        bash \
+        curl \
+        libstdc++ \
+        openldap \
+        tzdata \
+    # forward request and error logs to docker log collector
+    && ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
+    && ln -sf /dev/stderr /usr/local/apisix/logs/error.log
+
+WORKDIR /usr/local/apisix
+
+ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
+
+EXPOSE 9080 9443
+
+CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]
+
+STOPSIGNAL SIGQUIT
+```
+
+This Dockerfile configuration document, from this [link](https://github.com/apache/apisix-docker/blob/master/alpine/Dockerfile). The only changes I made were as follows:
+
+```bash
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+
+```
+
+Package all the `/apisix-go-plugin-runner` files in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory into a Docker image. Note down the location of the executable `apisix-go-plugin-runner/cmd/go-runner/go-runner` and the location of the `/usr/local/apisix-go-plugin-runner` directory in the Dockerfile above to get the final location of the executable in the Docker image is located as follows.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.
+
+#### Begin to build Docker Image
+
+Start building a Docker image based on the Dockerfile. The command is executed in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory. The command is as follows:
+
+```bash
+docker build -t apisix/forrunner:0.1 .
+```
+
+Command Explanation: Build an image with the name `apisix/forrunner` and mark it as version 0.1.
+
+#### Load the image to the cluster environment
+
+```bash
+kind load docker-image apisix/forrunner:0.1
+```
+
+Load the image into the kind cluster environment to pull the custom local image for installation during the helm installation.
+
+### Install APISIX Ingress
+
+#### Customize the helm chart
+
+This section focuses on modifying the `values.yaml` file in the official helm package so that it can install locally packaged images and run the `go-plugin-runner` executable properly.
+
+##### Fetch Official helm chart
+
+First, fetch the latest apisix helm chart package with the following command:
+
+```bash
+helm fetch apisix/apisix
+```
+
+The file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix-0.9.1.tgz
+└── apisix-go-plugin-runner
+
+1 directory, 1 file
+```
+
+##### Unzip
+
+Unzip the `apisix-0.9.1.tgz` file and prepare to rewrite the configuration. The unzip command is as follows.
+
+```bash
+tar zxvf apisix-0.9.1.tgz
+```
+
+The file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix
+├── apisix-0.9.1.tgz
+└── apisix-go-plugin-runner
+
+2 directories, 1 file
+```
+
+##### Change `values.yaml`
+
+Go to the `apisix` folder and modify the `values.yaml` file. The two changes are as follows:
+
+```yaml
+image:
+  repository: apisix/forrunner
+  pullPolicy: IfNotPresent
+  # Overrides the image tag whose default is the chart appVersion.
+  tag: 0.1
+```
+
+The first change sets the image for the helm installation to be a locally packaged image of your own.
+
+```yaml
+extPlugin:
+  enabled: true
+  cmd: ["/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner", "run"]
+```
+
+The second change sets the position of go-runner in the container after running the container.
+
+##### Compress the modified helm chart
+
+Once configured, compress the `apisix` file. The compression command is as follows:
+
+```bash
+tar zcvf apisix.tgz apisix/
+```
+
+The compressed file is obtained, at which point the file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix
+├── apisix-0.9.1.tgz
+├── apisix-go-plugin-runner
+└── apisix.tgz
+
+2 directories, 2 files
+```
+
+#### Execute the helm install command
+
+##### Create namespace
+
+Before installation, create namespaces with the following command:
+
+```bash
+kubectl create ns ingress-apisix
+```
+
+Then install APISIX using helm with the following command:
+
+```bash
+helm install apisix ./apisix.tgz --set gateway.type=NodePort --set ingress-controller.enabled=true --namespace ingress-apisix --set ingress-controller.config.apisix.serviceNamespace=ingress-apisix
+```
+
+### Create httpbin service and ApisixRoute resources
+
+Create an httpbin backend resource to run with the deployed ApisixRoute resource to test that the functionality is working correctly.
+
+#### Create httpbin service
+
+Create an httpbin service with the following command:
+
+```bash
+kubectl run httpbin --image kennethreitz/httpbin --port 80
+```
+
+Expose the port with the following command:
+
+```bash
+kubectl expose pod httpbin --port 80
+```
+
+#### Create ApisixRoute Resource
+
+Create the `go-plugin-runner-route.yaml` file to enable the ApisixRoute resource, with the following configuration file:
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+  name: plugin-runner-demo
+spec:
+  http:
+  - name: rule1
+    match:
+      hosts:
+      - local.httpbin.org
+      paths:
+      - /get
+    backends:
+    - serviceName: httpbin
+      servicePort: 80
+    plugins:
+    - name: ext-plugin-pre-req
+      enable: true
+      config:
+        conf:
+        - name: "say"
+          value: "{\"body\": \"hello\"}"

Review Comment:
   Solved~



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner/cmd/go-runner$ tree -L 1
+.
+├── go-runner
+├── main.go
+├── main_test.go
+├── plugins
+└── version.go
+
+1 directory, 4 files
+```
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+RUN set -x \
+    && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
+    && apk add --no-cache --virtual .builddeps \
+        build-base \
+        automake \
+        autoconf \
+        make \
+        libtool \
+        pkgconfig \
+        cmake \
+        unzip \
+        curl \
+        openssl \
+        git \
+        openldap-dev \
+    && luarocks install https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
+    && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
+    && (function ver_lt { [ "$1" = "$2" ] && return 1 || [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]; };  if [ "$APISIX_VERSION" = "master" ] || ver_lt 2.2.0 $APISIX_VERSION; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
+    && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
+    && apk del .builddeps \
+    && apk add --no-cache \
+        bash \
+        curl \
+        libstdc++ \
+        openldap \
+        tzdata \
+    # forward request and error logs to docker log collector
+    && ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
+    && ln -sf /dev/stderr /usr/local/apisix/logs/error.log
+
+WORKDIR /usr/local/apisix
+
+ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
+
+EXPOSE 9080 9443
+
+CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]
+
+STOPSIGNAL SIGQUIT
+```
+
+This Dockerfile configuration document, from this [link](https://github.com/apache/apisix-docker/blob/master/alpine/Dockerfile). The only changes I made were as follows:
+
+```bash
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+
+```
+
+Package all the `/apisix-go-plugin-runner` files in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory into a Docker image. Note down the location of the executable `apisix-go-plugin-runner/cmd/go-runner/go-runner` and the location of the `/usr/local/apisix-go-plugin-runner` directory in the Dockerfile above to get the final location of the executable in the Docker image is located as follows.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.
+
+#### Begin to build Docker Image
+
+Start building a Docker image based on the Dockerfile. The command is executed in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory. The command is as follows:
+
+```bash
+docker build -t apisix/forrunner:0.1 .
+```
+
+Command Explanation: Build an image with the name `apisix/forrunner` and mark it as version 0.1.
+
+#### Load the image to the cluster environment
+
+```bash
+kind load docker-image apisix/forrunner:0.1
+```
+
+Load the image into the kind cluster environment to pull the custom local image for installation during the helm installation.
+
+### Install APISIX Ingress
+
+#### Customize the helm chart
+
+This section focuses on modifying the `values.yaml` file in the official helm package so that it can install locally packaged images and run the `go-plugin-runner` executable properly.
+
+##### Fetch Official helm chart
+
+First, fetch the latest apisix helm chart package with the following command:
+
+```bash
+helm fetch apisix/apisix
+```
+
+The file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix-0.9.1.tgz
+└── apisix-go-plugin-runner
+
+1 directory, 1 file
+```
+
+##### Unzip
+
+Unzip the `apisix-0.9.1.tgz` file and prepare to rewrite the configuration. The unzip command is as follows.
+
+```bash
+tar zxvf apisix-0.9.1.tgz
+```
+
+The file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix
+├── apisix-0.9.1.tgz
+└── apisix-go-plugin-runner
+
+2 directories, 1 file
+```
+
+##### Change `values.yaml`
+
+Go to the `apisix` folder and modify the `values.yaml` file. The two changes are as follows:
+
+```yaml
+image:
+  repository: apisix/forrunner
+  pullPolicy: IfNotPresent
+  # Overrides the image tag whose default is the chart appVersion.
+  tag: 0.1
+```
+
+The first change sets the image for the helm installation to be a locally packaged image of your own.
+
+```yaml
+extPlugin:
+  enabled: true
+  cmd: ["/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner", "run"]
+```
+
+The second change sets the position of go-runner in the container after running the container.
+
+##### Compress the modified helm chart
+
+Once configured, compress the `apisix` file. The compression command is as follows:
+
+```bash
+tar zcvf apisix.tgz apisix/
+```
+
+The compressed file is obtained, at which point the file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix
+├── apisix-0.9.1.tgz
+├── apisix-go-plugin-runner
+└── apisix.tgz
+
+2 directories, 2 files
+```
+

Review Comment:
   Solved~



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:

Review Comment:
   waiting for more suggestions~



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866584818


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,375 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.

Review Comment:
   Solved~



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r877764304


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,205 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description

Review Comment:
   Solved



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866584098


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,375 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.

Review Comment:
   Solved~



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866592898


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -23,7 +23,14 @@ title: How to use go-plugin-runner in APISIX Ingress
 
 ## Proposal Description
 
-Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Build the cluster;
+2. Build the image;
+3. Customize the helm chart package;

Review Comment:
   Install and deploy



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -23,7 +23,14 @@ title: How to use go-plugin-runner in APISIX Ingress
 
 ## Proposal Description
 
-Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Build the cluster;
+2. Build the image;
+3. Customize the helm chart package;
+4. Deploy the resources.

Review Comment:
   Verification function



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -23,7 +23,14 @@ title: How to use go-plugin-runner in APISIX Ingress
 
 ## Proposal Description
 
-Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Build the cluster;

Review Comment:
   Prepare the environment ?



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -23,7 +23,14 @@ title: How to use go-plugin-runner in APISIX Ingress
 
 ## Proposal Description
 
-Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Build the cluster;
+2. Build the image;

Review Comment:
   Build a container image that includes 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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r884567098


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,205 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---

Review Comment:
   Thanks, that helps me~



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r870048429


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,347 @@
+---
+title: How to use go-plugin-runner in APISIX Ingress

Review Comment:
   Solved



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866604484


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -23,7 +23,14 @@ title: How to use go-plugin-runner in APISIX Ingress
 
 ## Proposal Description
 
-Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Build the cluster;

Review Comment:
   Thanks very much for your suggestions.
   Yeah, at the beginning of everything, we should prepare the environment.
   I am adding 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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866611200


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"

Review Comment:
   Test successfully~



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"

Review Comment:
   Solved~



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r874998170


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,215 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Proposal Description

Review Comment:
   This is not a proposal, right?



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,215 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the go-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.
+
+It is guaranteed that the final result can be derived in full based on this environment example as follows:
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+kind: v0.12.0
+kubectl version(Client/Server): v1.23.5/v1.23.4
+golang: 1.18
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder. Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory.
+
+After writing the plugins, start compiling the executable formally, and note here that you should build **static executables**, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable in the `apisix-go-plugin-runner/cmd/go-runner/` directory.
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+# DockerfileForRunner
+FROM apache/apisix:2.13.1-alpine
+
+COPY ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+```
+
+Here I will again emphasize the path address as follows where the executable file is located.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.
+
+#### Begin to build Docker Image
+
+Start building a Docker image based on the Dockerfile. The command is executed in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory. The command is as follows:
+
+```bash
+docker build -t apisix/forrunner:0.1 .
+```
+
+Command Explanation: Build an image with the name `apisix/forrunner` and mark it as version 0.1.
+
+#### Load the image to the cluster environment
+
+```bash
+kind load docker-image apisix/forrunner:0.1
+```
+
+Load the image into the kind cluster environment to pull the custom local image for installation during the helm installation.
+
+### Install APISIX Ingress
+
+#### Create namespace
+
+Before installation, create namespaces with the following command:
+
+```bash
+kubectl create ns ingress-apisix

Review Comment:
   inconsistent here and below.
   
   In addition, since you have passed --create-namespace , there is no need to create ns in advance



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r877762610


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,215 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Proposal Description

Review Comment:
   Yes, solved



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866120342


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner/cmd/go-runner$ tree -L 1
+.
+├── go-runner
+├── main.go
+├── main_test.go
+├── plugins
+└── version.go
+
+1 directory, 4 files
+```
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+RUN set -x \
+    && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
+    && apk add --no-cache --virtual .builddeps \
+        build-base \
+        automake \
+        autoconf \
+        make \
+        libtool \
+        pkgconfig \
+        cmake \
+        unzip \
+        curl \
+        openssl \
+        git \
+        openldap-dev \
+    && luarocks install https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
+    && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
+    && (function ver_lt { [ "$1" = "$2" ] && return 1 || [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]; };  if [ "$APISIX_VERSION" = "master" ] || ver_lt 2.2.0 $APISIX_VERSION; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
+    && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
+    && apk del .builddeps \
+    && apk add --no-cache \
+        bash \
+        curl \
+        libstdc++ \
+        openldap \
+        tzdata \
+    # forward request and error logs to docker log collector
+    && ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
+    && ln -sf /dev/stderr /usr/local/apisix/logs/error.log
+
+WORKDIR /usr/local/apisix
+
+ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
+
+EXPOSE 9080 9443
+
+CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]
+
+STOPSIGNAL SIGQUIT
+```
+
+This Dockerfile configuration document, from this [link](https://github.com/apache/apisix-docker/blob/master/alpine/Dockerfile). The only changes I made were as follows:
+
+```bash
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+
+```
+
+Package all the `/apisix-go-plugin-runner` files in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory into a Docker image. Note down the location of the executable `apisix-go-plugin-runner/cmd/go-runner/go-runner` and the location of the `/usr/local/apisix-go-plugin-runner` directory in the Dockerfile above to get the final location of the executable in the Docker image is located as follows.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.
+
+#### Begin to build Docker Image
+
+Start building a Docker image based on the Dockerfile. The command is executed in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory. The command is as follows:
+
+```bash
+docker build -t apisix/forrunner:0.1 .
+```
+
+Command Explanation: Build an image with the name `apisix/forrunner` and mark it as version 0.1.
+
+#### Load the image to the cluster environment
+
+```bash
+kind load docker-image apisix/forrunner:0.1
+```
+
+Load the image into the kind cluster environment to pull the custom local image for installation during the helm installation.
+
+### Install APISIX Ingress
+
+#### Customize the helm chart
+
+This section focuses on modifying the `values.yaml` file in the official helm package so that it can install locally packaged images and run the `go-plugin-runner` executable properly.
+
+##### Fetch Official helm chart
+
+First, fetch the latest apisix helm chart package with the following command:
+
+```bash
+helm fetch apisix/apisix
+```
+
+The file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix-0.9.1.tgz
+└── apisix-go-plugin-runner
+
+1 directory, 1 file
+```
+
+##### Unzip
+
+Unzip the `apisix-0.9.1.tgz` file and prepare to rewrite the configuration. The unzip command is as follows.
+
+```bash
+tar zxvf apisix-0.9.1.tgz
+```
+
+The file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix
+├── apisix-0.9.1.tgz
+└── apisix-go-plugin-runner
+
+2 directories, 1 file
+```
+
+##### Change `values.yaml`
+
+Go to the `apisix` folder and modify the `values.yaml` file. The two changes are as follows:
+
+```yaml
+image:
+  repository: apisix/forrunner
+  pullPolicy: IfNotPresent
+  # Overrides the image tag whose default is the chart appVersion.
+  tag: 0.1
+```
+
+The first change sets the image for the helm installation to be a locally packaged image of your own.
+
+```yaml
+extPlugin:
+  enabled: true
+  cmd: ["/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner", "run"]
+```
+
+The second change sets the position of go-runner in the container after running the container.
+
+##### Compress the modified helm chart
+
+Once configured, compress the `apisix` file. The compression command is as follows:
+
+```bash
+tar zcvf apisix.tgz apisix/
+```
+
+The compressed file is obtained, at which point the file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix
+├── apisix-0.9.1.tgz
+├── apisix-go-plugin-runner
+└── apisix.tgz
+
+2 directories, 2 files
+```
+

Review Comment:
   Just want to make the article more complete.
   After all, we need to ensure that the user reads the article and is able to reproduce the results based on the article's commands.



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866152522


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner/cmd/go-runner$ tree -L 1
+.
+├── go-runner
+├── main.go
+├── main_test.go
+├── plugins
+└── version.go
+
+1 directory, 4 files
+```
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+RUN set -x \
+    && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
+    && apk add --no-cache --virtual .builddeps \
+        build-base \
+        automake \
+        autoconf \
+        make \
+        libtool \
+        pkgconfig \
+        cmake \
+        unzip \
+        curl \
+        openssl \
+        git \
+        openldap-dev \
+    && luarocks install https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
+    && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
+    && (function ver_lt { [ "$1" = "$2" ] && return 1 || [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]; };  if [ "$APISIX_VERSION" = "master" ] || ver_lt 2.2.0 $APISIX_VERSION; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
+    && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
+    && apk del .builddeps \
+    && apk add --no-cache \
+        bash \
+        curl \
+        libstdc++ \
+        openldap \
+        tzdata \
+    # forward request and error logs to docker log collector
+    && ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
+    && ln -sf /dev/stderr /usr/local/apisix/logs/error.log
+
+WORKDIR /usr/local/apisix
+
+ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
+
+EXPOSE 9080 9443
+
+CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]
+
+STOPSIGNAL SIGQUIT
+```
+
+This Dockerfile configuration document, from this [link](https://github.com/apache/apisix-docker/blob/master/alpine/Dockerfile). The only changes I made were as follows:
+
+```bash
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+
+```
+
+Package all the `/apisix-go-plugin-runner` files in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory into a Docker image. Note down the location of the executable `apisix-go-plugin-runner/cmd/go-runner/go-runner` and the location of the `/usr/local/apisix-go-plugin-runner` directory in the Dockerfile above to get the final location of the executable in the Docker image is located as follows.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.
+
+#### Begin to build Docker Image
+
+Start building a Docker image based on the Dockerfile. The command is executed in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory. The command is as follows:
+
+```bash
+docker build -t apisix/forrunner:0.1 .
+```
+
+Command Explanation: Build an image with the name `apisix/forrunner` and mark it as version 0.1.
+
+#### Load the image to the cluster environment
+
+```bash
+kind load docker-image apisix/forrunner:0.1
+```
+
+Load the image into the kind cluster environment to pull the custom local image for installation during the helm installation.
+
+### Install APISIX Ingress
+
+#### Customize the helm chart
+
+This section focuses on modifying the `values.yaml` file in the official helm package so that it can install locally packaged images and run the `go-plugin-runner` executable properly.
+
+##### Fetch Official helm chart
+
+First, fetch the latest apisix helm chart package with the following command:
+
+```bash
+helm fetch apisix/apisix
+```
+
+The file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix-0.9.1.tgz
+└── apisix-go-plugin-runner
+
+1 directory, 1 file
+```
+
+##### Unzip
+
+Unzip the `apisix-0.9.1.tgz` file and prepare to rewrite the configuration. The unzip command is as follows.
+
+```bash
+tar zxvf apisix-0.9.1.tgz
+```
+
+The file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix
+├── apisix-0.9.1.tgz
+└── apisix-go-plugin-runner
+
+2 directories, 1 file
+```
+
+##### Change `values.yaml`
+
+Go to the `apisix` folder and modify the `values.yaml` file. The two changes are as follows:
+
+```yaml
+image:
+  repository: apisix/forrunner
+  pullPolicy: IfNotPresent
+  # Overrides the image tag whose default is the chart appVersion.
+  tag: 0.1
+```
+
+The first change sets the image for the helm installation to be a locally packaged image of your own.
+
+```yaml
+extPlugin:
+  enabled: true
+  cmd: ["/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner", "run"]
+```
+
+The second change sets the position of go-runner in the container after running the container.
+
+##### Compress the modified helm chart
+
+Once configured, compress the `apisix` file. The compression command is as follows:
+
+```bash
+tar zcvf apisix.tgz apisix/
+```
+
+The compressed file is obtained, at which point the file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix
+├── apisix-0.9.1.tgz
+├── apisix-go-plugin-runner
+└── apisix.tgz
+
+2 directories, 2 files
+```
+

Review Comment:
    So the better way is to  Avoid using compression. 
    Got that, thank you.
   I will fix it tomorrow
   Have a good night.



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] juzhiyuan merged pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
juzhiyuan merged PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] navendu-pottekkat commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
navendu-pottekkat commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r877712848


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,205 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---

Review Comment:
   Include keywords and description here for SEO.



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,205 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:

Review Comment:
   We can add an initial sentence that says what we are going to do. For example, "This document walks through how you can use the APISIX Go Plugin runner with APISIX ingress controller. This guide is divided into the following steps: ..."



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,205 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description

Review Comment:
   This could just be "Description".



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,205 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the go-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.
+
+It is guaranteed that the final result can be derived in full based on this environment example as follows:
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+kind: v0.12.0
+kubectl version(Client/Server): v1.23.5/v1.23.4
+golang: 1.18
+```
+
+## Begin

Review Comment:
   Change all headings according to this.



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,205 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the go-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.
+
+It is guaranteed that the final result can be derived in full based on this environment example as follows:
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+kind: v0.12.0
+kubectl version(Client/Server): v1.23.5/v1.23.4
+golang: 1.18
+```
+
+## Begin

Review Comment:
   I think we do not need this heading. The heading level 2 should be the 6 steps mentioned in the introduction.



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,205 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the go-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.

Review Comment:
   ```suggestion
   1. Prepare the environment.
   2. Create the cluster.
   3. Build a container image that includes the go-plugin-runner.
   4. Customize the Helm chart package.
   5. Install and deploy.
   6. Verify the function.
   ```



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r877765987


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,205 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:

Review Comment:
   Solved



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r879002740


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,205 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the go-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.
+
+It is guaranteed that the final result can be derived in full based on this environment example as follows:
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+kind: v0.12.0
+kubectl version(Client/Server): v1.23.5/v1.23.4
+golang: 1.18
+```
+
+## Begin

Review Comment:
   Solved



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r879003097


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,205 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---

Review Comment:
   What exactly should I do? Can you give a demonstration case?



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r870048804


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,347 @@
+---
+title: How to use go-plugin-runner in APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the x-plugin-runner;

Review Comment:
   Solved



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r877670971


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,207 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the go-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.
+
+It is guaranteed that the final result can be derived in full based on this environment example as follows:
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+kind: v0.12.0
+kubectl version(Client/Server): v1.23.5/v1.23.4
+golang: 1.18
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder. Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory.
+
+After writing the plugins, start compiling the executable formally, and note here that you should build **static executables**, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable in the `apisix-go-plugin-runner/cmd/go-runner/` directory.
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+# DockerfileForRunner
+FROM apache/apisix:2.13.1-alpine
+
+COPY ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+```
+
+Here I will again emphasize the path address as follows where the executable file is located.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.
+
+#### Begin to build Docker Image
+
+Start building a Docker image based on the Dockerfile. The command is executed in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory. The command is as follows:
+
+```bash
+docker build -t apisix/forrunner:0.1 .
+```
+
+Command Explanation: Build an image with the name `apisix/forrunner` and mark it as version 0.1.
+
+#### Load the image to the cluster environment
+
+```bash
+kind load docker-image apisix/forrunner:0.1
+```
+
+Load the image into the kind cluster environment to pull the custom local image for installation during the helm installation.
+
+### Install APISIX Ingress
+
+#### Create namespace

Review Comment:
   Solved



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] navendu-pottekkat commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
navendu-pottekkat commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r884443994


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,205 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---

Review Comment:
   @Chever-John Could you check this? https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/api-breaker.md
   
   See the YAML front matter there.



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r877762707


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,207 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the go-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.
+
+It is guaranteed that the final result can be derived in full based on this environment example as follows:
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+kind: v0.12.0
+kubectl version(Client/Server): v1.23.5/v1.23.4
+golang: 1.18
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder. Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory.
+
+After writing the plugins, start compiling the executable formally, and note here that you should build **static executables**, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable in the `apisix-go-plugin-runner/cmd/go-runner/` directory.
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+# DockerfileForRunner
+FROM apache/apisix:2.13.1-alpine
+
+COPY ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+```
+
+Here I will again emphasize the path address as follows where the executable file is located.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.
+
+#### Begin to build Docker Image
+
+Start building a Docker image based on the Dockerfile. The command is executed in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory. The command is as follows:
+
+```bash
+docker build -t apisix/forrunner:0.1 .
+```
+
+Command Explanation: Build an image with the name `apisix/forrunner` and mark it as version 0.1.
+
+#### Load the image to the cluster environment
+
+```bash
+kind load docker-image apisix/forrunner:0.1
+```
+
+Load the image into the kind cluster environment to pull the custom local image for installation during the helm installation.
+
+### Install APISIX Ingress
+
+#### Create namespace
+
+Then install APISIX using helm with the following command in the directory of Apache APISIX Helm Chart:
+
+```bash
+helm install apisix apisix/apisix --set gateway.type=NodePort --set apisix.image.repository=custom/apisix --set apisix.image.tag=v0.1 --set extPlugin.enabled=true --set extPlugin.cmd=["/usr/local/apisix-go-plugin-runner/go-runner", "run"] --set ingress-controller.enabled=true --set ingress-controller.config.apisix.serviceNamespace=apisix --namespace apisix --create-namespace --set ingress-controller.config.apisix.serviceName=apisix-admin

Review Comment:
   Solved~



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,207 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the go-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.
+
+It is guaranteed that the final result can be derived in full based on this environment example as follows:
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+kind: v0.12.0
+kubectl version(Client/Server): v1.23.5/v1.23.4
+golang: 1.18
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder. Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory.
+
+After writing the plugins, start compiling the executable formally, and note here that you should build **static executables**, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable in the `apisix-go-plugin-runner/cmd/go-runner/` directory.
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+# DockerfileForRunner
+FROM apache/apisix:2.13.1-alpine
+
+COPY ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+```
+
+Here I will again emphasize the path address as follows where the executable file is located.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.
+
+#### Begin to build Docker Image
+
+Start building a Docker image based on the Dockerfile. The command is executed in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory. The command is as follows:
+
+```bash
+docker build -t apisix/forrunner:0.1 .
+```
+
+Command Explanation: Build an image with the name `apisix/forrunner` and mark it as version 0.1.
+
+#### Load the image to the cluster environment
+
+```bash
+kind load docker-image apisix/forrunner:0.1
+```
+
+Load the image into the kind cluster environment to pull the custom local image for installation during the helm installation.
+
+### Install APISIX Ingress
+
+#### Create namespace
+
+Then install APISIX using helm with the following command in the directory of Apache APISIX Helm Chart:
+
+```bash
+helm install apisix apisix/apisix --set gateway.type=NodePort --set apisix.image.repository=custom/apisix --set apisix.image.tag=v0.1 --set extPlugin.enabled=true --set extPlugin.cmd=["/usr/local/apisix-go-plugin-runner/go-runner", "run"] --set ingress-controller.enabled=true --set ingress-controller.config.apisix.serviceNamespace=apisix --namespace apisix --create-namespace --set ingress-controller.config.apisix.serviceName=apisix-admin
+```
+
+### Create httpbin service and ApisixRoute resources
+
+Create an httpbin backend resource to run with the deployed ApisixRoute resource to test that the functionality is working correctly.
+
+#### Create httpbin service
+
+Create an httpbin service with the following command:
+
+```bash
+kubectl run httpbin --image kennethreitz/httpbin --port 80
+```
+
+Expose the port with the following command:
+
+```bash
+kubectl expose pod httpbin --port 80
+```
+
+#### Create ApisixRoute Resource
+
+Create the `go-plugin-runner-route.yaml` file to enable the ApisixRoute resource, with the following configuration file:
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+  name: plugin-runner-demo
+spec:
+  http:
+  - name: rule1
+    match:
+      hosts:
+      - local.httpbin.org
+      paths:
+      - /get
+    backends:
+    - serviceName: httpbin
+      servicePort: 80
+    plugins:
+    - name: ext-plugin-pre-req
+      enable: true
+      config:
+        conf:
+        - name: "say"
+          value: "{\"body\": \"hello\"}"
+```
+
+The create resource command is as follows:
+
+```bash
+kubectl apply -f go-plugin-runner-route.yaml
+```
+
+### Test
+
+The command is as follows to test if the plugin written in Golang is working correctly:
+
+```bash
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9080/get -H 'Host: local.httpbin.org'
+```
+
+Here I derived from the `kubectl get pods --all-namespaces` command that the `${namespace of Apache APISIX}` and `${Pod name of Apache APISIX}` parameters here are `ingress-apisix` and `apisix- 55d476c64-s5lzw`, execute the command as follows:
+
+```bash
+kubectl exec -it -n ingress-apisix apisix-55d476c64-s5lzw -- curl http://127.0.0.1:9080/get -H 'Host: local.httpbin.org'
+```
+
+The expected response obtained is:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ kubectl exec -it -n ingress-apisix apisix-55d476c64-s5lzw -- curl http://127.0.0.1:9080/get -H 'Host: local.httpbin.org'

Review Comment:
   Solved



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r877695326


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,207 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the go-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.
+
+It is guaranteed that the final result can be derived in full based on this environment example as follows:
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+kind: v0.12.0
+kubectl version(Client/Server): v1.23.5/v1.23.4
+golang: 1.18
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder. Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory.
+
+After writing the plugins, start compiling the executable formally, and note here that you should build **static executables**, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable in the `apisix-go-plugin-runner/cmd/go-runner/` directory.
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.

Review Comment:
   also https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866477009



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#issuecomment-1127575252

   @tao12345666333 Hi, I have finished all the code reviews. Please review again, sir~


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866119449


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner/cmd/go-runner$ tree -L 1
+.
+├── go-runner
+├── main.go
+├── main_test.go
+├── plugins
+└── version.go
+
+1 directory, 4 files
+```
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+RUN set -x \
+    && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
+    && apk add --no-cache --virtual .builddeps \
+        build-base \
+        automake \
+        autoconf \
+        make \
+        libtool \
+        pkgconfig \
+        cmake \
+        unzip \
+        curl \
+        openssl \
+        git \
+        openldap-dev \
+    && luarocks install https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
+    && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
+    && (function ver_lt { [ "$1" = "$2" ] && return 1 || [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]; };  if [ "$APISIX_VERSION" = "master" ] || ver_lt 2.2.0 $APISIX_VERSION; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
+    && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
+    && apk del .builddeps \
+    && apk add --no-cache \
+        bash \
+        curl \
+        libstdc++ \
+        openldap \
+        tzdata \
+    # forward request and error logs to docker log collector
+    && ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
+    && ln -sf /dev/stderr /usr/local/apisix/logs/error.log
+
+WORKDIR /usr/local/apisix
+
+ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
+
+EXPOSE 9080 9443
+
+CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]
+
+STOPSIGNAL SIGQUIT
+```
+
+This Dockerfile configuration document, from this [link](https://github.com/apache/apisix-docker/blob/master/alpine/Dockerfile). The only changes I made were as follows:
+
+```bash
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+
+```
+
+Package all the `/apisix-go-plugin-runner` files in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory into a Docker image. Note down the location of the executable `apisix-go-plugin-runner/cmd/go-runner/go-runner` and the location of the `/usr/local/apisix-go-plugin-runner` directory in the Dockerfile above to get the final location of the executable in the Docker image is located as follows.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.
+
+#### Begin to build Docker Image
+
+Start building a Docker image based on the Dockerfile. The command is executed in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory. The command is as follows:
+
+```bash
+docker build -t apisix/forrunner:0.1 .
+```
+
+Command Explanation: Build an image with the name `apisix/forrunner` and mark it as version 0.1.
+
+#### Load the image to the cluster environment
+
+```bash
+kind load docker-image apisix/forrunner:0.1
+```
+
+Load the image into the kind cluster environment to pull the custom local image for installation during the helm installation.
+
+### Install APISIX Ingress
+
+#### Customize the helm chart
+
+This section focuses on modifying the `values.yaml` file in the official helm package so that it can install locally packaged images and run the `go-plugin-runner` executable properly.
+
+##### Fetch Official helm chart
+
+First, fetch the latest apisix helm chart package with the following command:
+
+```bash
+helm fetch apisix/apisix
+```
+
+The file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix-0.9.1.tgz
+└── apisix-go-plugin-runner
+
+1 directory, 1 file
+```
+
+##### Unzip
+
+Unzip the `apisix-0.9.1.tgz` file and prepare to rewrite the configuration. The unzip command is as follows.
+
+```bash
+tar zxvf apisix-0.9.1.tgz
+```
+
+The file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix
+├── apisix-0.9.1.tgz
+└── apisix-go-plugin-runner
+
+2 directories, 1 file
+```
+
+##### Change `values.yaml`
+
+Go to the `apisix` folder and modify the `values.yaml` file. The two changes are as follows:
+
+```yaml
+image:
+  repository: apisix/forrunner
+  pullPolicy: IfNotPresent
+  # Overrides the image tag whose default is the chart appVersion.
+  tag: 0.1
+```
+
+The first change sets the image for the helm installation to be a locally packaged image of your own.
+
+```yaml
+extPlugin:
+  enabled: true
+  cmd: ["/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner", "run"]
+```
+
+The second change sets the position of go-runner in the container after running the container.
+
+##### Compress the modified helm chart
+
+Once configured, compress the `apisix` file. The compression command is as follows:
+
+```bash
+tar zcvf apisix.tgz apisix/
+```
+
+The compressed file is obtained, at which point the file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix
+├── apisix-0.9.1.tgz
+├── apisix-go-plugin-runner
+└── apisix.tgz
+
+2 directories, 2 files
+```
+
+#### Execute the helm install command
+
+##### Create namespace
+
+Before installation, create namespaces with the following command:
+
+```bash
+kubectl create ns ingress-apisix
+```
+
+Then install APISIX using helm with the following command:
+
+```bash
+helm install apisix ./apisix.tgz --set gateway.type=NodePort --set ingress-controller.enabled=true --namespace ingress-apisix --set ingress-controller.config.apisix.serviceNamespace=ingress-apisix
+```
+
+### Create httpbin service and ApisixRoute resources
+
+Create an httpbin backend resource to run with the deployed ApisixRoute resource to test that the functionality is working correctly.
+
+#### Create httpbin service
+
+Create an httpbin service with the following command:
+
+```bash
+kubectl run httpbin --image kennethreitz/httpbin --port 80
+```
+
+Expose the port with the following command:
+
+```bash
+kubectl expose pod httpbin --port 80
+```
+
+#### Create ApisixRoute Resource
+
+Create the `go-plugin-runner-route.yaml` file to enable the ApisixRoute resource, with the following configuration file:
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+  name: plugin-runner-demo
+spec:
+  http:
+  - name: rule1
+    match:
+      hosts:
+      - local.httpbin.org
+      paths:
+      - /get
+    backends:
+    - serviceName: httpbin
+      servicePort: 80
+    plugins:
+    - name: ext-plugin-pre-req
+      enable: true
+      config:
+        conf:
+        - name: "say"
+          value: "{\"body\": \"hello\"}"

Review Comment:
   Sure~



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#issuecomment-1119182357

   cc @navendu-pottekkat
   Please help check 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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866583096


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"

Review Comment:
   Even without this configuration line 32~37 , APISIX Ingress can be installed and run normally.
   
   Introducing extra content can cause confusion



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r865496185


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description

Review Comment:
   I don't think this section is necessary or should describe the value of using the plugin runner, not what you think



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866578904


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:

Review Comment:
   @tao12345666333 @navendu-pottekkat 
   I'm convinced by you guys, thanks~



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:

Review Comment:
   Solved~



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866582904


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"

Review Comment:
   line 32~37 
   



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866483466


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,375 @@
+# How to use go-plugin-runner in APISIX Ingress

Review Comment:
   Thank you very much for your suggestion; I will revise it carefully.
   



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r867284906


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,347 @@
+---
+title: How to use go-plugin-runner in APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the x-plugin-runner;

Review Comment:
   ```suggestion
   3. Build a container image that includes the go-plugin-runner;
   ```



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,347 @@
+---
+title: How to use go-plugin-runner in APISIX Ingress

Review Comment:
   ```suggestion
   title: How to use go-plugin-runner with APISIX Ingress
   ```



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,347 @@
+---
+title: How to use go-plugin-runner in APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the x-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.
+
+It is guaranteed that the final result can be derived in full based on this environment example as follows:
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64

Review Comment:
   ```suggestion
   ```



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:

Review Comment:
   @Chever-John I don't see where you solved this comment.
   
   Lines 70 to 137 should not appear in this document.
   
   Note that **this is a document, not a blog post.**



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,347 @@
+---
+title: How to use go-plugin-runner in APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the x-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.
+
+It is guaranteed that the final result can be derived in full based on this environment example as follows:
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. Put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner/cmd/go-runner$ tree -L 1
+.
+├── go-runner
+├── main.go
+├── main_test.go
+├── plugins
+└── version.go
+
+1 directory, 4 files
+```
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+We can write the Dockerfile by referring to examples in this [repository](https://github.com/apache/apisix-docker). Here I recommend adding the following line of code to this [Dockerfile file](https://github.com/apache/apisix-docker/blob/master/alpine/Dockerfile).
+
+```bash
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+# That is the line being added
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+
+```

Review Comment:
   ```suggestion
   ```Dockerfile
   FROM apache/apisix:2.13.1
   
   COPY <Your go-plugin-runner static binary> /usr/local/apisix-go-plugin-runner
   ```
   ```
   
   we can just base on APISIX image, then copy go-plugin-runner static binary 



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r884605928


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,205 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---

Review Comment:
   Solved~



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r880622783


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,205 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---

Review Comment:
   ping @navendu-pottekkat 



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,205 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---

Review Comment:
   ping @navendu-pottekkat 



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866110719


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"

Review Comment:
   it's not necessary



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner/cmd/go-runner$ tree -L 1
+.
+├── go-runner
+├── main.go
+├── main_test.go
+├── plugins
+└── version.go
+
+1 directory, 4 files
+```
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+RUN set -x \
+    && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
+    && apk add --no-cache --virtual .builddeps \
+        build-base \
+        automake \
+        autoconf \
+        make \
+        libtool \
+        pkgconfig \
+        cmake \
+        unzip \
+        curl \
+        openssl \
+        git \
+        openldap-dev \
+    && luarocks install https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
+    && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
+    && (function ver_lt { [ "$1" = "$2" ] && return 1 || [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]; };  if [ "$APISIX_VERSION" = "master" ] || ver_lt 2.2.0 $APISIX_VERSION; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
+    && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
+    && apk del .builddeps \
+    && apk add --no-cache \
+        bash \
+        curl \
+        libstdc++ \
+        openldap \
+        tzdata \
+    # forward request and error logs to docker log collector
+    && ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
+    && ln -sf /dev/stderr /usr/local/apisix/logs/error.log
+
+WORKDIR /usr/local/apisix
+
+ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
+
+EXPOSE 9080 9443
+
+CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]
+
+STOPSIGNAL SIGQUIT
+```
+
+This Dockerfile configuration document, from this [link](https://github.com/apache/apisix-docker/blob/master/alpine/Dockerfile). The only changes I made were as follows:
+
+```bash
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+
+```
+
+Package all the `/apisix-go-plugin-runner` files in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory into a Docker image. Note down the location of the executable `apisix-go-plugin-runner/cmd/go-runner/go-runner` and the location of the `/usr/local/apisix-go-plugin-runner` directory in the Dockerfile above to get the final location of the executable in the Docker image is located as follows.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.

Review Comment:
   Why not just base on the APISIX image?



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner/cmd/go-runner$ tree -L 1
+.
+├── go-runner
+├── main.go
+├── main_test.go
+├── plugins
+└── version.go
+
+1 directory, 4 files
+```
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+RUN set -x \
+    && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
+    && apk add --no-cache --virtual .builddeps \
+        build-base \
+        automake \
+        autoconf \
+        make \
+        libtool \
+        pkgconfig \
+        cmake \
+        unzip \
+        curl \
+        openssl \
+        git \
+        openldap-dev \
+    && luarocks install https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
+    && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
+    && (function ver_lt { [ "$1" = "$2" ] && return 1 || [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]; };  if [ "$APISIX_VERSION" = "master" ] || ver_lt 2.2.0 $APISIX_VERSION; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
+    && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
+    && apk del .builddeps \
+    && apk add --no-cache \
+        bash \
+        curl \
+        libstdc++ \
+        openldap \
+        tzdata \
+    # forward request and error logs to docker log collector
+    && ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
+    && ln -sf /dev/stderr /usr/local/apisix/logs/error.log
+
+WORKDIR /usr/local/apisix
+
+ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
+
+EXPOSE 9080 9443
+
+CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]
+
+STOPSIGNAL SIGQUIT
+```
+
+This Dockerfile configuration document, from this [link](https://github.com/apache/apisix-docker/blob/master/alpine/Dockerfile). The only changes I made were as follows:
+
+```bash
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+
+```
+
+Package all the `/apisix-go-plugin-runner` files in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory into a Docker image. Note down the location of the executable `apisix-go-plugin-runner/cmd/go-runner/go-runner` and the location of the `/usr/local/apisix-go-plugin-runner` directory in the Dockerfile above to get the final location of the executable in the Docker image is located as follows.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.
+
+#### Begin to build Docker Image
+
+Start building a Docker image based on the Dockerfile. The command is executed in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory. The command is as follows:
+
+```bash
+docker build -t apisix/forrunner:0.1 .
+```
+
+Command Explanation: Build an image with the name `apisix/forrunner` and mark it as version 0.1.
+
+#### Load the image to the cluster environment
+
+```bash
+kind load docker-image apisix/forrunner:0.1
+```
+
+Load the image into the kind cluster environment to pull the custom local image for installation during the helm installation.
+
+### Install APISIX Ingress
+
+#### Customize the helm chart
+
+This section focuses on modifying the `values.yaml` file in the official helm package so that it can install locally packaged images and run the `go-plugin-runner` executable properly.
+
+##### Fetch Official helm chart
+
+First, fetch the latest apisix helm chart package with the following command:
+
+```bash
+helm fetch apisix/apisix
+```
+
+The file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix-0.9.1.tgz
+└── apisix-go-plugin-runner
+
+1 directory, 1 file
+```
+
+##### Unzip
+
+Unzip the `apisix-0.9.1.tgz` file and prepare to rewrite the configuration. The unzip command is as follows.
+
+```bash
+tar zxvf apisix-0.9.1.tgz
+```
+
+The file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix
+├── apisix-0.9.1.tgz
+└── apisix-go-plugin-runner
+
+2 directories, 1 file
+```
+
+##### Change `values.yaml`
+
+Go to the `apisix` folder and modify the `values.yaml` file. The two changes are as follows:
+
+```yaml
+image:
+  repository: apisix/forrunner
+  pullPolicy: IfNotPresent
+  # Overrides the image tag whose default is the chart appVersion.
+  tag: 0.1
+```
+
+The first change sets the image for the helm installation to be a locally packaged image of your own.
+
+```yaml
+extPlugin:
+  enabled: true
+  cmd: ["/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner", "run"]
+```
+
+The second change sets the position of go-runner in the container after running the container.
+
+##### Compress the modified helm chart
+
+Once configured, compress the `apisix` file. The compression command is as follows:
+
+```bash
+tar zcvf apisix.tgz apisix/
+```
+
+The compressed file is obtained, at which point the file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix
+├── apisix-0.9.1.tgz
+├── apisix-go-plugin-runner
+└── apisix.tgz
+
+2 directories, 2 files
+```
+
+#### Execute the helm install command
+
+##### Create namespace
+
+Before installation, create namespaces with the following command:
+
+```bash
+kubectl create ns ingress-apisix
+```
+
+Then install APISIX using helm with the following command:
+
+```bash
+helm install apisix ./apisix.tgz --set gateway.type=NodePort --set ingress-controller.enabled=true --namespace ingress-apisix --set ingress-controller.config.apisix.serviceNamespace=ingress-apisix
+```
+
+### Create httpbin service and ApisixRoute resources
+
+Create an httpbin backend resource to run with the deployed ApisixRoute resource to test that the functionality is working correctly.
+
+#### Create httpbin service
+
+Create an httpbin service with the following command:
+
+```bash
+kubectl run httpbin --image kennethreitz/httpbin --port 80
+```
+
+Expose the port with the following command:
+
+```bash
+kubectl expose pod httpbin --port 80
+```
+
+#### Create ApisixRoute Resource
+
+Create the `go-plugin-runner-route.yaml` file to enable the ApisixRoute resource, with the following configuration file:
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+  name: plugin-runner-demo
+spec:
+  http:
+  - name: rule1
+    match:
+      hosts:
+      - local.httpbin.org
+      paths:
+      - /get
+    backends:
+    - serviceName: httpbin
+      servicePort: 80
+    plugins:
+    - name: ext-plugin-pre-req
+      enable: true
+      config:
+        conf:
+        - name: "say"
+          value: "{\"body\": \"hello\"}"

Review Comment:
   This is the real core of this document



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner/cmd/go-runner$ tree -L 1
+.
+├── go-runner
+├── main.go
+├── main_test.go
+├── plugins
+└── version.go
+
+1 directory, 4 files
+```
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+RUN set -x \
+    && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
+    && apk add --no-cache --virtual .builddeps \
+        build-base \
+        automake \
+        autoconf \
+        make \
+        libtool \
+        pkgconfig \
+        cmake \
+        unzip \
+        curl \
+        openssl \
+        git \
+        openldap-dev \
+    && luarocks install https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
+    && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
+    && (function ver_lt { [ "$1" = "$2" ] && return 1 || [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]; };  if [ "$APISIX_VERSION" = "master" ] || ver_lt 2.2.0 $APISIX_VERSION; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
+    && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
+    && apk del .builddeps \
+    && apk add --no-cache \
+        bash \
+        curl \
+        libstdc++ \
+        openldap \
+        tzdata \
+    # forward request and error logs to docker log collector
+    && ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
+    && ln -sf /dev/stderr /usr/local/apisix/logs/error.log
+
+WORKDIR /usr/local/apisix
+
+ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
+
+EXPOSE 9080 9443
+
+CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]
+
+STOPSIGNAL SIGQUIT
+```
+
+This Dockerfile configuration document, from this [link](https://github.com/apache/apisix-docker/blob/master/alpine/Dockerfile). The only changes I made were as follows:
+
+```bash
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+
+```
+
+Package all the `/apisix-go-plugin-runner` files in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory into a Docker image. Note down the location of the executable `apisix-go-plugin-runner/cmd/go-runner/go-runner` and the location of the `/usr/local/apisix-go-plugin-runner` directory in the Dockerfile above to get the final location of the executable in the Docker image is located as follows.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.
+
+#### Begin to build Docker Image
+
+Start building a Docker image based on the Dockerfile. The command is executed in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory. The command is as follows:
+
+```bash
+docker build -t apisix/forrunner:0.1 .
+```
+
+Command Explanation: Build an image with the name `apisix/forrunner` and mark it as version 0.1.
+
+#### Load the image to the cluster environment
+
+```bash
+kind load docker-image apisix/forrunner:0.1
+```
+
+Load the image into the kind cluster environment to pull the custom local image for installation during the helm installation.
+
+### Install APISIX Ingress
+
+#### Customize the helm chart
+
+This section focuses on modifying the `values.yaml` file in the official helm package so that it can install locally packaged images and run the `go-plugin-runner` executable properly.
+
+##### Fetch Official helm chart
+
+First, fetch the latest apisix helm chart package with the following command:
+
+```bash
+helm fetch apisix/apisix
+```
+
+The file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix-0.9.1.tgz
+└── apisix-go-plugin-runner
+
+1 directory, 1 file
+```
+
+##### Unzip
+
+Unzip the `apisix-0.9.1.tgz` file and prepare to rewrite the configuration. The unzip command is as follows.
+
+```bash
+tar zxvf apisix-0.9.1.tgz
+```
+
+The file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix
+├── apisix-0.9.1.tgz
+└── apisix-go-plugin-runner
+
+2 directories, 1 file
+```
+
+##### Change `values.yaml`
+
+Go to the `apisix` folder and modify the `values.yaml` file. The two changes are as follows:
+
+```yaml
+image:
+  repository: apisix/forrunner
+  pullPolicy: IfNotPresent
+  # Overrides the image tag whose default is the chart appVersion.
+  tag: 0.1
+```
+
+The first change sets the image for the helm installation to be a locally packaged image of your own.
+
+```yaml
+extPlugin:
+  enabled: true
+  cmd: ["/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner", "run"]
+```
+
+The second change sets the position of go-runner in the container after running the container.
+
+##### Compress the modified helm chart
+
+Once configured, compress the `apisix` file. The compression command is as follows:
+
+```bash
+tar zcvf apisix.tgz apisix/
+```
+
+The compressed file is obtained, at which point the file tree is as follows:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+├── apisix
+├── apisix-0.9.1.tgz
+├── apisix-go-plugin-runner
+└── apisix.tgz
+
+2 directories, 2 files
+```
+

Review Comment:
   unnecessary. Helm can use a directory 



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:

Review Comment:
   In fact, the usage of go-plugin-runner should be covered in `go-plugin-runner`  project, just add a link here



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866583899


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,400 @@
+# How to use go-plugin-runner in APISIX Ingress
+
+## Background Description
+
+While wandering around the community, I found a user confused about "how to use multilingual plugins in APISIX Ingress environment". I happen to be a user of go-plugin-runner and have a little knowledge of the APISIX Ingress project, so this document was born.
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+
+kind: kind v0.12.0 go1.17.8 linux/amd64
+kubectl version: Client Version: v1.23.5/Server Version: v1.23.4
+golang: go1.18 linux/amd64
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  kubeadmConfigPatches:
+  - |
+    kind: InitConfiguration
+    nodeRegistration:
+      kubeletExtraArgs:
+        node-labels: "ingress-ready=true"
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+If you have finished writing the plugin, you can start compiling the executable to run with APISIX.
+
+This article recommends two packaging build options.
+
+1. put the packaging process into the Dockerfile and finish the compilation process when you build the docker image later.
+2. You can also follow the scheme used in this document, building the executable first and then copying the packaged executable to the image.
+
+How you choose the option should depend on your local hardware considerations. The reason for selecting the second option here is that I want to rely on my powerful local hardware to increase the building speed and speed up the process.
+
+### Go to the go-plugin-runner directory
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder.
+
+After successful placement, the file tree is shown below:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ tree -L 1
+.
+└── apisix-go-plugin-runner
+
+1 directory, 0 files
+```
+
+Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory. This article will use the default plugin `say` for demonstration purposes.
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner$ tree cmd
+cmd
+└── go-runner
+    ├── main.go
+    ├── main_test.go
+    ├── plugins
+    │   ├── fault_injection.go
+    │   ├── fault_injection_test.go
+    │   ├── limit_req.go
+    │   ├── limit_req_test.go
+    │   ├── say.go
+    │   └── say_test.go
+    └── version.go
+
+2 directories, 10 files
+```
+
+After writing the plugins, start compiling the executable formally, and note here that you should build static executables, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable.
+
+In the `apisix-go-plugin-runner/cmd/go-runner/` directory, you can see that the current file tree looks like this:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner/apisix-go-plugin-runner/cmd/go-runner$ tree -L 1
+.
+├── go-runner
+├── main.go
+├── main_test.go
+├── plugins
+└── version.go
+
+1 directory, 4 files
+```
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+RUN set -x \
+    && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
+    && apk add --no-cache --virtual .builddeps \
+        build-base \
+        automake \
+        autoconf \
+        make \
+        libtool \
+        pkgconfig \
+        cmake \
+        unzip \
+        curl \
+        openssl \
+        git \
+        openldap-dev \
+    && luarocks install https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
+    && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
+    && (function ver_lt { [ "$1" = "$2" ] && return 1 || [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]; };  if [ "$APISIX_VERSION" = "master" ] || ver_lt 2.2.0 $APISIX_VERSION; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
+    && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
+    && apk del .builddeps \
+    && apk add --no-cache \
+        bash \
+        curl \
+        libstdc++ \
+        openldap \
+        tzdata \
+    # forward request and error logs to docker log collector
+    && ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
+    && ln -sf /dev/stderr /usr/local/apisix/logs/error.log
+
+WORKDIR /usr/local/apisix
+
+ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
+
+EXPOSE 9080 9443
+
+CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]
+
+STOPSIGNAL SIGQUIT
+```
+
+This Dockerfile configuration document, from this [link](https://github.com/apache/apisix-docker/blob/master/alpine/Dockerfile). The only changes I made were as follows:
+
+```bash
+ARG ENABLE_PROXY=false
+
+# Build Apache APISIX
+FROM api7/apisix-base:1.19.9.1.5
+
+ADD ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+
+ARG APISIX_VERSION=2.13.1
+LABEL apisix_version="${APISIX_VERSION}"
+
+ARG ENABLE_PROXY
+
+```
+
+Package all the `/apisix-go-plugin-runner` files in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory into a Docker image. Note down the location of the executable `apisix-go-plugin-runner/cmd/go-runner/go-runner` and the location of the `/usr/local/apisix-go-plugin-runner` directory in the Dockerfile above to get the final location of the executable in the Docker image is located as follows.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.

Review Comment:
   Based on APISIX image will be simpler and more efficient



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866613461


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -23,7 +23,14 @@ title: How to use go-plugin-runner in APISIX Ingress
 
 ## Proposal Description
 
-Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Build the cluster;
+2. Build the image;

Review Comment:
   Solved~
   



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -23,7 +23,14 @@ title: How to use go-plugin-runner in APISIX Ingress
 
 ## Proposal Description
 
-Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Build the cluster;

Review Comment:
   Solved~



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866615496


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -23,7 +23,14 @@ title: How to use go-plugin-runner in APISIX Ingress
 
 ## Proposal Description
 
-Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through building the cluster, building the image, customizing the helm chart package, and finally, deploying the resources. It is guaranteed that the final result can be derived in full based on this documentation.
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Build the cluster;
+2. Build the image;
+3. Customize the helm chart package;
+4. Deploy the resources.

Review Comment:
   Solved~



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r866579504


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,375 @@
+# How to use go-plugin-runner in APISIX Ingress

Review Comment:
   Solved~



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r875545632


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,215 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Proposal Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the go-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.
+
+It is guaranteed that the final result can be derived in full based on this environment example as follows:
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+kind: v0.12.0
+kubectl version(Client/Server): v1.23.5/v1.23.4
+golang: 1.18
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder. Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory.
+
+After writing the plugins, start compiling the executable formally, and note here that you should build **static executables**, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable in the `apisix-go-plugin-runner/cmd/go-runner/` directory.
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+# DockerfileForRunner
+FROM apache/apisix:2.13.1-alpine
+
+COPY ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+```
+
+Here I will again emphasize the path address as follows where the executable file is located.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.
+
+#### Begin to build Docker Image
+
+Start building a Docker image based on the Dockerfile. The command is executed in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory. The command is as follows:
+
+```bash
+docker build -t apisix/forrunner:0.1 .
+```
+
+Command Explanation: Build an image with the name `apisix/forrunner` and mark it as version 0.1.
+
+#### Load the image to the cluster environment
+
+```bash
+kind load docker-image apisix/forrunner:0.1
+```
+
+Load the image into the kind cluster environment to pull the custom local image for installation during the helm installation.
+
+### Install APISIX Ingress
+
+#### Create namespace
+
+Before installation, create namespaces with the following command:
+
+```bash
+kubectl create ns ingress-apisix

Review Comment:
   Thanks for your suggestions, sir~



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] Chever-John commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
Chever-John commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r877766965


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,205 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the go-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.

Review Comment:
   Sovled



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #994: docs: add "how to use go plugin runner with APISIX Ingress"

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #994:
URL: https://github.com/apache/apisix-ingress-controller/pull/994#discussion_r877133318


##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,207 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the go-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.
+
+It is guaranteed that the final result can be derived in full based on this environment example as follows:
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+kind: v0.12.0
+kubectl version(Client/Server): v1.23.5/v1.23.4
+golang: 1.18
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder. Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory.
+
+After writing the plugins, start compiling the executable formally, and note here that you should build **static executables**, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable in the `apisix-go-plugin-runner/cmd/go-runner/` directory.
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+# DockerfileForRunner
+FROM apache/apisix:2.13.1-alpine
+
+COPY ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+```
+
+Here I will again emphasize the path address as follows where the executable file is located.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.
+
+#### Begin to build Docker Image
+
+Start building a Docker image based on the Dockerfile. The command is executed in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory. The command is as follows:
+
+```bash
+docker build -t apisix/forrunner:0.1 .
+```
+
+Command Explanation: Build an image with the name `apisix/forrunner` and mark it as version 0.1.
+
+#### Load the image to the cluster environment
+
+```bash
+kind load docker-image apisix/forrunner:0.1
+```
+
+Load the image into the kind cluster environment to pull the custom local image for installation during the helm installation.
+
+### Install APISIX Ingress
+
+#### Create namespace

Review Comment:
   since you don't create namespace, this line should be deleted.



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,207 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the go-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.
+
+It is guaranteed that the final result can be derived in full based on this environment example as follows:
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+kind: v0.12.0
+kubectl version(Client/Server): v1.23.5/v1.23.4
+golang: 1.18
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder. Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory.
+
+After writing the plugins, start compiling the executable formally, and note here that you should build **static executables**, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable in the `apisix-go-plugin-runner/cmd/go-runner/` directory.
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+# DockerfileForRunner
+FROM apache/apisix:2.13.1-alpine
+
+COPY ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+```
+
+Here I will again emphasize the path address as follows where the executable file is located.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.
+
+#### Begin to build Docker Image
+
+Start building a Docker image based on the Dockerfile. The command is executed in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory. The command is as follows:
+
+```bash
+docker build -t apisix/forrunner:0.1 .
+```
+
+Command Explanation: Build an image with the name `apisix/forrunner` and mark it as version 0.1.
+
+#### Load the image to the cluster environment
+
+```bash
+kind load docker-image apisix/forrunner:0.1
+```
+
+Load the image into the kind cluster environment to pull the custom local image for installation during the helm installation.
+
+### Install APISIX Ingress
+
+#### Create namespace
+
+Then install APISIX using helm with the following command in the directory of Apache APISIX Helm Chart:
+
+```bash
+helm install apisix apisix/apisix --set gateway.type=NodePort --set apisix.image.repository=custom/apisix --set apisix.image.tag=v0.1 --set extPlugin.enabled=true --set extPlugin.cmd=["/usr/local/apisix-go-plugin-runner/go-runner", "run"] --set ingress-controller.enabled=true --set ingress-controller.config.apisix.serviceNamespace=apisix --namespace apisix --create-namespace --set ingress-controller.config.apisix.serviceName=apisix-admin
+```
+
+### Create httpbin service and ApisixRoute resources
+
+Create an httpbin backend resource to run with the deployed ApisixRoute resource to test that the functionality is working correctly.
+
+#### Create httpbin service
+
+Create an httpbin service with the following command:
+
+```bash
+kubectl run httpbin --image kennethreitz/httpbin --port 80
+```
+
+Expose the port with the following command:
+
+```bash
+kubectl expose pod httpbin --port 80
+```
+
+#### Create ApisixRoute Resource
+
+Create the `go-plugin-runner-route.yaml` file to enable the ApisixRoute resource, with the following configuration file:
+
+```yaml
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixRoute
+metadata:
+  name: plugin-runner-demo
+spec:
+  http:
+  - name: rule1
+    match:
+      hosts:
+      - local.httpbin.org
+      paths:
+      - /get
+    backends:
+    - serviceName: httpbin
+      servicePort: 80
+    plugins:
+    - name: ext-plugin-pre-req
+      enable: true
+      config:
+        conf:
+        - name: "say"
+          value: "{\"body\": \"hello\"}"
+```
+
+The create resource command is as follows:
+
+```bash
+kubectl apply -f go-plugin-runner-route.yaml
+```
+
+### Test
+
+The command is as follows to test if the plugin written in Golang is working correctly:
+
+```bash
+kubectl exec -it -n ${namespace of Apache APISIX} ${Pod name of Apache APISIX} -- curl http://127.0.0.1:9080/get -H 'Host: local.httpbin.org'
+```
+
+Here I derived from the `kubectl get pods --all-namespaces` command that the `${namespace of Apache APISIX}` and `${Pod name of Apache APISIX}` parameters here are `ingress-apisix` and `apisix- 55d476c64-s5lzw`, execute the command as follows:
+
+```bash
+kubectl exec -it -n ingress-apisix apisix-55d476c64-s5lzw -- curl http://127.0.0.1:9080/get -H 'Host: local.httpbin.org'
+```
+
+The expected response obtained is:
+
+```bash
+chever@cloud-native-01:~/api7/cloud_native/tasks/plugin-runner$ kubectl exec -it -n ingress-apisix apisix-55d476c64-s5lzw -- curl http://127.0.0.1:9080/get -H 'Host: local.httpbin.org'

Review Comment:
   ```suggestion
   kubectl exec -it -n ingress-apisix apisix-55d476c64-s5lzw -- curl http://127.0.0.1:9080/get -H 'Host: local.httpbin.org'
   ```
   
   The format here can be consistent with the previous format
   



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,207 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the go-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.
+
+It is guaranteed that the final result can be derived in full based on this environment example as follows:
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+kind: v0.12.0
+kubectl version(Client/Server): v1.23.5/v1.23.4
+golang: 1.18
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder. Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory.
+
+After writing the plugins, start compiling the executable formally, and note here that you should build **static executables**, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable in the `apisix-go-plugin-runner/cmd/go-runner/` directory.
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.
+
+### Build Docker Image
+
+The image is built here in preparation for installing APISIX later using `helm`.
+
+#### Write Dockerfile
+
+Return to the path `/home/chever/api7/cloud_native/tasks/plugin-runner` and create a Dockerfile in that directory, a demonstration of which is given here.
+
+```dockerfile
+# DockerfileForRunner
+FROM apache/apisix:2.13.1-alpine
+
+COPY ./apisix-go-plugin-runner /usr/local/apisix-go-plugin-runner
+```
+
+Here I will again emphasize the path address as follows where the executable file is located.
+
+```bash
+/usr/local/apisix-go-plugin-runner/cmd/go-runner/go-runner
+```
+
+Please make a note of this address. We will use it in the rest of the configuration.
+
+#### Begin to build Docker Image
+
+Start building a Docker image based on the Dockerfile. The command is executed in the `/home/chever/api7/cloud_native/tasks/plugin-runner` directory. The command is as follows:
+
+```bash
+docker build -t apisix/forrunner:0.1 .
+```
+
+Command Explanation: Build an image with the name `apisix/forrunner` and mark it as version 0.1.
+
+#### Load the image to the cluster environment
+
+```bash
+kind load docker-image apisix/forrunner:0.1
+```
+
+Load the image into the kind cluster environment to pull the custom local image for installation during the helm installation.
+
+### Install APISIX Ingress
+
+#### Create namespace
+
+Then install APISIX using helm with the following command in the directory of Apache APISIX Helm Chart:
+
+```bash
+helm install apisix apisix/apisix --set gateway.type=NodePort --set apisix.image.repository=custom/apisix --set apisix.image.tag=v0.1 --set extPlugin.enabled=true --set extPlugin.cmd=["/usr/local/apisix-go-plugin-runner/go-runner", "run"] --set ingress-controller.enabled=true --set ingress-controller.config.apisix.serviceNamespace=apisix --namespace apisix --create-namespace --set ingress-controller.config.apisix.serviceName=apisix-admin

Review Comment:
   This command line is incorrect and cannot be executed properly.
   
   I think I should have told you the correct command before.



##########
docs/en/latest/practices/how-to-use-go-plugin-runner-in-apisix-ingress.md:
##########
@@ -0,0 +1,207 @@
+---
+title: How to use go-plugin-runner with APISIX Ingress
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## Brief Description
+
+Based on version 0.3 of the go-plugin-runner plugin and version 1.4.0 of APISIX Ingress, this article goes through steps as follows:
+
+1. Prepare the environment (example as follows);
+2. Create the cluster;
+3. Build a container image that includes the go-plugin-runner;
+4. Customize the helm chart package;
+5. Install and Deploy;
+6. Verify the function.
+
+It is guaranteed that the final result can be derived in full based on this environment example as follows:
+
+```bash
+go-plugin-runner: 0.3
+APISIX Ingress: 1.4.0
+kind: v0.12.0
+kubectl version(Client/Server): v1.23.5/v1.23.4
+golang: 1.18
+```
+
+## Begin
+
+### Build a cluster environment
+
+Select `kind` to build a local cluster environment. The command is as follows:
+
+```bash
+cat <<EOF | kind create cluster --config=-
+kind: Cluster
+apiVersion: kind.x-k8s.io/v1alpha4
+nodes:
+- role: control-plane
+  extraPortMappings:
+  - containerPort: 80
+    hostPort: 80
+    protocol: TCP
+  - containerPort: 443
+    hostPort: 443
+    protocol: TCP
+EOF
+```
+
+### Build the go-plugin-runner executable
+
+Choose a folder address `/home/chever/api7/cloud_native/tasks/plugin-runner` and place our `apisix-go-plugin-runner` project in this folder. Then you need to go to the `apisix-go-plugin-runner/cmd/go-runner/plugins` directory and write the plugins you need in that directory.
+
+After writing the plugins, start compiling the executable formally, and note here that you should build **static executables**, not dynamic ones.
+
+The package compile command is as follows.
+
+```bash
+CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' .
+```
+
+This successfully packages a statically compiled `go-runner` executable in the `apisix-go-plugin-runner/cmd/go-runner/` directory.
+
+Please remember the path `apisix-go-plugin-runner/cmd/go-runner/go-runner`, we will use it later.

Review Comment:
   I don't think this is necessary, and as we mentioned before, this should be covered by the go-plugin-runner project's documentation. Just point to that content here



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org