ch-gr commented on issue #12890:
URL: https://github.com/apache/apisix/issues/12890#issuecomment-3739873376
@EthanSivan You can drive this with a ConfigMap for the plugin source.
I had issues with this initially finding the correct path for it to get it
picked up, but this works for me:
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: my-plugin
data:
my-plugin.lua: |
local core = require("apisix.core")
...
```
As values for the apisix chart:
```yaml
apisix:
# Nudge the helm chart into adding our custom plugins.
#
# By default this is an empty array, causing apisix to use its
# defaults. The plugins listed here are those same defaults, taken
# from
https://github.com/apache/apisix/blob/3.14.1/apisix/cli/config.lua#L194
#
# See:
# - https://apisix.apache.org/docs/apisix/plugin-develop/#enable-the-plugin
# -
https://github.com/apache/apisix-helm-chart/blob/apisix-2.12.4/charts/apisix/templates/configmap.yaml#L266
plugins:
- "real-ip"
- "ai"
- "client-control"
... all the plugins ...
customPlugins:
enabled: true
plugins:
- name: my-plugin
attrs: {}
configMap:
name: my-plugin
mounts:
- key: my-plugin.lua
path: /opts/custom_plugins/apisix/plugins/my-plugin.lua
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]