Repository navigation
Conversation
Accept complete userValues documents while retaining upgrade identity checks, autoscale and experiment system layers. Advertise support through the cluster capability and keep legacy request behavior.
There was a problem hiding this comment.
Design blocker: userValues replacement clears both saved form and edit settings. A later YAML save can silently discard settings previously entered in the web form simply because they are omitted from the YAML. Users expect those form settings to remain effective, with YAML as an override layer—not replacement of all user configuration. The existing UI already supports changing values; resetting overrides to inherit defaults does not justify this broader configuration ownership/UI contract change. Swiss should simplify while preserving existing features and UI expectations, with added complexity justified by a concrete unmet need.
Other findings at 9a0cd9e:
- Medium:
autoscaleOnnow reads stored edits. Existing releases can start or stop autoscaling after the Swiss upgrade without a redeploy; document the upgrade impact. - Low: the
scaler.enabled/replicaCountguard misses scaler settings inherited from catalog/site. - Low: on install,
userValues.serviceIdmust equal the release name unless top-levelserviceIdis also supplied. - Low: the retained
canary-systemlayer has no removal path.
Verdict: Blocked on the configuration ownership/UI contract change.
— Review Golden
What this PR does and why
A configuration editor cannot clear an upgrade setting through the legacy overrides API: omitted keys are merged back from the running form. Recomposing without
fromReleasealso loses the live autoscale layer. Add an explicituserValuesdocument so clients can replace all user settings through normal upgrade composition.GET /api/cluster→capabilities.userValues.userValuesin plan and dry-run composition. An empty mapping clears retained form/edit settings; omitteduserValueskeeps legacy behavior.The complete document uses the existing edit layer. Authentication, authorization and diff/apply revision checks use the existing endpoints and policies.
Related work
Supports the unified deployment editor in modelsphere/console#81, related to modelsphere/console#66.
Design and API contract:
docs/design/user-values.md,docs/architecture.md,docs/openapi.yaml.How it was tested
go vet ./...passed.go test ./...passed, including Helm chart tests with an isolated empty kubeconfig.git diff --checkpassed.These are local tests using fake cluster data and stub chart reads. Live model deployment and interruption/recovery remain release acceptance checks.
Notes for reviewers
Start with
user_values.goanduser_values_test.go, thenupgrade.goand the layer input ininternal/compose/compose.go. Request structs and upgrade helpers were extracted fromdeploy.goto keep that file below 1000 lines.The frontend must use the advertised capability and be released after this API is available.
Release note