Skip to content

Conversation

stefanprodan
Copy link
Member

With .status.history the kustomize-controller tracks the reconciliation attempts over time, providing insights
into the Kustomization's behavior which can be used for audit, anomaly detection and debugging purposes.

The history is stored as a list of snapshots, ordered by last reconciliation time. Each snapshot contains:

  • digest: A SHA256 digest of the Kubernetes manifests being applied on the cluster
  • firstReconciled: The timestamp when this particular configuration was first reconciled
  • lastReconciled: The timestamp of the most recent reconciliation attempt for this configuration
  • lastReconciledDuration: How long the most recent reconciliation attempt took
  • lastReconciledStatus: The status of the most recent reconciliation (e.g., ReconciliationSucceeded, HealthCheckFailed, ReconciliationFailed)
  • totalReconciliations: The total number of reconciliations for this configuration
  • metadata: Additional information about the reconciliation, including the source revision and the source origin revision if available

The kustomize-controller deduplicates entries based on the digest and status.
The history is automatically truncated to keep only the 5 most recent entries.

Example:

status:
  history:
    - digest: sha256:43ad78c94b2655429d84f21488f29d7cca9cd45b7f54d2b27e16bbec8eff9228
      firstReconciled: "2025-08-15T10:11:00Z"
      lastReconciled: "2025-08-15T11:12:00Z"
      lastReconciledDuration: 2.818583s
      lastReconciledStatus: ReconciliationSucceeded
      totalReconciliations: 2
      metadata:
        revision: "v1.0.1@sha1:450796ddb2ab6724ee1cc32a4be56da032d1cca0"
    - digest: sha256:ec8dbfe61777b65001190260cf873ffe454451bd2e464bd6f9a154cffcdcd7e5
      firstReconciled: "2025-07-14T13:10:00Z"
      lastReconciled: "2025-08-15T10:00:00Z"
      lastReconciledDuration: 49.813292s
      lastReconciledStatus: HealthCheckFailed
      totalReconciliations: 120
      metadata:
        revision: "v1.0.0@sha1:67e2c98a60dc92283531412a9e604dd4bae005a9"

@stefanprodan stefanprodan added area/ux In pursuit of a delightful user experience area/api API related issues and pull requests labels Aug 31, 2025
Copy link
Member

@matheuscscp matheuscscp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@stefanprodan stefanprodan merged commit ca604f3 into main Sep 1, 2025
5 checks passed
@stefanprodan stefanprodan deleted the status-history branch September 1, 2025 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api API related issues and pull requests area/ux In pursuit of a delightful user experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants