AlinsRan commented on issue #1104:
URL:
https://github.com/apache/apisix-ingress-controller/issues/1104#issuecomment-1367684760
## Solution
1. Added Plugins support on ApisixClusterConfig resources
ApisixClusterConfig in the design and use of some ambiguity, in the
multi-cluster architecture, ApisixClusterConfig currently used in the way and
semantics are incorrect, its evolution direction to be discussed, in the
unclear responsibilities are not recommended to change it.
Similar to ApisixRoute, support more plugins by adding a Plugins field:
```
apiVersion: apisix.apache.org/v2
kind: ApisixClusterConfig
metadata:
name: default
spec:
plugins:
- name: prometheus
enable: true
- name: limit-count
enable: true
config:
time_window: 60
```
2. Added Annotations support in ApisixPluginConfig
By adding Annotations to extend the ability of ApisixPluginConfig to act
globally, this approach improves the flexibility of ApisixPluginConfig.
global: true Turn on global mode, allowing plugins to be applied to global:
true rules.
```
apiVersion: apisix.apache.org/v2
kind: ApisixPluginConfig
metadata:
name: plugin-config
annotations:
apisix.pache.org/global: true
spec:
plugins:
- name: prometheus
enable: true
- name: limit-count
enable: true
config:
time_window: 60
policy: "local"
count: 2
key: "remote_addr"
rejected_code: 503
```
3. ApisixGlobalRule
Added a new CRD resource, representing ApisixGlobalRule, which corresponds
to the concept of APISIX global rules, is easy to understand, and can evolve
with APISIX global rules.
```
apiVersion: apisix.apache.org/v2
kind: ApisixGlobalRule
metadata:
name: apisix-plugins-cluster
spec:
plugins:
- name: prometheus
enable: true
- name: limit-count
enable: true
config:
time_window: 60
policy: "local"
count: 2
key: "remote_addr"
rejected_code: 50
```
--
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]