Repository navigation
feat(web): pick a site profile preset on deploy; edit the release's affinity and tolerations on upgrade - #127
Open
aceforeverd wants to merge 3 commits into
Open
aceforeverd wants to merge 3 commits into
aceforeverd wants to merge 3 commits into
Conversation
…ffinity and tolerations on upgrade Deploy, in both modules, offers the site profile's presets. The picked one is merged into the form layer the web builds: maps merge, a list keeps both sides' items once, and a value the form sets wins. An upgrade rebuilds the whole form layer: the release's own, with the form's values over it. Every affinity rule in affinity and in each pd.<role>.affinityReplace shows as YAML to edit or remove, and the tolerations come back exactly as deployed, keys no field shows included. A list emptied of rules goes as [] or, where that is not valid, null, since swissd still merges an upgrade over the release's form layer. The site profile pages list the presets.
A Presets section in both modules' profile forms lists each preset with edit and remove; a dialog takes its name, description and values as YAML, and stores it only once the name is set and unique and the values parse to a map.
The preset picker moves next to the tolerations in both modules, and the inferences one uses FieldSelect so its floating label no longer sits on the selected value.
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.
What type of PR is this?
What this PR does and why
Deploy (
modules/swissandmodules/inferences):presets, defaulting to none.Upgrade (both modules): there is no preset concept on upgrade.
affinityand in eachpd.<role>.affinityReplaceshows as a YAML box you can edit, or remove and undo. That includes the GPU product term. Compose stays disabled while a box doesn't parse.tolerationSeconds, and a missing operator read asEqual.Exists.[].Site profile pages (both):
Shortcomings: swissd still merges an upgrade over the release's form layer, so a map key the web leaves out stays. That decides how the last item of a list is removed:
pd.<role>.affinityReplace: null, which the chart reads as inheritnull, since Kubernetes refuses an emptynodeSelectorTerms[]modelsphere/swiss#56 tracks storing the form layer exactly as sent. That issue also covers:
Which issue(s) this PR fixes
Needs modelsphere/swiss#57 (swissd parses
presets).Refs modelsphere/modelsphere#57 (item 3), modelsphere/swiss#56.
How it was tested
formLayer.test.ts:[]andnullcases;tolerationSeconds, and removing every row.profile.test.ts: a preset's row round-trip, its name and values errors, and renaming, adding and removing.Checks
npm run typecheck && npm test && npm run buildinweb/(613 tests)Notes for reviewers
Start with
web/src/modules/swiss/lib/formLayer.tsandaffinity.ts, thenplanRequestinDeploySettings.tsx.Release note