From b4bc0d4932648369d9ff12c5990983d89778360b Mon Sep 17 00:00:00 2001 From: fluxcdbot Date: Mon, 15 Sep 2025 15:08:28 +0000 Subject: [PATCH] Update toolkit components - source-controller to v1.7.0 https://github.com/fluxcd/source-controller/blob/v1.7.0/CHANGELOG.md Signed-off-by: GitHub Signed-off-by: Matheus Pimenta --- cmd/flux/create_source_git_test.go | 3 ++- cmd/flux/testdata/get/objects.yaml | 3 +++ cmd/flux/testdata/trace/deployment-hr-ocirepo.yaml | 1 + cmd/flux/testdata/trace/deployment.yaml | 2 ++ cmd/flux/testdata/trace/helmrelease-oci.yaml | 1 + cmd/flux/testdata/trace/helmrelease.yaml | 1 + go.mod | 2 +- go.sum | 4 ++-- .../bases/source-controller/kustomization.yaml | 4 ++-- manifests/crds/kustomization.yaml | 2 +- pkg/bootstrap/bootstrap_test.go | 14 +++++++------- 11 files changed, 23 insertions(+), 14 deletions(-) diff --git a/cmd/flux/create_source_git_test.go b/cmd/flux/create_source_git_test.go index 4829f3c4..0fed23e0 100644 --- a/cmd/flux/create_source_git_test.go +++ b/cmd/flux/create_source_git_test.go @@ -204,12 +204,13 @@ func TestCreateSourceGit(t *testing.T) { ObservedGeneration: repo.GetGeneration(), } apimeta.SetStatusCondition(&repo.Status.Conditions, newCondition) - repo.Status.Artifact = &sourcev1.Artifact{ + repo.Status.Artifact = &meta.Artifact{ Path: "some-path", Revision: "v1", LastUpdateTime: metav1.Time{ Time: time.Now(), }, + Digest: "sha256:1234567890abcdef", } repo.Status.ObservedGeneration = repo.GetGeneration() }, diff --git a/cmd/flux/testdata/get/objects.yaml b/cmd/flux/testdata/get/objects.yaml index 42913c20..6898bb33 100644 --- a/cmd/flux/testdata/get/objects.yaml +++ b/cmd/flux/testdata/get/objects.yaml @@ -25,6 +25,7 @@ status: revision: main@sha1:696f056df216eea4f9401adbee0ff744d4df390f path: "example" url: "example" + digest: sha1:696f056df216eea4f9401adbee0ff744d4df390f conditions: - lastTransitionTime: "2021-07-20T00:48:16Z" message: 'Fetched revision: main@sha1:696f056df216eea4f9401adbee0ff744d4df390f' @@ -54,6 +55,7 @@ status: revision: main@sha1:696f056df216eea4f9401adbee0ff744d4df390f path: "example" url: "example" + digest: sha1:696f056df216eea4f9401adbee0ff744d4df390f conditions: - lastTransitionTime: "2021-07-20T00:48:16Z" message: 'Fetched revision: main@sha1:696f056df216eea4f9401adbee0ff744d4df390f' @@ -83,6 +85,7 @@ status: revision: main@sha1:696f056df216eea4f9401adbee0ff744d4df390f path: "example" url: "example" + digest: sha1:696f056df216eea4f9401adbee0ff744d4df390f conditions: - lastTransitionTime: "2021-07-20T00:48:16Z" message: 'Fetched revision: main@sha1:696f056df216eea4f9401adbee0ff744d4df390f' diff --git a/cmd/flux/testdata/trace/deployment-hr-ocirepo.yaml b/cmd/flux/testdata/trace/deployment-hr-ocirepo.yaml index 81202e5f..0a4be38c 100644 --- a/cmd/flux/testdata/trace/deployment-hr-ocirepo.yaml +++ b/cmd/flux/testdata/trace/deployment-hr-ocirepo.yaml @@ -78,6 +78,7 @@ status: path: "example" revision: sha256:dbdb109711ffb3be77504d2670dbe13c24dd63d8d7f1fb489d350e5bfe930dd3 url: "example" + digest: sha256:dbdb109711ffb3be77504d2670dbe13c24dd63d8d7f1fb489d350e5bfe930dd3 conditions: - lastTransitionTime: "2021-07-20T00:48:16Z" message: "stored artifact for digest 'sha256:dbdb109711ffb3be77504d2670dbe13c24dd63d8d7f1fb489d350e5bfe930dd3'" diff --git a/cmd/flux/testdata/trace/deployment.yaml b/cmd/flux/testdata/trace/deployment.yaml index 4e28b8e9..afba6a3b 100644 --- a/cmd/flux/testdata/trace/deployment.yaml +++ b/cmd/flux/testdata/trace/deployment.yaml @@ -80,6 +80,7 @@ status: revision: 6.3.5 path: "example" url: "example" + digest: sha1:cf13ba96773d9a879cd052c86e73199b3f96c854 conditions: - lastTransitionTime: "2021-07-16T15:32:09Z" message: 'Fetched revision: 6.3.5' @@ -107,6 +108,7 @@ status: revision: sha1:8411f23d07d3701f0e96e7d9e503b7936d7e1d56 path: "example" url: "example" + digest: sha256:f105fc5f3b58605631dc25497773d0a392b807cb220f32635fada3ce0dd81ad6 conditions: - lastTransitionTime: "2021-07-11T00:25:46Z" message: 'Fetched revision: main@sha1:8411f23d07d3701f0e96e7d9e503b7936d7e1d56' diff --git a/cmd/flux/testdata/trace/helmrelease-oci.yaml b/cmd/flux/testdata/trace/helmrelease-oci.yaml index 36c74340..9f959cc3 100644 --- a/cmd/flux/testdata/trace/helmrelease-oci.yaml +++ b/cmd/flux/testdata/trace/helmrelease-oci.yaml @@ -83,6 +83,7 @@ status: path: "example" revision: sha256:dbdb109711ffb3be77504d2670dbe13c24dd63d8d7f1fb489d350e5bfe930dd3 url: "example" + digest: sha256:dbdb109711ffb3be77504d2670dbe13c24dd63d8d7f1fb489d350e5bfe930dd3 conditions: - lastTransitionTime: "2021-07-20T00:48:16Z" message: "stored artifact for digest 'sha256:dbdb109711ffb3be77504d2670dbe13c24dd63d8d7f1fb489d350e5bfe930dd3'" diff --git a/cmd/flux/testdata/trace/helmrelease.yaml b/cmd/flux/testdata/trace/helmrelease.yaml index d82a8c03..6bfc36b6 100644 --- a/cmd/flux/testdata/trace/helmrelease.yaml +++ b/cmd/flux/testdata/trace/helmrelease.yaml @@ -80,6 +80,7 @@ status: revision: main@sha1:696f056df216eea4f9401adbee0ff744d4df390f path: "example" url: "example" + digest: sha1:696f056df216eea4f9401adbee0ff744d4df390f conditions: - lastTransitionTime: "2021-07-20T00:48:16Z" message: 'Fetched revision: main@sha1:696f056df216eea4f9401adbee0ff744d4df390f' diff --git a/go.mod b/go.mod index ae8d994b..8a20a5c1 100644 --- a/go.mod +++ b/go.mod @@ -32,7 +32,7 @@ require ( github.com/fluxcd/pkg/ssh v0.21.0 github.com/fluxcd/pkg/tar v0.14.0 github.com/fluxcd/pkg/version v0.10.0 - github.com/fluxcd/source-controller/api v1.6.2 + github.com/fluxcd/source-controller/api v1.7.0 github.com/go-git/go-git/v5 v5.16.2 github.com/go-logr/logr v1.4.3 github.com/gonvenience/bunt v1.4.2 diff --git a/go.sum b/go.sum index 57ba5564..568c183e 100644 --- a/go.sum +++ b/go.sum @@ -222,8 +222,8 @@ github.com/fluxcd/pkg/tar v0.14.0 h1:9Gku8FIvPt2bixKldZnzXJ/t+7SloxePlzyVGOK8GVQ github.com/fluxcd/pkg/tar v0.14.0/go.mod h1:+rOWYk93qLEJ8WwmkvJOkB8i0dna1mrwJFybE8i9Udo= github.com/fluxcd/pkg/version v0.10.0 h1:WETlCRbfbocsDItkCCeh/4x4zQkZ5i/lUe7P7VaQBrI= github.com/fluxcd/pkg/version v0.10.0/go.mod h1:dgmjEq4ykvBnqK1oVXM+hcXx3kAY/b4uZDYUn8XnHjk= -github.com/fluxcd/source-controller/api v1.6.2 h1:UmodAeqLIeF29HdTqf2GiacZyO+hJydJlepDaYsMvhc= -github.com/fluxcd/source-controller/api v1.6.2/go.mod h1:ZJcAi0nemsnBxjVgmJl0WQzNvB0rMETxQMTdoFosmMw= +github.com/fluxcd/source-controller/api v1.7.0 h1:y6vjvbkIN4JzianhmaJqujeghVpvQn3gcsVW/f1xMeA= +github.com/fluxcd/source-controller/api v1.7.0/go.mod h1:UOIEs9AACxPW7fQFqGWw1/FN2QqYDLG6WkvPIyscHkw= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= diff --git a/manifests/bases/source-controller/kustomization.yaml b/manifests/bases/source-controller/kustomization.yaml index 7ddfd10f..aae82bc9 100644 --- a/manifests/bases/source-controller/kustomization.yaml +++ b/manifests/bases/source-controller/kustomization.yaml @@ -1,8 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- https://github.com/fluxcd/source-controller/releases/download/v1.6.2/source-controller.crds.yaml -- https://github.com/fluxcd/source-controller/releases/download/v1.6.2/source-controller.deployment.yaml +- https://github.com/fluxcd/source-controller/releases/download/v1.7.0/source-controller.crds.yaml +- https://github.com/fluxcd/source-controller/releases/download/v1.7.0/source-controller.deployment.yaml - account.yaml transformers: - labels.yaml diff --git a/manifests/crds/kustomization.yaml b/manifests/crds/kustomization.yaml index a08f0291..de5dd9e7 100644 --- a/manifests/crds/kustomization.yaml +++ b/manifests/crds/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- https://github.com/fluxcd/source-controller/releases/download/v1.6.2/source-controller.crds.yaml +- https://github.com/fluxcd/source-controller/releases/download/v1.7.0/source-controller.crds.yaml - https://github.com/fluxcd/kustomize-controller/releases/download/v1.6.1/kustomize-controller.crds.yaml - https://github.com/fluxcd/helm-controller/releases/download/v1.3.0/helm-controller.crds.yaml - https://github.com/fluxcd/notification-controller/releases/download/v1.6.0/notification-controller.crds.yaml diff --git a/pkg/bootstrap/bootstrap_test.go b/pkg/bootstrap/bootstrap_test.go index 30584e7b..8f8e3db8 100644 --- a/pkg/bootstrap/bootstrap_test.go +++ b/pkg/bootstrap/bootstrap_test.go @@ -64,7 +64,7 @@ func Test_hasRevision(t *testing.T) { APIVersion: sourcev1.GroupVersion.String(), }, Status: sourcev1.GitRepositoryStatus{ - Artifact: &sourcev1.Artifact{ + Artifact: &meta.Artifact{ Revision: "main@sha1:5bf3a8f9bb0aa5ae8afd6208f43757ab73fc033a", }, }, @@ -79,7 +79,7 @@ func Test_hasRevision(t *testing.T) { APIVersion: sourcev1.GroupVersion.String(), }, Status: sourcev1.GitRepositoryStatus{ - Artifact: &sourcev1.Artifact{ + Artifact: &meta.Artifact{ Revision: "main@sha1:e7f3a8f9bb0aa5ae8afd6208f43757ab73fc043a", }, }, @@ -103,7 +103,7 @@ func Test_hasRevision(t *testing.T) { Kind: sourcev1.OCIRepositoryKind, }, Status: sourcev1.OCIRepositoryStatus{ - Artifact: &sourcev1.Artifact{ + Artifact: &meta.Artifact{ Revision: "main@sha1:5bf3a8f9bb0aa5ae8afd6208f43757ab73fc033a", }, }, @@ -333,7 +333,7 @@ func Test_objectReconciled(t *testing.T) { Conditions: []metav1.Condition{ {Type: meta.ReadyCondition, Status: metav1.ConditionTrue, ObservedGeneration: 1, Reason: "Readyyy", Message: "Cloned successfully"}, }, - Artifact: &sourcev1.Artifact{ + Artifact: &meta.Artifact{ Revision: "main@sha1:e7f3a8f9bb0aa5ae8afd6208f43757ab73fc043a", }, }, @@ -362,7 +362,7 @@ func Test_objectReconciled(t *testing.T) { Conditions: []metav1.Condition{ {Type: meta.ReadyCondition, Status: metav1.ConditionTrue, ObservedGeneration: 1, Reason: "Readyyy", Message: "Cloned successfully"}, }, - Artifact: &sourcev1.Artifact{ + Artifact: &meta.Artifact{ Revision: expectedRev, }, }, @@ -419,7 +419,7 @@ func Test_objectReconciled(t *testing.T) { Conditions: []metav1.Condition{ {Type: meta.ReadyCondition, Status: metav1.ConditionTrue, ObservedGeneration: 1, Reason: "Readyyy", Message: "Cloned successfully"}, }, - Artifact: &sourcev1.Artifact{ + Artifact: &meta.Artifact{ Revision: "wrong rev", }, } @@ -434,7 +434,7 @@ func Test_objectReconciled(t *testing.T) { Conditions: []metav1.Condition{ {Type: meta.ReadyCondition, Status: metav1.ConditionTrue, ObservedGeneration: 1, Reason: "Readyyy", Message: "Cloned successfully"}, }, - Artifact: &sourcev1.Artifact{ + Artifact: &meta.Artifact{ Revision: expectedRev, }, }