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.
Description
This change implements recipe support for the dynamic RP. With this feature, a user-defined-type can declare the SupportsRecipes capability, and then it will be processed by the recipe engine.
The main change here is to the core datamodel interfaces used by our shared controllers. These interfaces have some problematic definitions that rely on returning pointers to go-structs so they can be mutated and saved to the database. This general approach does not work for UDT, or any other design besides the portable resources.
To understand this problem in more detail, consider that ".properties.status" is user-defined for a UDT. The existing interfaces assume that all resources have the same go struct at ".properties.status". Because UDT is extensible, we cannot write a single go-struct that captures all possible status values, but that's required by the current interfaces. Clearly we need something more flexible.
I took the approach of making minimal changes in this PR, but we should improve the design longer-term.
Type of change
Part of: #6688
Contributor checklist
Please verify that the PR meets the following requirements, where applicable: