Closed erikgb closed 8 months ago
If you want, I can split this PR:
I have now created a dedicated PR for (just) introducing the new API version: https://github.com/cybozu-go/accurate/pull/101
@zoetrope @ymmt2005 I think this PR is ready for a round of review now. Please let me know what you think!
Thank you for the excellent pull request! I believe the PR looks great.
I wasn't familiar with the "kstatus" library before, but it looks interesting. In situations like this, I often use apimachinery's Condition.
Thanks for the nice feedback, @zoetrope! We are also heavy users of apimachinery's Condition in our operators not yet migrated to SSA. I think the utilities in this package are mostly useful with CSA. But we will get to that in the follow-up PRs. 😉
Is there anything more needed to get this merged?
A new and currently unserved API version was added with https://github.com/cybozu-go/accurate/pull/101. This PR makes
status
in the new version a subresource compatible with kstatus.I have also added conversion code with unit tests, so you can get an idea of how I plan to move forward after this is (hopefully) merged. The next steps will probably be:
v2alpha1
served, migrate controller to reconcilev2alpha1
and makev2alpha1
the storage version.I would prefer using SSA when updating
status
from controller in the latter step. Please let me know what you think! This is probably best done by generating apply-configurations in a separate pre-PR.Relates to https://github.com/cybozu-go/accurate/issues/85
NOTE: The proposed fuzz conversion tests added in this PR are highly inspired by the equivalent test setup in https://github.com/kubernetes-sigs/cluster-api. Example: https://github.com/kubernetes-sigs/cluster-api/blob/main/api/v1alpha4/conversion_test.go