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/09/29 16:25:44 UTC

[GitHub] [apisix-helm-chart] xshadowlegendx opened a new pull request, #356: add wasmPlugins options and set wasm plugins to apisix config to apisix chart

xshadowlegendx opened a new pull request, #356:
URL: https://github.com/apache/apisix-helm-chart/pull/356

   this pr contains
   
   - [x] adding `wasmPlugins` options that able to enable/disable and configure wasm plugins that matches [wasm plugins `How to use`](https://apisix.apache.org/docs/apisix/2.15/wasm) section
   - [x] adding `wasmPlugins.plugins` to apisix `config.yaml` if `wasmPlugins.enabled` is set to `true`
   
   notes:
     - if `wasmPlugins.enabled` is set to `true` and `wasmPlugins.plugins` is empty, `wasm.plugins` will have empty list `[]` as value
     - if `wasmPlugins.enabled` is set to `true` and `wasmPlugins.plugins` key is not presented in `values.yaml`, `wasm.plugins` will have `null` as value
     - but in production or real world who would enable wasm plugin and not providing any plugin anyway
   
   finally, I welcome all feedbacks and 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-helm-chart] tao12345666333 merged pull request #356: add wasmPlugins options and set wasm plugins to apisix config to apisix chart

Posted by GitBox <gi...@apache.org>.
tao12345666333 merged PR #356:
URL: https://github.com/apache/apisix-helm-chart/pull/356


-- 
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-helm-chart] xshadowlegendx commented on a diff in pull request #356: add wasmPlugins options and set wasm plugins to apisix config to apisix chart

Posted by GitBox <gi...@apache.org>.
xshadowlegendx commented on code in PR #356:
URL: https://github.com/apache/apisix-helm-chart/pull/356#discussion_r984374985


##########
charts/apisix/README.md:
##########
@@ -154,6 +154,48 @@ Default enabled plugins. See [configmap template](https://github.com/apache/apis
 | `extPlugin.enabled` | Enable External Plugins. See [external plugin](https://apisix.apache.org/docs/apisix/next/external-plugin/) | `false` |
 | `extPlugin.cmd` | the command and its arguements to run as a subprocess | `{}` |
 
+### wasm plugin parameters
+
+| Parameter                       | Description                                                                                                                                                      | Default                     |
+|---------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
+| `wasmPlugins.enabled` | Enable Wasm Plugins. See [wasm plugin](https://apisix.apache.org/docs/apisix/next/wasm/) | `false` |
+| `wasmPlugins.plugins[].name` | Set wasm plugin name | `""` |
+| `wasmPlugins.plugins[].priority` | Set wasm plugin priority | `7999` |
+| `wasmPlugins.plugins[].file` | Set path to wasm plugin | `""` |
+| `wasmPlugins.plugins[].http_request_phase` | Set which http request phase for the plugin to run in | `access` |
+
+Note:
+  - the easiest way to to include your wasm custom plugin is to rebuild apisix image with those custom plugin included within directory you define and later on gets referenced to `wasmPlugins.plugins[].file`

Review Comment:
   hello, thanks for the correction, I will go ahead and commit the suggestion



-- 
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-helm-chart] xshadowlegendx commented on a diff in pull request #356: add wasmPlugins options and set wasm plugins to apisix config to apisix chart

Posted by GitBox <gi...@apache.org>.
xshadowlegendx commented on code in PR #356:
URL: https://github.com/apache/apisix-helm-chart/pull/356#discussion_r984184051


##########
charts/apisix/values.yaml:
##########
@@ -268,6 +268,13 @@ extPlugin:
   enabled: false
   cmd: ["/path/to/apisix-plugin-runner/runner", "run"]
 
+wasmPlugins:
+  enabled: false
+  plugins:

Review Comment:
   hello, got it will update it now



-- 
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-helm-chart] xshadowlegendx commented on pull request #356: add wasmPlugins options and set wasm plugins to apisix config to apisix chart

Posted by GitBox <gi...@apache.org>.
xshadowlegendx commented on PR #356:
URL: https://github.com/apache/apisix-helm-chart/pull/356#issuecomment-1263074594

   hello @tao12345666333, below is the readme content for configuring wasm plugins,
   
   ### wasm plugin parameters
   
   | Parameter                       | Description                                                                                                                                                      | Default                     |
   |---------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
   | `wasmPlugins.enabled` | Enable Wasm Plugins. See [wasm plugin](https://apisix.apache.org/docs/apisix/next/wasm/) | `false` |
   | `wasmPlugins.plugins[].name` | Set wasm plugin name | `""` |
   | `wasmPlugins.plugins[].priority` | Set wasm plugin priority | `7999` |
   | `wasmPlugins.plugins[].file` | Set path to wasm plugin | `/path/to/plugin.wasm` |
   | `wasmPlugins.plugins[].http_request_phase` | Set which http request phase the for plugin to run in | `access` |
   
   should the `wasmPlugins.plugins[].file` value by default set to some path `/path/to/plugin.wasm` or `""` 


-- 
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-helm-chart] tokers commented on a diff in pull request #356: add wasmPlugins options and set wasm plugins to apisix config to apisix chart

Posted by GitBox <gi...@apache.org>.
tokers commented on code in PR #356:
URL: https://github.com/apache/apisix-helm-chart/pull/356#discussion_r984129969


##########
charts/apisix/values.yaml:
##########
@@ -268,6 +268,13 @@ extPlugin:
   enabled: false
   cmd: ["/path/to/apisix-plugin-runner/runner", "run"]
 
+wasmPlugins:
+  enabled: false
+  plugins:

Review Comment:
   Let's set the `plugins` to `[]`, and comment the below `custom-plugin`. The `custom-plugin` should not be an option but an example.



-- 
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-helm-chart] xshadowlegendx commented on pull request #356: add wasmPlugins options and set wasm plugins to apisix config to apisix chart

