-
Notifications
You must be signed in to change notification settings - Fork 674
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
Add status subresource to HTTPProxy #2496
Add status subresource to HTTPProxy #2496
Conversation
Adding as a draft PR so that we can talk about if this is a good idea; I'm pretty sure that it is, and although it's kind of a GA guarantee violation, it should be worthwhile as we do more with status. Importantly, it doesn't change any behaviour about retrieving the status, only about setting it, which only Contour should be doing. I've updated the one place we update HTTPProxy objects' status right now, but anyone else consuming HTTPProxy objects and updating their status would also need to change to using a status update instead of patching the object. I noticed this while doing research for #2495. |
This also limits us to Kubernetes v1.16 which is where |
Ah, thanks for that Steve. Subresources are available in the previous CRD versions though, I think. I will check that out. |
06c8e87
to
bc37cdc
Compare
Codecov Report
@@ Coverage Diff @@
## master #2496 +/- ##
==========================================
+ Coverage 76.61% 76.63% +0.01%
==========================================
Files 68 68
Lines 5513 5513
==========================================
+ Hits 4224 4225 +1
Misses 1192 1192
+ Partials 97 96 -1
Continue to review full report at Codecov.
|
The |
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.
Have a few suggesting, but this seems generally good to me.
c63e271
to
f2ae3f4
Compare
f2ae3f4
to
d153ef6
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.
Looks great, just an error message nit!
d153ef6
to
e12ec1e
Compare
This commit enables the status subresource for HTTPProxy. This means that: - normal HTTPProxy changes that include updates to the `status` stanza will have the status updates dropped - updates to `status` can only be made using requests to the status subresource. Also changes the HTTPProxy status updating to use the status subresource, and adds RBAC for Contour to be able to update it. Having the status subresource enabled is best-practice for CRDs and will be a foundation for further status work. It also means that HTTPProxy objects no longer need to include the `status` stanza to be valid. Refactors the `k8s.UnstructuredConverter` to have FromUnstructured and ToUnstructured methods, and uses ToUnstructured where required. Updates projectcontour#2495 Signed-off-by: Nick Young <ynick@vmware.com>
e12ec1e
to
9a251f1
Compare
This commit enables the status subresource for HTTPProxy.
This means that:
status
stanza will have the status updates droppedstatus
can only be made using requests to the status subresource.Also changes the HTTPProxy status updating to use the status subresource,
and adds RBAC for Contour to be able to update it.
Having the status subresource enabled is best-practice for CRDs and will be a foundation for further status work.
It also means that HTTPProxy objects no longer need to include the
status
stanza to be valid.Updates #2495
Signed-off-by: Nick Young ynick@vmware.com