diff --git a/api/v1alpha1/gitrepository_types.go b/api/v1alpha1/gitrepository_types.go index 09c72f36..67283916 100644 --- a/api/v1alpha1/gitrepository_types.go +++ b/api/v1alpha1/gitrepository_types.go @@ -43,6 +43,15 @@ type GitRepositorySpec struct { type GitRepositoryStatus struct { // +optional Conditions []RepositoryCondition `json:"conditions,omitempty"` + + // LastUpdateTime is the timestamp corresponding to the last status + // change of this repository. + // +optional + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` + + // Path to the artifacts of the last repository sync. + // +optional + Artifacts string `json:"artifacts,omitempty"` } // +kubebuilder:object:root=true diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 0aae9134..7fc755e3 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -109,6 +109,10 @@ func (in *GitRepositoryStatus) DeepCopyInto(out *GitRepositoryStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.LastUpdateTime != nil { + in, out := &in.LastUpdateTime, &out.LastUpdateTime + *out = (*in).DeepCopy() + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepositoryStatus. diff --git a/config/crd/bases/sourcer.fluxcd.io_gitrepositories.yaml b/config/crd/bases/sourcer.fluxcd.io_gitrepositories.yaml index 5ec9e41b..937d4b80 100644 --- a/config/crd/bases/sourcer.fluxcd.io_gitrepositories.yaml +++ b/config/crd/bases/sourcer.fluxcd.io_gitrepositories.yaml @@ -69,6 +69,9 @@ spec: status: description: GitRepositoryStatus defines the observed state of GitRepository properties: + artifacts: + description: Path to the artifacts of the last repository sync. + type: string conditions: items: description: RepositoryCondition contains condition information for @@ -99,6 +102,11 @@ spec: - type type: object type: array + lastUpdateTime: + description: LastUpdateTime is the timestamp corresponding to the last + status change of this repository. + format: date-time + type: string type: object type: object version: v1alpha1