[Proposal] Immutable Gateway v4.0.0 - File-Based, GitOps-Native Gateway Configuration #1671
Replies: 2 comments 2 replies
-
|
Looks good. In the case of environment variables, users will have to manage a flat hierarchy here. In the immutable gateway v3.2.0, we had this format - https://mg.docs.wso2.com/en/latest/how-tos/endpoints/overriding-endpoint-information/overriding-endpoints-for-imported-apis/#overriding-endpoints-at-runtime. Basically API_ID has used as a prefix. Should we look for something like this? I think we can use the API handle here. |
Beta Was this translation helpful? Give feedback.
-
|
A couple of implementation constraints worth calling out:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
[immutable_gateway]config section inconfig.tomlwithenabledandartifacts_dirsettings$env{key}syntax for resolving secrets from environment variables, complementing the existing$secret{key}syntaxgateway.api-platform.wso2.com/artifact-idlabel in resource metadata, enabling API Key functionality with the Control Plane and label-based selection in KubernetesMotivation
Proposal
[immutable_gateway]toconfig.tomlthat enables immutable mode and specifies the artifacts directorykind, and applies them via the service layer in dependency order (independent resources first, dependent resources second); if any artifact fails validation, the gateway will not start405 Method Not Allowedfor all mutating operations when immutable mode is active$env{key}syntax instead of the existing$secret{key}mechanism, since there is no runtime API to create secretsAPI Changes
No new API endpoints are introduced. The existing management API endpoints have modified behavior when immutable mode is enabled:
All of the following endpoints return
405 Method Not Allowedfor POST, PUT, and DELETE when immutable mode is enabled:POST/PUT/DELETE /rest-apisand/rest-apis/{id}POST/PUT/DELETE /llm-providersand/llm-providers/{id}POST/PUT/DELETE /llm-proxiesand/llm-proxies/{id}POST/PUT/DELETE /mcp-proxiesand/mcp-proxies/{id}POST/PUT/DELETE /subscription-plansPOST/PUT/DELETE /subscriptionsPOST/PUT/DELETE /secretsGET endpoints remain fully functional for observability and debugging.
Configuration Changes
The corresponding environment variable overrides would follow the existing convention:
Examples
Artifact YAML format (uses the Kubernetes-style resource format already supported by the gateway):
Dockerfile for building an immutable gateway image:
Directory structure (flexible -- the controller walks all subdirectories):
Drawbacks
$env{key}for secrets, meaning all sensitive values must be injected as environment variables. This may not meet the security requirements of all organizations (environment variables can appear in process listings and crash dumps)ap gateway image buildsupport is planned for a future iteration)Beta Was this translation helpful? Give feedback.
All reactions