Closed ulucinar closed 2 weeks ago
/test-examples="examples/firehose/v1beta2/deliverystream.yaml"
/test-examples="examples/opensearchserverless/v1beta1/securityconfig.yaml"
/test-examples="examples/eks/v1beta2/nodegroup.yaml"
/test-examples="examples/firehose/v1beta2/deliverystream.yaml"
Description of your changes
Only apply the CRD API conversions for converting between singleton list & embedded object APIs for the already existing resources with the generated singleton list CRD APIs.
When we try to add a new Terraform resource with a singleton list in its schema, currently, we need to do a manual configuration such as the following:
, so that the API converters registered are removed and versioning starts with
v1beta1
instead ofv1beta2
(for such new resources, thev1beta1
version does not already exist).This PR records the names of resources with previous CRD APIs containing (now converted) singleton lists so that the API converters are only registered for them. This makes adding new resources with singleton lists in their Terraform schemas easier by removing the need to do a manual configuration like shown above.
The newly introduced list should mostly be immutable (it records a set of existing resources with a specific condition at a point in time). Bugs may result in exceptions where we may need to update this list. In other words, new resources should normally be never added to this list, doing so will result in an invalid configuration.
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
Via the following uptest runs:
NodeGroup.v1beta2.eks
(thev1beta2
manifest contains a converted embedded object relevant in our context): https://github.com/crossplane-contrib/provider-upjet-aws/actions/runs/9518567085DeliveryStream.v1beta2.firehose
: https://github.com/crossplane-contrib/provider-upjet-aws/actions/runs/9518491580SecurityConfig.v1beta1.opensearchserverless
(contains an embedded field (samlOptions
) represented as a single nested block in the Terraform schema): https://github.com/crossplane-contrib/provider-upjet-aws/actions/runs/9518549846