I have created a CRD in my Kubernetes environment. The CRD has a corresponding operator. The operator will update the CRD's field .status.serviceState
for the users to know the current state of the underlying service. The value of the field .status.serviceState
could be one of "PENDING", "READY", "ERROR".
I wonder if there's a way to automatically initialize the field .status.serviceState
to be "PENDING" when the CRD is created. Although I can do the initialization in the operator, I'm worried that user might still see the field uninitialized when there's a delay of the operator.
Any suggestion is appreciated.