Posted by GitBox <gi...@apache.org>.
xshadowlegendx commented on PR #356:
URL: https://github.com/apache/apisix-helm-chart/pull/356#issuecomment-1263129463

   hello @tao12345666333, is this below ok?
   
   ### wasm plugin parameters
   
   | Parameter                       | Description                                                                                                                                                      | Default                     |
   |---------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
   | `wasmPlugins.enabled` | Enable Wasm Plugins. See [wasm plugin](https://apisix.apache.org/docs/apisix/next/wasm/) | `false` |
   | `wasmPlugins.plugins[].name` | Set wasm plugin name | `""` |
   | `wasmPlugins.plugins[].priority` | Set wasm plugin priority | `7999` |
   | `wasmPlugins.plugins[].file` | Set path to wasm plugin | `""` |
   | `wasmPlugins.plugins[].http_request_phase` | Set which http request phase for the plugin to run in | `access` |
   
   Note:
     - the easiest way to to include your wasm custom plugin is to rebuild apisix image with those custom plugin included within directory you define and later on gets referenced to `wasmPlugins.plugins[].file`
     - otherwise you could use `extraVolumes` and `extraVolumeMounts` option to include your plugin by creating your plugin via `ConfigMap` and mount it to apisix pod like example below
       ```
       #... more options omitted ...
       ingress-controller:
         enabled: true
   
       dashboard:
         enabled: true
   
       # assuming you install apisix in `apisix` namespace,
       # create the plugin by this command and had the wasm plugin
       # kubectl create configmap --namespace apisix --from-file=./wasm_plugin_x.wasm wasm-plugin-x
       # Note: there are also size limitation on `ConfigMap`
   
       # these options are kubernetes
       # Volume and VolumeMount api objects
       extraVolumes:
       - name: wasm-plugin-x
         configMap:
           name: wasm-plugin-x
           items:
           - key: wasm_plugin_x.wasm
             path: wasm_plugin_x.wasm
       extraVolumeMounts:
       - name: wasm-plugin-x
         mountPath: /var/local/wasm-plugins/ # later on reference to `wasmPlugins.plugins[].file` as its value
         readOnly: true
       #... more options omitted ...
       ```


-- 
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-helm-chart] tao12345666333 commented on pull request #356: add wasmPlugins options and set wasm plugins to apisix config to apisix chart

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on PR #356:
URL: https://github.com/apache/apisix-helm-chart/pull/356#issuecomment-1263094145

   Set to ""
   
   > and should we also provide note below after the plugin config table to tell user about how to get the wasm plugin into apisix pod by either building new docker image or via extraVolumes and extraVolumeMounts options?
   
   Yes! Please! It will be useful 


