Skip to content

Commit f133b50

Browse files
committed
api: Add reconciliation history to Kustomization status
Signed-off-by: Stefan Prodan <[email protected]>
1 parent 6b2e5e8 commit f133b50

File tree

4 files changed

+78
-0
lines changed

4 files changed

+78
-0
lines changed

api/v1/kustomization_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,11 @@ type KustomizationStatus struct {
297297
// have been successfully applied.
298298
// +optional
299299
Inventory *ResourceInventory `json:"inventory,omitempty"`
300+
301+
// History contains a set of snapshots of the last reconciliation attempts
302+
// tracking the revision, the state and the duration of each attempt.
303+
// +optional
304+
History meta.History `json:"history,omitempty"`
300305
}
301306

302307
// GetTimeout returns the timeout with default.

api/v1/zz_generated.deepcopy.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,57 @@ spec:
591591
- type
592592
type: object
593593
type: array
594+
history:
595+
description: |-
596+
History contains a set of snapshots of the last reconciliation attempts
597+
tracking the revision, the state and the duration of each attempt.
598+
items:
599+
description: |-
600+
Snapshot represents a point-in-time record of a group of resources reconciliation,
601+
including timing information, status, and a unique digest identifier.
602+
properties:
603+
digest:
604+
description: Digest is the checksum in the format `<algo>:<hex>`
605+
of the resources in this snapshot.
606+
type: string
607+
firstReconciled:
608+
description: FirstReconciled is the time when this revision
609+
was first reconciled to the cluster.
610+
format: date-time
611+
type: string
612+
lastReconciled:
613+
description: LastReconciled is the time when this revision was
614+
last reconciled to the cluster.
615+
format: date-time
616+
type: string
617+
lastReconciledDuration:
618+
description: LastReconciledDuration is time it took to reconcile
619+
the resources in this revision.
620+
type: string
621+
lastReconciledStatus:
622+
description: LastReconciledStatus is the status of the last
623+
reconciliation.
624+
type: string
625+
metadata:
626+
additionalProperties:
627+
type: string
628+
description: Metadata contains additional information about
629+
the snapshot.
630+
type: object
631+
totalReconciliations:
632+
description: TotalReconciliations is the total number of reconciliations
633+
that have occurred for this snapshot.
634+
format: int64
635+
type: integer
636+
required:
637+
- digest
638+
- firstReconciled
639+
- lastReconciled
640+
- lastReconciledDuration
641+
- lastReconciledStatus
642+
- totalReconciliations
643+
type: object
644+
type: array
594645
inventory:
595646
description: |-
596647
Inventory contains the list of Kubernetes resource object references that

docs/api/v1/kustomize.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,21 @@ ResourceInventory
11471147
have been successfully applied.</p>
11481148
</td>
11491149
</tr>
1150+
<tr>
1151+
<td>
1152+
<code>history</code><br>
1153+
<em>
1154+
<a href="https://godoc.org/github.com/fluxcd/pkg/apis/meta#History">
1155+
github.com/fluxcd/pkg/apis/meta.History
1156+
</a>
1157+
</em>
1158+
</td>
1159+
<td>
1160+
<em>(Optional)</em>
1161+
<p>History contains a set of snapshots of the last reconciliation attempts
1162+
tracking the revision, the state and the duration of each attempt.</p>
1163+
</td>
1164+
</tr>
11501165
</tbody>
11511166
</table>
11521167
</div>

0 commit comments

Comments
 (0)