Hi,
TL;DR:I wish to bring
PR#518 to everyone's attention and gather knowledge on when it can be merged and What tests can i perform to validate that allowing nested maps in go types for CRD generation will not cause any issues down the line.
Problem:
During generation of CRD using controller-gen, if go type has nested Map member(s), following error is thrown "map values must be a named type, not *ast.MapType".
As you can see on the PR, AWS and Microsoft Azure both depend on generating CRDs from their go-sdks, which in the end assists k8s customers in interacting with the cloud provider services in k8s native manner.
Solution:
The mentioned
PR#518 allows nested Maps to be supported in controller-gen. Based on the comment feedback on the PR, i created a separate
PR#569 , which allows nested maps only when "allowDangerousTypes" flag is marked as true during CRD generation.
I did receive feedback in SIG meeting on 8/25/2021 to not have this support behind "allowDangerousTypes" flag, hence I am back to requesting feedback on
PR#518 again and requesting validations under which
PR#518 or
PR#569 can be merged to unblock ACK controller generation.
Thank you in advance!
- Vijay