-- 
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-helm-chart] xshadowlegendx commented on pull request #356: add wasmPlugins options and set wasm plugins to apisix config to apisix chart

Posted by GitBox <gi...@apache.org>.
xshadowlegendx commented on PR #356:
URL: https://github.com/apache/apisix-helm-chart/pull/356#issuecomment-1263118778

   ok got it 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix-helm-chart] tokers commented on a diff in pull request #356: add wasmPlugins options and set wasm plugins to apisix config to apisix chart

Posted by GitBox <gi...@apache.org>.
tokers commented on code in PR #356:
URL: https://github.com/apache/apisix-helm-chart/pull/356#discussion_r984352082


##########
charts/apisix/README.md:
##########
@@ -154,6 +154,48 @@ Default enabled plugins. See [configmap template](https://github.com/apache/apis
 | `extPlugin.enabled` | Enable External Plugins. See [external plugin](https://apisix.apache.org/docs/apisix/next/external-plugin/) | `false` |
 | `extPlugin.cmd` | the command and its arguements to run as a subprocess | `{}` |
 
+### wasm plugin parameters
+
+| Parameter                       | Description                                                                                                                                                      | Default                     |
+|---------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
+| `wasmPlugins.enabled` | Enable Wasm Plugins. See [wasm plugin](https://apisix.apache.org/docs/apisix/next/wasm/) | `false` |
+| `wasmPlugins.plugins[].name` | Set wasm plugin name | `""` |
+| `wasmPlugins.plugins[].priority` | Set wasm plugin priority | `7999` |
+| `wasmPlugins.plugins[].file` | Set path to wasm plugin | `""` |
+| `wasmPlugins.plugins[].http_request_phase` | Set which http request phase for the plugin to run in | `access` |
+
+Note:
+  - the easiest way to to include your wasm custom plugin is to rebuild apisix image with those custom plugin included within directory you define and later on gets referenced to `wasmPlugins.plugins[].file`

Review Comment:
   ```suggestion
     - the easiest way to include your wasm custom plugin is to rebuild the apisix image with those custom plugins included within the directory you define and later on gets referenced to `wasmPlugins.plugins[].file`
   ```



-- 
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-helm-chart] tao12345666333 commented on a diff in pull request #356: add wasmPlugins options and set wasm plugins to apisix config to apisix chart

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on code in PR #356:
URL: https://github.com/apache/apisix-helm-chart/pull/356#discussion_r984143181


##########
charts/apisix/values.yaml:
##########
@@ -268,6 +268,13 @@ extPlugin:
   enabled: false
   cmd: ["/path/to/apisix-plugin-runner/runner", "run"]
 
+wasmPlugins:
+  enabled: false
+  plugins:

Review Comment:
   +1



-- 
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-helm-chart] tao12345666333 commented on pull request #356: add wasmPlugins options and set wasm plugins to apisix config to apisix chart

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on PR #356:
URL: https://github.com/apache/apisix-helm-chart/pull/356#issuecomment-1263134621

   I think it's good 


-- 
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-helm-chart] xshadowlegendx commented on pull request #356: add wasmPlugins options and set wasm plugins to apisix config to apisix chart

Posted by GitBox <gi...@apache.org>.
xshadowlegendx commented on PR #356:
URL: https://github.com/apache/apisix-helm-chart/pull/356#issuecomment-1263140067

   ok thanks, then I will push the commit


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