feat(gateway): add runtime settings file#1920
Conversation
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
🌿 Preview your docs: https://nvidia-preview-pr-1920.docs.buildwithfern.com/openshell |
| proposal_approval_mode = "manual" | ||
| ``` | ||
|
|
||
| Only registered runtime setting keys are accepted. The gateway rejects unknown keys, the reserved `policy` key, values with the wrong TOML type, and invalid enum strings. |
There was a problem hiding this comment.
Question: Where are the registered keys defined? I was expecting an explicit struct that is unmarshalled from TOML. In Go one would add tags to the struct fields that define the toml entries. Is that possible in Rust?
There was a problem hiding this comment.
These are the same keys as defined by the API spec (I'm clarifying the language here). I will check for existing runtime config docs and link to that.
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
|
Label |
Summary
Add a gateway runtime settings file that Kubernetes deployments can mount and update as an authoritative source for selected runtime-level gateway settings without restarting the gateway.
The runtime file is referenced from
gateway.toml, reconciled into the existing gateway-global settings record, and watched for changes. Keys present in the file are file-managed; omitted keys continue to use the stored global value, or remain unset if no stored value exists.Related Issue
N/A - requested directly.
Changes
runtime_config_pathto gateway startup TOML.settings set/delete --globalfor those keys.server.runtimeConfig.*values, a separate runtime ConfigMap template, mounts, chart tests, and a reusableci/values-runtime-config.yamloverlay.Testing
mise run pre-commitcargo test -p openshell-server runtime_config -- --nocapturecargo test -p openshell-server gateway_config_uses_stored_global_settings_when_no_runtime_file_is_configured -- --nocapturemise run helm:testmise run helm:docs:checkhelm lint deploy/helm/openshell -f deploy/helm/openshell/ci/values-runtime-config.yamlhelm template openshell deploy/helm/openshell -n openshell -f deploy/helm/openshell/ci/values-skaffold.yaml -f deploy/helm/openshell/ci/values-runtime-config.yamlmise run helm:k3s:createKUBECONFIG=kubeconfig mise run helm:skaffold:runhelm upgrade openshell deploy/helm/openshell -n openshell --reuse-values -f deploy/helm/openshell/ci/values-runtime-config.yamlopenshell-runtime-configConfigMap andruntime_config_path.runtime config file applied.providers_v2_enabled=trueis exposed viaopenshell settings get --global.openshell settings set --global --key providers_v2_enabled --value falseis rejected while file-managed.ocsf_json_enabledremained DB-backed and mutable.ocsf_json_enabled=trueto the runtime ConfigMap propagated through the watcher without pod restart, advanced settings revision, loggedruntime config file reloaded, and then rejected global updates for that key.Checklist