SAP / clustersecret-operator

Manage Kubernetes secrets at cluster scope
https://sap.github.io/clustersecret-operator/
Apache License 2.0
6 stars 2 forks source link

Ensure new resources are created with non-initial status #41

Open dafe-corporate-sap opened 8 months ago

dafe-corporate-sap commented 8 months ago

Currently, new CROs are created with an initial status. Only after the first reconciliation through the controller, the status will be populated. In the timeframe between creation and first reconciliation, the initial status will make certain observers (such as kstatus) treat the object as 'ready', although it is by far not.

Solution: do some (meaningful) defaulting in the CRD itself; then K8s apiserver will ensure upon creation that the status is not initial. For example, by defaulting status.observedGeneration: -1, with something like

      status:
        default:
          observedGeneration: -1

in the CRD schema specification.

Issue moved from https://github.tools.sap/cs-devops/clustersecret-controller/issues/61