Adding Database CRD to Glue Controller - #16
Conversation
|
Hi @JonathanGraniero. Thanks for your PR. I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
a-hilaly
left a comment
There was a problem hiding this comment.
Thanks a lot @JonathanGraniero !
I left a few comments in line.
|
/test all |
michaelhtm
left a comment
There was a problem hiding this comment.
Great work @JonathanGraniero 💯
left a few comments below
/ok-to-test
| ko := desired.ko.DeepCopy() | ||
|
|
There was a problem hiding this comment.
nit: should we set the Database ARN here?
| Name: | ||
| is_primary_key: true | ||
| from: | ||
| operation: GetDatabase | ||
| path: Name |
There was a problem hiding this comment.
this should come from DatabaseInput once unwrapped..
something like this but for input
| // not sure how to determine at this level of abstraction. Probably | ||
| // something the SDK/runtime should handle. For now, we'll just use | ||
| // the `aws` partition. | ||
| return fmt.Sprintf("arn:aws:glue:%s:%s:database/%s", *database.Status.ACKResourceMetadata.Region, *database.Status.ACKResourceMetadata.OwnerAccountID, *database.Spec.Name) |
There was a problem hiding this comment.
nit: should we nil check any of these>
|
Appreciate the quick responses here! I have done all of the updates from both sets of review comments, just doing testing one more time to make sure everything looks good to go. Apologies for the last one failing codegen, I actually was pushing up to test everything on my other computer and forgot to make it a feature branch 😓 |
|
I think I covered everything including the nits now! Let me know what you think. |
| Name: | ||
| is_primary_key: true | ||
| from: | ||
| operation: GetDatabase | ||
| path: Database.Name |
There was a problem hiding this comment.
can we mark this as required?
If the input_wrapper_field works we won't need to,
if not, it might be best to mark this as required here
|
|
||
| Regex Pattern: `^[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*$` | ||
| type: string | ||
| createTableDefaultPermissions: |
There was a problem hiding this comment.
This is what the API calls it so i'm just changing it to be tableDefaultPermissions which is captured in the gen now
3a62103 to
272a833
Compare
|
/retest |
|
@michaelhtm / @a-hilaly So I have been trying to address this codegen failure. If you look at my past 2 commits, in my current commit, I'm getting (this is just a snippet) Where it's saying that it's not matching because of when it's generating these comments the list util is making a Am I doing something wrong here? |
|
/test glue-verify-code-gen |
|
Hi, just checking in on this one. Is it still actively being worked on, or blocked on something? We have a use case waiting on this and would be happy to help move it forward if useful. Thanks for the work here! |
7d977f2 to
f6c9ebd
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: JonathanGraniero The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
f6c9ebd to
d77520b
Compare
d77520b to
7d86d5f
Compare
7d86d5f to
2b646a2
Compare
|
/label release/minor |
| // TODO(a-hilaly): I know there could be other partitions, but I'm | ||
| // not sure how to determine at this level of abstraction. Probably | ||
| // something the SDK/runtime should handle. For now, we'll just use | ||
| // the `aws` partition. |
There was a problem hiding this comment.
ACK resources now populate a Status.ACKResourceMetadata.Partition that could be used to address this.
| ) (*svcsdk.CreateDatabaseInput, error) { | ||
| res := &svcsdk.CreateDatabaseInput{} | ||
|
|
||
| fw := &svcsdktypes.DatabaseInput{} |
There was a problem hiding this comment.
CreateDatabase does support setting the initial tags for the resource. Should set tags here instead of deferring to the update path to better support tag based IAM policies.
|
|
||
| These key-value pairs define parameters and properties of the database. | ||
| type: object | ||
| tableDefaultPermissions: |
There was a problem hiding this comment.
It looks like the Glue service can set a default value for this field post-create which results in repeated spurious deltas in later reconcile loops. Since the CreateDatabase response is empty we'll likely want to mark the field with the below field config to allow for the controller to pickup any default value when it is not initially set.
late_initialize:
skip_incomplete_check: {}
Issue #, if available:
No current issue, helping with some missing features
Description of changes:
Adding support for Database CRD. I figured that was probably the best place to start since we need Database and Tables at the minimum for supporting Catalog.
I used #4 as a guide for following the pattern of adding new CRDs but let me know if there is anything different I should do.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.