I am trying to migrate to a new Kong version from 2.8 to 3.6, I prepared a Dockerfile with all the stuff to run my container, I tested build and running my container with the default plugins and everything is OK
Working with kong-plugin-myplugin per default tested with Pongo
I tested Manually moving all the files needed and copying the all.rock
docker exec -it kong-gateway luarocks install /tmp/plugins/kong-plugin-myplugin-0.1.0-1.all.rock
kong-plugin-myplugin 0.1.0-1 is now installed in /usr/local (license: Apache 2.0)
That is correct but when I am trying to enable the plugin on the docker to assign it as global or per services is not working for me (I am using yaml file to activate this)
When I am running my docker to install and activate the new plugin the container is generating this error, for the record I put in stand by my plugin and I am using the per default kong plugin that we can found in the kong plugin page with no modification that we can use with pongo and works
2024/03/12 17:50:22 [error] 1#0: init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:797: error parsing declarative config file /Users/roger/dockers/kong36/kong.yml:
in ‘plugins’:
- in entry 1 of ‘plugins’:
in ‘name’: plugin ‘kong-plugin-myplugin’ not enabled; add it to the ‘plugins’ configuration property
stack traceback:
[C]: in function ‘error’
/usr/local/share/lua/5.1/kong/init.lua:797: in function ‘init’
init_by_lua(nginx-kong.conf:54):3: in main chunk
nginx: [error] init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:797: error parsing declarative config file /Users/roger/dockers/kong36/kong.yml:
in ‘plugins’: - in entry 1 of ‘plugins’:
in ‘name’: plugin ‘kong-plugin-myplugin’ not enabled; add it to the ‘plugins’ configuration property
stack traceback:
[C]: in function ‘error’
/usr/local/share/lua/5.1/kong/init.lua:797: in function ‘init’
init_by_lua(nginx-kong.conf:54):3: in main chunk
Any ideas that can help me to solve it?
My kong.yml
_format_version: "1.1"
_transform: true
plugins:
- name: kong-plugin-myplugin
services:
- host: mockbin.org
name: example_service
port: 80
protocol: http
routes:
- name: example_route
paths:
- /mock
strip_path: true
- name: mockbin-service-testing
url: https://44ced822a679416c97777751c647a4.api.mockbin.io/
routes:
- name: mockbin-route-testing
paths:
- /testing
plugins:
- name: rate-limiting
config:
second: 1
hour: 2
policy: local