Update status from Webhook

development

#1

Hi,

I am creating a mutating admission webhook for a resource. Is there a way to update the status of a resource from a mutating webhook?

I hosted a webhook server in a pod running on the cluster. Then I updated couple of fields in the spec and set a condition in the Status and returned back the patch httpresponse. However when I query the object using kubectl I see the spec fields got set, but Status object is not there.

I inspected the HTTPRequest that the webhook received and it is POST request on the Resource and the documentation says that to update status we need to update the subresource “status”. So was wondering if it is by design and technically not possible to status from webhook or is there some way to do this?

Any pointers will help.