tao12345666333 opened a new issue, #1372:
URL: https://github.com/apache/apisix-ingress-controller/issues/1372
## Background
There are two ways to configure plugins in APISIX. One is the configuration
of Plugin itself, which is effective for Plugins bound to Route.
The other is a configuration that takes effect on all Plugins in APISIX
instances, called PluginMedatada.
For specific differences, please refer to the APISIX documentation[1]
Although this feature is not used frequently, in order to align the
capabilities of APISIX, I suggest adding support for this feature.
## Design
Due to the limited functionality of this feature, there are some conditions
to use it:
- Only valid for plugins that have already taken effect
- Changes are global (infrequently used)
- The metadata that each plugin can modify is also different
I think we can create a ConfigMap in the namespace installed by the APISIX
Ingress controller to manage its configuration.
And add a flag for the APISIX Ingress controller, allowing users to specify
the name of the ConfigMap to be used.
APISIX Ingress controller will watch the ConfigMap.
When a configuration change is found, the Admin API will be called with the
new configuration to make it take effect.
E.g:
- Add a flag named plugin-metadata-cm (only one configmap)
-
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: game-demo
data:
config.yaml: |
- cluster: default
plugins:
- name : http-logger
metadata:
log_format:
host: "$host"
client_ip: "$remote_addr"
- name: kafka-logger
metadata:
log_format:
host: "$host"
- name: datadog
metadata:
host: "DogStatsD.server.domain"
port: 8125
namespace: "apisix"
- cluster: xxx
- cluster: foo
```
--
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]