-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: change v2alpha1 SubNamespace status to kstatus-compatible subresource #96
Conversation
If you want, I can split this PR:
|
I have now created a dedicated PR for (just) introducing the new API version: #101 |
0256ce4
to
ca986bc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 #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 #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