Repository navigation
feat(site): named value presets in the site profile - #57
Merged
Merged
Conversation
A site profile may list presets: named chart values, each with an optional description, that a deploy can pick one of. The console merges the picked preset into the form layer; swissd stores and serves them and composes nothing from them. The field is needed because the profile is parsed with known fields only.
3 tasks done
huskcass
reviewed
Nov 10, 2026
huskcass
left a comment
Collaborator
There was a problem hiding this comment.
No blockers. Two-field struct plus parse tests, CI green; the round-trip test covers the form-mode save path.
Design check: nothing speculative. Preset is the minimum needed because site.Parse is known-fields-only, and swissd composes nothing from it. Nothing to cut.
Low: description is optional and values is unvalidated by design; a typo'd chart key will only surface when the console applies it. Acceptable given the stated intent.
Verdict: fine to merge. The deploy-swissd-first rollout note in the description matters.
— Review Golden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A site profile can now list
presets: named chart values a deploy may pick one of.swissd only parses, stores and serves them, as
presetsin/api/profile. The console merges the picked preset into the form layer, so compose and apply are unchanged. The profile struct needs the field becausesite.Parsetakes known fields only: without it, a profile withpresetsfails to parse.Rollout: deploy this swissd before adding
presetsto a site profile. An older swissd refuses the whole profile.Console side: modelsphere/console#127 (the picker on deploy, and editing the release's affinity and tolerations on upgrade).
Refs modelsphere/modelsphere#57 (item 3, storage-network placement).
Testing
TestPresetsRoundTrip: parses a preset, then marshals the profile and parses it again unchanged, which is the path a form-mode save takes.TestPresetValuesMustBeAMap: a preset whosevaluesis a list doesn't parse.go test ./...passes andgofmt -lis empty.