bzp2010 opened a new pull request, #12179:
URL: https://github.com/apache/apisix/pull/12179

   ### Description
   
   This PR aims to add an Admin API specialized for Standalone mode to allow 
users to flush in-memory configurations through them.
   
   The user can pass in the configuration as JSON or YAML via HTTP PUT and it 
will:
   
   1. Decode input
   2. Check each item in the input against the resource's JSON schema
   3. Broadcast them to every worker
   4. Load them, and APISIX takes effect.
   
   This would make the stateless mode even more stateless, and it would no 
longer even depend on the file system. This will help our Ingress Controller 
use case.
   
   In addition to the UPDATE API, there is also a GET API for dumping 
configurations, which will return the current configuration version and 
configuration contents.
   However, the configuration content will be a deep copy replica of the input 
content, because APISIX will add internal data to the configuration, and since 
Lua passes table by reference, they will make it impossible to encode the data 
again. I.e., the data will be exported without any APISIX internal details, 
just to help you check what the current configuration is.
   
   #### Scope
   
   The scope of the API is all workers of the current APISIX instance, not the 
entire APISIX cluster. You need to call them on each instance to make them 
effective on the entire cluster.
   
   The configuration takes effect in its entirety, so new commits will 
overwrite the old configuration in its entirety; there is no diff mechanism.
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [x] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (If not, 
please discuss on the [APISIX mailing 
list](https://github.com/apache/apisix/tree/master#community) first)
   
   <!--
   
   Note
   
   1. Mark the PR as draft until it's ready to be reviewed.
   6. Always add/update tests for any changes unless you have a good reason.
   7. Always update the documentation to reflect the changes made in the PR.
   8. Make a new commit to resolve conversations instead of `push -f`.
   9. To resolve merge conflicts, merge master instead of rebasing.
   10. Use "request review" to notify the reviewer after making changes.
   11. Only a reviewer can mark a conversation as resolved.
   
   -->
   


-- 
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-unsubscr...@apisix.apache.org

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

Reply via email to