-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
ec0734c
commit 4d78380
Showing
5 changed files
with
66 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters