diff --git a/charts/apisix/README.md b/charts/apisix/README.md index f29e1b16..9e773de4 100644 --- a/charts/apisix/README.md +++ b/charts/apisix/README.md @@ -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 | diff --git a/charts/apisix/templates/configmap.yaml b/charts/apisix/templates/configmap.yaml index c61b183d..26bb95dd 100644 --- a/charts/apisix/templates/configmap.yaml +++ b/charts/apisix/templates/configmap.yaml @@ -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 }} diff --git a/charts/apisix/values.yaml b/charts/apisix/values.yaml index 1032d292..52160a1a 100644 --- a/charts/apisix/values.yaml +++ b/charts/apisix/values.yaml @@ -210,6 +210,8 @@ plugins: - traffic-split - gzip - real-ip + - ext-plugin-pre-req + - ext-plugin-post-req stream_plugins: - mqtt-proxy - ip-restriction @@ -217,6 +219,10 @@ stream_plugins: pluginAttrs: {} +extPlugin: + enabled: false + cmd: ["/path/to/apisix-plugin-runner/runner", "run"] + # customPlugins allows you to mount your own HTTP plugins. customPlugins: enabled: false