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
34 stars 5 forks source link

chore: generate applyconfigurations for APIs (SSA) #106

Closed erikgb closed 8 months ago

erikgb commented 8 months ago

This PR adds generation of applyconfigurations to facilitate type-safe SSA for custom resources. I have made the generated types internal for now, and only for the newer version of our API. The upstream generator is built for Kubernetes, requiring minor tweaks to the project layout.

I plan to migrate the SubNamespace controller to SSA when introducing the new API version (v2alpha1).

Please take a look and tell me what you think! I'll be happy to reduce the number of changes in this PR.

CC @zoetrope @ymmt2005

zoetrope commented 8 months ago

@erikgb I think introducing SSA is a great idea. However, when we update SubNamespace, we only update the status. Do you think there is an opportunity to use the generated ApplyConfiguration?

erikgb commented 8 months ago

Do you think there is an opportunity to use the generated ApplyConfiguration?

Oh yes, that is my plan in the next PR.