Skip to content

Commit

Permalink
feat(apisix): allow extPlugins to be configured (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyondhill authored Mar 23, 2022
1 parent c9a2679 commit bf241b7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions charts/apisix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ If etcd.enabled is true, set more values of bitnami/etcd helm chart use etcd as

Default enabled plugins. See [configmap template](https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/templates/configmap.yaml) for details.


### external plugin parameters

| Parameter | Description | Default |
|---------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| `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 | `{}` |

### custom plugin parameters

| Parameter | Description | Default |
Expand Down
8 changes: 8 additions & 0 deletions charts/apisix/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,14 @@ data:
- {{ $plugin }}
{{- end }}
{{- if .Values.extPlugin.enabled }}
ext-plugin:
cmd:
{{- range $arg := .Values.extPlugin.cmd }}
- {{ $arg }}
{{- end }}
{{- end }}
{{- if or .Values.pluginAttrs .Values.customPlugins.enabled .Values.serviceMonitor.enabled}}
plugin_attr:
{{- if .Values.serviceMonitor.enabled }}
Expand Down
6 changes: 6 additions & 0 deletions charts/apisix/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,19 @@ plugins:
- traffic-split
- gzip
- real-ip
- ext-plugin-pre-req
- ext-plugin-post-req
stream_plugins:
- mqtt-proxy
- ip-restriction
- limit-conn

pluginAttrs: {}

extPlugin:
enabled: false
cmd: ["/path/to/apisix-plugin-runner/runner", "run"]

# customPlugins allows you to mount your own HTTP plugins.
customPlugins:
enabled: false
Expand Down

0 comments on commit bf241b7

Please sign in to comment.