From 462178e0174c86fb674c23b2f1c7be5991ee4ed6 Mon Sep 17 00:00:00 2001 From: Hidde Beydals Date: Fri, 24 Mar 2023 11:47:34 +0100 Subject: [PATCH] api/v1: Remove deprecated `ContentConfigChecksum` Signed-off-by: Hidde Beydals --- api/v1/gitrepository_types.go | 17 +------------ ...rce.toolkit.fluxcd.io_gitrepositories.yaml | 12 +--------- controllers/gitrepository_controller.go | 1 - docs/api/v1/source.md | 24 +------------------ 4 files changed, 3 insertions(+), 51 deletions(-) diff --git a/api/v1/gitrepository_types.go b/api/v1/gitrepository_types.go index 3221927d..4b76560a 100644 --- a/api/v1/gitrepository_types.go +++ b/api/v1/gitrepository_types.go @@ -212,21 +212,6 @@ type GitRepositoryStatus struct { // +optional IncludedArtifacts []*Artifact `json:"includedArtifacts,omitempty"` - // ContentConfigChecksum is a checksum of all the configurations related to - // the content of the source artifact: - // - .spec.ignore - // - .spec.recurseSubmodules - // - .spec.included and the checksum of the included artifacts - // observed in .status.observedGeneration version of the object. This can - // be used to determine if the content of the included repository has - // changed. - // It has the format of `:`, for example: `sha256:`. - // - // Deprecated: Replaced with explicit fields for observed artifact content - // config in the status. - // +optional - ContentConfigChecksum string `json:"contentConfigChecksum,omitempty"` - // ObservedIgnore is the observed exclusion patterns used for constructing // the source artifact. // +optional @@ -238,7 +223,7 @@ type GitRepositoryStatus struct { ObservedRecurseSubmodules bool `json:"observedRecurseSubmodules,omitempty"` // ObservedInclude is the observed list of GitRepository resources used to - // to produce the current Artifact. + // produce the current Artifact. // +optional ObservedInclude []GitRepositoryInclude `json:"observedInclude,omitempty"` diff --git a/config/crd/bases/source.toolkit.fluxcd.io_gitrepositories.yaml b/config/crd/bases/source.toolkit.fluxcd.io_gitrepositories.yaml index de2477a0..6f9a0bfb 100644 --- a/config/crd/bases/source.toolkit.fluxcd.io_gitrepositories.yaml +++ b/config/crd/bases/source.toolkit.fluxcd.io_gitrepositories.yaml @@ -305,16 +305,6 @@ spec: - type type: object type: array - contentConfigChecksum: - description: "ContentConfigChecksum is a checksum of all the configurations - related to the content of the source artifact: - .spec.ignore - - .spec.recurseSubmodules - .spec.included and the checksum of the - included artifacts observed in .status.observedGeneration version - of the object. This can be used to determine if the content of the - included repository has changed. It has the format of `:`, - for example: `sha256:`. \n Deprecated: Replaced with explicit - fields for observed artifact content config in the status." - type: string includedArtifacts: description: IncludedArtifacts contains a list of the last successfully included Artifacts as instructed by GitRepositorySpec.Include. @@ -379,7 +369,7 @@ spec: type: string observedInclude: description: ObservedInclude is the observed list of GitRepository - resources used to to produce the current Artifact. + resources used to produce the current Artifact. items: description: GitRepositoryInclude specifies a local reference to a GitRepository which Artifact (sub-)contents must be included, diff --git a/controllers/gitrepository_controller.go b/controllers/gitrepository_controller.go index aafd51b7..e2e74b04 100644 --- a/controllers/gitrepository_controller.go +++ b/controllers/gitrepository_controller.go @@ -696,7 +696,6 @@ func (r *GitRepositoryReconciler) reconcileArtifact(ctx context.Context, sp *pat // Record the observations on the object. obj.Status.Artifact = artifact.DeepCopy() obj.Status.IncludedArtifacts = *includes - obj.Status.ContentConfigChecksum = "" // To be removed in the next API version. obj.Status.ObservedIgnore = obj.Spec.Ignore obj.Status.ObservedRecurseSubmodules = obj.Spec.RecurseSubmodules obj.Status.ObservedInclude = obj.Spec.Include diff --git a/docs/api/v1/source.md b/docs/api/v1/source.md index 77e2f5e4..64d12846 100644 --- a/docs/api/v1/source.md +++ b/docs/api/v1/source.md @@ -768,28 +768,6 @@ Artifacts as instructed by GitRepositorySpec.Include.

-contentConfigChecksum
- -string - - - -(Optional) -

ContentConfigChecksum is a checksum of all the configurations related to -the content of the source artifact: -- .spec.ignore -- .spec.recurseSubmodules -- .spec.included and the checksum of the included artifacts -observed in .status.observedGeneration version of the object. This can -be used to determine if the content of the included repository has -changed. -It has the format of <algo>:<checksum>, for example: sha256:<checksum>.

-

Deprecated: Replaced with explicit fields for observed artifact content -config in the status.

- - - - observedIgnore
string @@ -826,7 +804,7 @@ configuration used to produce the current Artifact.

(Optional)

ObservedInclude is the observed list of GitRepository resources used to -to produce the current Artifact.

+produce the current Artifact.