cybozu-go / accurate

Kubernetes controller for multi-tenancy. It propagates resources between namespaces accurately and allows tenant users to create/delete sub-namespaces.
https://cybozu-go.github.io/accurate/
Apache License 2.0
38 stars 5 forks source link

chore: introduce conversion-gen to generate conversion functions #129

Closed erikgb closed 4 months ago

erikgb commented 4 months ago

Ref. https://github.com/cybozu-go/accurate/pull/128#pullrequestreview-2065690595, it seems like we soon want to add another API version of SubNamespace. To avoid hand-writing error-prone code to convert similar/identical API versions of resources, I think it's time to introduce conversion-gen - the tool used by upstream Kubernetes to generate efficient conversion functions.

Since we dramatically change the status subresource between v1 and v2 of SubNamespace, it does not add significant value right now. But when introducing v2beta1 and/or v2 versions it makes more sense.