[Spike] Investigate proper/optimal use of Status Conditions and Phase
Summary
We have implemented both Conditions and Phase on the Status object. This means updating those components throughout the reconcile loop, which is not fully complete:
- Consider using more fields and/or a broader voc... (#316 - closed)
- [Controller] Implement "Revision" in CR status ... (#324 - closed)
- Calculate status phase based on status conditions (#380 - closed)
There's a fair amount of logic that's required in the reconcile loop to determine which Phase and Conditions to apply/remove, which gets complicated easily.
After looking into this more, I've found some references that further discuss the implementation of these components:
- https://github.com/kubernetes/kubernetes/issues/7856: Eliminate Phase and simplify Conditions
- https://github.com/kubernetes/community/pull/4521: Update Condition guidance
- https://github.com/kubernetes/kubernetes/issues/2726: Properly set object status
Further reading:
- https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
- https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects
- https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/accessing-the-domain/status-conditions
- https://maelvls.dev/kubernetes-conditions/
This could also be related to #973 (closed) in the sense that updates to the Status object could be triggering new reconcile loops (emphasis on could).
Acceptance criteria
-
Plan regarding Status Conditions and Phase is identified -
Follow-up issue(s) created to implement plan