kubernetes-sigs/cluster-api-provider-gcp

Replace slice of pointers with slice of objects

fiunchinho opened this issue · 1 comments

/kind feature

Describe the solution you'd like
[A clear and concise description of what you want to happen.]

I wanted to add a new field to our SubnetSpec type but conversion functions generated by conversion-gen are wrongly generated. Apparently, this is a known issue described here kubernetes/kubernetes#98380. The problem only occurs when dealing with slices of pointers, which is the case for our Subnets type, which is defined as type Subnets []*SubnetSpec.

The solution on other CAPI projects have been to stop using slices of pointers, and replacing them with slices of regular structs. We should probably do the same change.

We did something similar in CAPA for the same reasons:

kubernetes-sigs/cluster-api-provider-aws#2495