nic-6443 commented on a change in pull request #161:
URL: https://github.com/apache/apisix-helm-chart/pull/161#discussion_r736208284



##########
File path: charts/apisix/templates/deployment.yaml
##########
@@ -82,6 +82,15 @@ spec:
             - mountPath: /usr/local/apisix/conf/config.yaml
               name: apisix-config
               subPath: config.yaml
+          {{- if .Values.customPlugins.enabled }}
+          {{- range $plugin := .Values.customPlugins.plugins }}
+          {{- range $mount := $plugin.configMap.mounts }}
+            - mountPath: {{ $mount.path }}

Review comment:
       How about replace `- mountPath: {{ $mount.path }}` with `- mountPath: {{ 
$mount.path }}/{{ $mount.key }}`, make `mount.path` more simpler?

##########
File path: charts/apisix/templates/deployment.yaml
##########
@@ -82,6 +82,15 @@ spec:
             - mountPath: /usr/local/apisix/conf/config.yaml
               name: apisix-config
               subPath: config.yaml
+          {{- if .Values.customPlugins.enabled }}
+          {{- range $plugin := .Values.customPlugins.plugins }}
+          {{- range $mount := $plugin.configMap.mounts }}
+            - mountPath: {{ $mount.path }}

Review comment:
       `- mountPath: {{ $mount.path }}` -> `- mountPath: {{ $mount.path }}/{{ 
$mount.key }}`

##########
File path: charts/apisix/values.yaml
##########
@@ -178,6 +178,28 @@ stream_plugins:
   - ip-restriction
   - limit-conn
 
+# customPlugins allows you to mount your own HTTP plugins.
+customPlugins:
+  enabled: false
+  # the lua_path that tells APISIX where it can find plugins,
+  # note the last ';' is required.
+  luaPath: "/opts/custom_plugins/?.lua;"

Review comment:
       The last ';' is not required, [apisix will append ';' while not 
found](https://github.com/api7/api7/blob/baae2c52064578e602a9abb1412b9d06e8537ed9/apisix/cli/ops.lua#L139)




-- 
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]


Reply via email to