feat(core): add ingress server mode #305
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add server mode to the ADC that exposes the HTTP API, which will help the ingress controller reduce launch and compile overhead.
This should not be used by any internal or external scenario other than a non-ingress controller unless you fully understand the ADC and know what you are doing.
It accepts the following request formats:
PUT /sync
Start it with
adc server
.Please pay special attention to its access control. Right now, this API does not have any additional authentication or permission control mechanisms, so it should not be called from anywhere but the local host.
Now, this server always listens on
127.0.0.1
instead of0.0.0.0
. In the future, we may add security mechanisms such as mTLS, etc., which is up for discussion.Since the main use of this feature is for the ingress controller, it is expected that we can simply implement mTLS through components such as cert-manager, but mechanisms such as API key or basic auth are also possible.
Checklist