Custom resource status management

    Ansible-based Operators also allow Operator authors to supply custom status values with the k8s_status Ansible module, which is included in the operator_sdk.util collection. This allows the author to update the status from within Ansible with any key-value pair as desired.

    By default, Ansible-based Operators always include the generic Ansible run output as shown above. If you would prefer your application did not update the status with Ansible output, you can track the status manually from your application.

    Tracking custom resource status manually

    Prerequisites

    • Ansible-based Operator project created by using the Operator SDK

    Procedure

    1. Use the Ansible module to update the subresource. For example, to update with key test and value data, operator_sdk.util can be used as shown: