Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the leveled-configuration model in the README files of Wasm plugins #326

Closed
CH3CHO opened this issue May 11, 2023 · 0 comments
Closed

Comments

@CH3CHO
Copy link
Collaborator

CH3CHO commented May 11, 2023

The old configuration model uses _rules_ field to manage domain-level and route-level configurations. And global configurations are all added to the root of the spec, which brings some trouble to the governing process on the console side.

Old model:

consumers: # Global configuration
- credential: 'admin:123456'
  name: consumer1
- credential: 'guest:abc'
  name: consumer2
_rules_:
  - _match_route_: # Route-level configuration
    - route-a
    - route-b
    allow:
    - consumer1
  - _match_domain_: # Domain-level configuration
    - "*.example.com"
    - test.com
    allow:
    - consumer2

The new model uses separate fields, defaultConfig and matchRules to store configs in different levels.

New model:

defaultConfig: # Global configuration
  consumers: # Global configuration
  - credential: 'admin:123456'
    name: consumer1
  - credential: 'guest:abc'
    name: consumer2
matchRules:
- domain: # Domain-level configuration
  - "*.example.com"
  - test.com
  config:
    allow:
    - consumer1
- ingress: # Route-level configuration
  - route-a
  - route-b
  config:
    allow:
    - consumer2

So all the README files in https://github.com/alibaba/higress/tree/main/plugins need to be updated with the new model.

@CH3CHO CH3CHO closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant