[backport v2.10.7] Preserve valid user-supplied chart values in rke2 form #14323
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.
This is an automated request to port PR #14261 by @rak-phillip
fixes #14074
Original PR body:
Summary
This adds a wider range of valid charts to be applied to user-supplied chart values; these additional charts will prevent these values from being removed from user-supplied yaml if they match.
Fixes #12002
Occurred changes and/or fixed issues
Technical notes summary
The initial implementation of
applyChartValues()
only takes into account addons, but that doesn't appear to be the correct approach for this method because there's a wider range of potential valid charts available.I don't think that it makes sense for the form to pave over user values without notifying them of such a change - this is the root cause of the issue. A better approach would be to parse the user-supplied charts and notify the user of any potential issues, leaving the responsibility the the user to resolve any problems. Ultimately, making such a change in behavior is outside of the scope of this issue, but I think patterns like these can be helpful in future development.
Areas or cases that should be tested
The associated issue has sufficient reproduction steps.
Areas which could experience regressions
This is purely additive. This could cause problems if any of these rke2 charts are not intended to be in the rkeconfig charts.
Screenshot/Video
NA
Checklist