Adding Lua plugins in values.yaml

Team,

We have a setup in kubernetes helm way of installation with operator and DB enabled.

We are trying to enable Orchestration use case for which we found middleman plugin to configure and test.

We followed this approach - Setting up custom plugin in Kubernetes environment - v1.2.x | Kong - Open-Source API Management and Microservice Management (Helm way). Updated the values.yaml as below -

plugins:
configMaps:
- pluginName: middleman
name: kong-plugin-middleman

Once we re-run the CR for kind kong, migrations (pre and post) and kong gateway are getting deployed successfully. But gateway pods are only in init state and not turning into run state.

kong-gateway-kong-845d56fc45-88r9x 0/2 Init 0 21h
kong-gateway-kong-845d56fc45-dcwqg 0/2 Init 0 21h
kong-gateway-kong-845d56fc45-jpj7l 0/2 Init 0 21h
kong-gateway-kong-post-upgrade-migrations-4996x 0/1 Completed 0 21h
kong-gateway-kong-pre-upgrade-migrations-t4nb7 0/1 Completed 0 21h
kong-operator-7d67d8645-d7vkf 1/1 Running 0 12d

Once we remove the plugin and re-run the setup, everything comes up fine.

kong-gateway-kong-845d56fc45-88r9x 2/2 Running 0 21h
kong-gateway-kong-845d56fc45-dcwqg 2/2 Running 0 21h
kong-gateway-kong-845d56fc45-jpj7l 2/2 Running 0 21h
kong-gateway-kong-post-upgrade-migrations-4996x 0/1 Completed 0 21h
kong-gateway-kong-pre-upgrade-migrations-t4nb7 0/1 Completed 0 21h
kong-operator-7d67d8645-d7vkf 1/1 Running 0 12d

We created configmap with plugin code. → GitHub - pantsel/kong-middleman-plugin: A Kong plugin that enables you to make an extra HTTP POST request before calling an API.

Any help on how to deploy custom plugins into the Kong setup is highly appreciated.