You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/11/17 11:47:39 UTC

[GitHub] [apisix-helm-chart] abalage commented on issue #395: empty name in customPlugins cause various errors

abalage commented on issue #395:
URL: https://github.com/apache/apisix-helm-chart/issues/395#issuecomment-1318517990

   Sorry, what do you mean?
   My intention was to use customPlugins. The sample does not specify a name just an zero length string which is later used for concatenation. If I provide an arbitrary name for the plugin, no plugin with that name will be found.
   I am not clearly aware of  the root cause but removing that extra dash character from the generated configmap seemed to resolve it.
   
   This is the helm config I use. Maybe it helps you to reproduce the issue.
   
   ```
   dashboard:
     enabled: true
     image:
       tag: 2.13-alpine
     config:
       authentication:
         secret: secret
         expireTime: 3600
         users:
           - username: admin
             password: secretadminpasswordfordashboard
   
   admin:
     enabled: true
     credentials:
       admin: secretadminpassword
       viewer: secretviewerpassword
   
   etcd:
     enabled: true
     replicaCount: 1
     timeout: 30
   
   gateway:
     type: LoadBalancer
     stream:
       enabled: true
       only: false
   
   apisix:
     image:
       tag: 2.15.0-alpine
     timezone: Europe/Budapest
     enableIPv6: false
     extraEnvVars:
       - name: PLUGIN_ATTR_PROMETHEUS_EXPORT_ADDR_IP
         valueFrom:
           fieldRef:
             fieldPath: status.podIP
   
   customPlugins:
     enabled: true
     luaPath: "/usr/local/custom/?.lua"
     plugins:
       - name: ""
         configMap:
           name: foobar-plugins-config
           mounts:
             - key: plugin1.lua
               path: /usr/local/custom/apisix/plugins/plugin1.lua
             - key: plugin2.lua
               path: /usr/local/custom/apisix/plugins/plugin2.lua
   
   pluginAttrs:
     redirect:
       https_port: 443
     prometheus:
       prefer_name: true
       export_addr:
         ip: ${{PLUGIN_ATTR_PROMETHEUS_EXPORT_ADDR_IP}}
   plugins:                           # plugin list (sorted by priority)
     - plugin1             # priority: 24000
     - plugin2                  # priority: 23999
     - cors                           # priority: 4000
     - authz-keycloak                 # priority: 2000
     - proxy-rewrite                  # priority: 1008
     - redirect                       # priority: 900
     - prometheus                     # priority: 500
     # <- recommend to use priority (0, 100) for your custom plugins
     - serverless-post-function       # priority: -2000
     
   configurationSnippet:
     stream: |
       #server {
       #  removed-content;
       #}
   
   ingress-controller:
     enabled: true
     image:
       tag: 1.5.0
     config:
       enableProfiling: false
       kubernetes:
         appNamespaces: ["foobar"]
       apisix:
         serviceNamespace: foobar
         adminKey: secretadminpassword
   ```
   I applied it  manually.
   `$ helm --version=0.11.2 upgrade -i --reset-values --force --values=helm-config.yaml apisix apisix/apisix -n foobar`


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org