This is related to Dynamic Admission Control.
Mutating the status
subresource in mutating admission webhook requires both parent resource and subresource, for eg - Node
and Node/status
present in the webhook i.e.:
...
rules:
- apiGroups:
- ""
apiVersions:
- v1
operations:
- CREATE
- UPDATE
resources:
- nodes
- nodes/status
...
If I try to specify just nodes
in the webhook, the status is not updated (status
can be updated for node, see Advertise Extended Resources for a Node). Whereas if I include both resource and the subresource, the mutation is successful.
I was able to find:
regarding this but, it too does not mention the reason for doing so.
What is the reason to add both parent resource and subresource for modifying the status
subresource?