mirror of
https://github.com/clastix/kamaji.git
synced 2026-04-15 06:56:47 +00:00
feat: add ObservedGeneration (#1069)
* feat: add ObservedGeneration to all status types Add ObservedGeneration field to DataStoreStatus, KubeconfigGeneratorStatus, and TenantControlPlaneStatus to track which generation the controller has processed. This enables clients and tools like kstatus to determine if the controller has reconciled the latest spec changes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: follow Cluster API pattern for ObservedGeneration Move ObservedGeneration setting for TenantControlPlane from intermediate status updates to the final successful reconciliation completion. This follows Cluster API conventions where ObservedGeneration indicates the controller has fully processed the given generation. Previously, ObservedGeneration was set on every status update during resource processing, which could mislead clients into thinking the spec was fully reconciled when the controller was still mid-reconciliation or had hit a transient error. Now: - DataStore: Sets ObservedGeneration before single status update (simple controller) - KubeconfigGenerator: Sets ObservedGeneration before single status update (simple controller) - TenantControlPlane: Sets ObservedGeneration only after ALL resources processed successfully Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test: verify ObservedGeneration equals Generation after reconciliation Add assertion to e2e test to verify that status.observedGeneration equals metadata.generation after a TenantControlPlane is successfully reconciled. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: regenerate CRDs with ObservedGeneration field Run make crds to regenerate CRDs with the new ObservedGeneration field in status types. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Run make manifests * Run make apidoc * Remove rbac role * Remove webhook manifest --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -27982,6 +27982,15 @@ DataStoreStatus defines the observed state of DataStore.
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr>
|
||||
<td><b>observedGeneration</b></td>
|
||||
<td>integer</td>
|
||||
<td>
|
||||
ObservedGeneration represents the .metadata.generation that was last reconciled.<br/>
|
||||
<br/>
|
||||
<i>Format</i>: int64<br/>
|
||||
</td>
|
||||
<td>false</td>
|
||||
</tr><tr>
|
||||
<td><b>usedBy</b></td>
|
||||
<td>[]string</td>
|
||||
<td>
|
||||
@@ -28365,6 +28374,15 @@ In case of a different value compared to Resources, check the field errors.<br/>
|
||||
Errors is the list of failed kubeconfig generations.<br/>
|
||||
</td>
|
||||
<td>false</td>
|
||||
</tr><tr>
|
||||
<td><b>observedGeneration</b></td>
|
||||
<td>integer</td>
|
||||
<td>
|
||||
ObservedGeneration represents the .metadata.generation that was last reconciled.<br/>
|
||||
<br/>
|
||||
<i>Format</i>: int64<br/>
|
||||
</td>
|
||||
<td>false</td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
|
||||
@@ -42555,6 +42573,15 @@ that are necessary to run a kubernetes control plane<br/>
|
||||
Kubernetes contains information about the reconciliation of the required Kubernetes resources deployed in the admin cluster<br/>
|
||||
</td>
|
||||
<td>false</td>
|
||||
</tr><tr>
|
||||
<td><b>observedGeneration</b></td>
|
||||
<td>integer</td>
|
||||
<td>
|
||||
ObservedGeneration represents the .metadata.generation that was last reconciled.<br/>
|
||||
<br/>
|
||||
<i>Format</i>: int64<br/>
|
||||
</td>
|
||||
<td>false</td>
|
||||
</tr><tr>
|
||||
<td><b><a href="#tenantcontrolplanestatusstorage">storage</a></b></td>
|
||||
<td>object</td>
|
||||
|
||||
Reference in New Issue
Block a user