Writing to the Status Subresource
This section covers updating the CR status in your operator code.
If you're building an operator in Go (using the SDK) or using some other language or framework, you'll need to make certain that you're updating the Status field of the CR with relevant info regarding the running state of the Custom Resource. When certifying your operator, the metadata scan will run the
operator-sdk scorecardtest against your metadata bundle. This test currently only checks that something (can't be a null value) gets written to the
statusfield of the CR by the operator before the default 60 second timeout of the
operator-sdk scorecardtest. So, if the operator takes longer than 60s to write the current status to the CR
statusfield, then it will fail the scorecard and thus the metadata scan. To populate the status, the operator must write to the "/status" API endpoint of the CR, since updates posted to the API endpoint of the CR itself will ignore changes to the status field. Please note that this isn't a developer guide, so we don't go into code examples here, but the topic is covered in depth by both the upstream Kubernetes Documentation and the Operator SDK Documentation.