concept

Custom resource validation

The spec describes desired state; status reports observed state. Enable the status subresource so clients can update status through a distinct API endpoint and authorize that operation separately. A normal create or update of the main resource ignores status changes when the status subresource is enabled; status updates do not replace the spec. The controller should report what it actually observed, such as fulfilledQuantity, not simply echo the desired quantity. A successful schema validation says nothing about whether an order was fulfilled.

Formal Syntax & Structure

kubernetes syntaxkubernetes
spec:  quantity: 3status:  fulfilledQuantity: 1  phase: Pending

Working Example

Example Snippetkubernetes
spec:  quantity: 3status:  fulfilledQuantity: 1  phase: Pending
Kubernetes Reference