You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change force-adoption annotation to adoption-policy
This change will allow us to support an `adopt-or-create` policy
in the future, where the controller will create the resource when
the resource does not exist and can't be adopted.
Before we support `adopt-or-create` we need a solution in code-gen
where we change how we handle the `PopulateResourceFromAnnotation`
which currently only allows the population of fields that are
required for a readOne operation, and they happen to be all scalar
fields (besides ARN, but we have a way of handling that), but the
required fields for create would need to be sometimes structs,
and this would require users to provide values in form of maps
eg.
Creating an EKS cluster requires a ResourceVPCConfig, which is a
struct that contains subnetIDs etc.
We can have a couple of ways to address this.
1. Accept these values in the spec, and return terminal error when
we attempt a create and the create required fields are not provided
2. Accept these values in the `adoption-fields` annotation. This would
need a code-gen change to allow reading from structs and assigning
fields. but it would also make the annotation easy to make mistakes
with when using yaml
0 commit comments