-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate singleton lists as embedded objects #387
Commits on May 7, 2024
-
Generate singleton lists as embedded objects
- Terraform configuration blocks, even if they have a MaxItems constraint of 1, are (almost) always generated as lists. We now generate the lists with a MaxItems constraint of 1 as embedded objects in our MR APIs. - This also helps when updating or patching via SSA the (previously list) objects. The merging strategy implemented by SSA requires configuration for associative lists and converting the singleton lists into embedded objects removes the configuration need. - A schema traverser is introduced, which can decouple the Terraform schema traversal logic from the actions (such as code generation, inspection, or singleton-list-to-embedded-object conversion) taken while traversing the schema. Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7e87a7f - Browse repository at this point
Copy the full SHA 7e87a7fView commit details -
Make singleton-list-to-embedded-object API conversions optional
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fb97ee5 - Browse repository at this point
Copy the full SHA fb97ee5View commit details -
Add a config.Resource configuration option to be able to mark
the generated CRD API version as the storage version. Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 668de34 - Browse repository at this point
Copy the full SHA 668de34View commit details -
Add conversion.singletonConverter conversion function for CRD API con…
…versions between singleton list & embedded object API versions. - Export conversion.Convert to be reused in embedded singleton list webhook API conversions. Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9e917b3 - Browse repository at this point
Copy the full SHA 9e917b3View commit details -
Add config.Resource.crd{Storage,Hub}Version to be able to configure
the storage & hub API versions independently. - The default values for both of the storage & hub versions is the version being generated, i.e., Resource.Version. - Replace pipeline.ConversionHubGenerator & pipeline.ConversionSpokeGenerator with a common pipeline.ConversionNodeGenerator implementation - Now the hub generator can also inspect the generated files to regenerate the hub versions according to the latest resource configuration and we have removed the assumption that the hub version is always the latest version generated. - Fix duplicated GKVs issue in zz_register.go. Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8031da8 - Browse repository at this point
Copy the full SHA 8031da8View commit details -
Fix the error messages in the template implementations of conversion.…
…Converter Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 914df98 - Browse repository at this point
Copy the full SHA 914df98View commit details -
Add conversion.identityConversion API converter and allow excluding f…
…ield paths when the conversion.RoundTrip copies the fields, from src to dst, with the same name. Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a87bc73 - Browse repository at this point
Copy the full SHA a87bc73View commit details -
Fix slice value length assertion in conversion.Convert
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 136fabd - Browse repository at this point
Copy the full SHA 136fabdView commit details -
Initialize config.Resource.OverrideFieldNames with an empty map
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5a6fd95 - Browse repository at this point
Copy the full SHA 5a6fd95View commit details -
Fix connection details state value map conversion
- Fix runtime conversion for expanded field paths of length greater than 1. Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cf00700 - Browse repository at this point
Copy the full SHA cf00700View commit details -
Call hub & spoke generation pipelines after the CRD generation pipeline
- Prevent execution of these pipelines multiple times for each available versions of an API group. - Improve conversion.RoundTrip paved conversion error message Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e82d624 - Browse repository at this point
Copy the full SHA e82d624View commit details -
Add unit tests for runtime API conversions
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 26df74c - Browse repository at this point
Copy the full SHA 26df74cView commit details -
Add tests for config.SingletonListEmbedder
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 44c139e - Browse repository at this point
Copy the full SHA 44c139eView commit details