Skip to content

Commit a901233

Browse files
authored
Merge pull request #724 from fluxcd/gitrepo-rec-fixes-2
GitRepositoryReconciler no-op clone improvements
2 parents 841ed7a + 581695b commit a901233

18 files changed

+1320
-454
lines changed

api/v1beta2/gitrepository_types.go

+12
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,18 @@ type GitRepositoryStatus struct {
211211
// +optional
212212
IncludedArtifacts []*Artifact `json:"includedArtifacts,omitempty"`
213213

214+
// ContentConfigChecksum is a checksum of all the configurations related to
215+
// the content of the source artifact:
216+
// - .spec.ignore
217+
// - .spec.recurseSubmodules
218+
// - .spec.included and the checksum of the included artifacts
219+
// observed in .status.observedGeneration version of the object. This can
220+
// be used to determine if the content of the included repository has
221+
// changed.
222+
// It has the format of `<algo>:<checksum>`, for example: `sha256:<checksum>`.
223+
// +optional
224+
ContentConfigChecksum string `json:"contentConfigChecksum,omitempty"`
225+
214226
meta.ReconcileRequestStatus `json:",inline"`
215227
}
216228

config/crd/bases/source.toolkit.fluxcd.io_gitrepositories.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,15 @@ spec:
653653
- type
654654
type: object
655655
type: array
656+
contentConfigChecksum:
657+
description: 'ContentConfigChecksum is a checksum of all the configurations
658+
related to the content of the source artifact: - .spec.ignore -
659+
.spec.recurseSubmodules - .spec.included and the checksum of the
660+
included artifacts observed in .status.observedGeneration version
661+
of the object. This can be used to determine if the content of the
662+
included repository has changed. It has the format of `<algo>:<checksum>`,
663+
for example: `sha256:<checksum>`.'
664+
type: string
656665
includedArtifacts:
657666
description: IncludedArtifacts contains a list of the last successfully
658667
included Artifacts as instructed by GitRepositorySpec.Include.

controllers/gitrepository_controller.go

+307-140
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)