diff --git a/api/v1/kustomization_types.go b/api/v1/kustomization_types.go index 0852d7d..7d2ec5b 100644 --- a/api/v1/kustomization_types.go +++ b/api/v1/kustomization_types.go @@ -297,6 +297,11 @@ type KustomizationStatus struct { // have been successfully applied. // +optional Inventory *ResourceInventory `json:"inventory,omitempty"` + + // History contains a set of snapshots of the last reconciliation attempts + // tracking the revision, the state and the duration of each attempt. + // +optional + History meta.History `json:"history,omitempty"` } // GetTimeout returns the timeout with default. diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go index 1723bf8..e812275 100644 --- a/api/v1/zz_generated.deepcopy.go +++ b/api/v1/zz_generated.deepcopy.go @@ -260,6 +260,13 @@ func (in *KustomizationStatus) DeepCopyInto(out *KustomizationStatus) { *out = new(ResourceInventory) (*in).DeepCopyInto(*out) } + if in.History != nil { + in, out := &in.History, &out.History + *out = make(meta.History, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizationStatus. diff --git a/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml b/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml index 08e01e5..df75e41 100644 --- a/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml +++ b/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml @@ -591,6 +591,57 @@ spec: - type type: object type: array + history: + description: |- + History contains a set of snapshots of the last reconciliation attempts + tracking the revision, the state and the duration of each attempt. + items: + description: |- + Snapshot represents a point-in-time record of a group of resources reconciliation, + including timing information, status, and a unique digest identifier. + properties: + digest: + description: Digest is the checksum in the format `:` + of the resources in this snapshot. + type: string + firstReconciled: + description: FirstReconciled is the time when this revision + was first reconciled to the cluster. + format: date-time + type: string + lastReconciled: + description: LastReconciled is the time when this revision was + last reconciled to the cluster. + format: date-time + type: string + lastReconciledDuration: + description: LastReconciledDuration is time it took to reconcile + the resources in this revision. + type: string + lastReconciledStatus: + description: LastReconciledStatus is the status of the last + reconciliation. + type: string + metadata: + additionalProperties: + type: string + description: Metadata contains additional information about + the snapshot. + type: object + totalReconciliations: + description: TotalReconciliations is the total number of reconciliations + that have occurred for this snapshot. + format: int64 + type: integer + required: + - digest + - firstReconciled + - lastReconciled + - lastReconciledDuration + - lastReconciledStatus + - totalReconciliations + type: object + type: array inventory: description: |- Inventory contains the list of Kubernetes resource object references that diff --git a/docs/api/v1/kustomize.md b/docs/api/v1/kustomize.md index 70ae861..10fb29a 100644 --- a/docs/api/v1/kustomize.md +++ b/docs/api/v1/kustomize.md @@ -1147,6 +1147,21 @@ ResourceInventory have been successfully applied.

+ + +history
+ + +github.com/fluxcd/pkg/apis/meta.History + + + + +(Optional) +

History contains a set of snapshots of the last reconciliation attempts +tracking the revision, the state and the duration of each attempt.

+ +