Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/fluxcd/pkg/http/fetch v0.19.0
github.com/fluxcd/pkg/runtime v0.84.0
github.com/fluxcd/pkg/tar v0.14.0
github.com/fluxcd/source-controller/api v1.6.2
github.com/fluxcd/source-controller/api v1.7.0
github.com/gitops-tools/pkg v0.2.0
github.com/go-logr/logr v1.4.3
github.com/go-logr/zapr v1.3.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,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/testserver v0.13.0 h1:xEpBcEYtD7bwvZ+i0ZmChxKkDo/wfQEV3xmnzVybSSg=
github.com/fluxcd/pkg/testserver v0.13.0/go.mod h1:akRYv3FLQUsme15na9ihECRG6hBuqni4XEY9W8kzs8E=
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/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
Expand Down
12 changes: 4 additions & 8 deletions pkg/cmd/local_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"os"
"path/filepath"

"github.com/fluxcd/pkg/apis/meta"
sourcev1 "github.com/fluxcd/source-controller/api/v1"
sourcev1beta2 "github.com/fluxcd/source-controller/api/v1beta2"
"github.com/go-logr/logr"
"sigs.k8s.io/controller-runtime/pkg/client"
)
Expand Down Expand Up @@ -93,16 +93,12 @@ func (l localObjectReader) Get(ctx context.Context, key client.ObjectKey, obj cl
l.logger.Info("reading from local filesystem", "base", base)

switch v := obj.(type) {
case *sourcev1beta2.GitRepository:
v.Status.Artifact = &sourcev1.Artifact{
URL: "file://" + filepath.Join(base, key.Name),
}
case *sourcev1.GitRepository:
v.Status.Artifact = &sourcev1.Artifact{
v.Status.Artifact = &meta.Artifact{
URL: "file://" + filepath.Join(base, key.Name),
}
case *sourcev1beta2.OCIRepository:
v.Status.Artifact = &sourcev1.Artifact{
case *sourcev1.OCIRepository:
v.Status.Artifact = &meta.Artifact{
URL: "file://" + filepath.Join(base, key.Name),
}

Expand Down
3 changes: 2 additions & 1 deletion pkg/generators/gitrepository/git_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package gitrepository
import (
"testing"

"github.com/fluxcd/pkg/apis/meta"
"github.com/fluxcd/pkg/http/fetch"
"github.com/fluxcd/pkg/tar"
sourcev1 "github.com/fluxcd/source-controller/api/v1"
Expand Down Expand Up @@ -199,7 +200,7 @@ func TestGenerate_errors(t *testing.T) {

func withArchiveURLAndChecksum(archiveURL, xsum string) func(*sourcev1.GitRepository) {
return func(gr *sourcev1.GitRepository) {
gr.Status.Artifact = &sourcev1.Artifact{
gr.Status.Artifact = &meta.Artifact{
URL: archiveURL,
Digest: xsum,
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/generators/matrix/matrix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"testing"
"time"

"github.com/fluxcd/pkg/apis/meta"
"github.com/fluxcd/pkg/http/fetch"
"github.com/fluxcd/pkg/tar"
sourcev1 "github.com/fluxcd/source-controller/api/v1"
sourcev1beta2 "github.com/fluxcd/source-controller/api/v1beta2"
templatesv1 "github.com/gitops-tools/gitopssets-controller/api/v1alpha1"
"github.com/gitops-tools/gitopssets-controller/pkg/generators"
Expand Down Expand Up @@ -554,7 +554,7 @@ func newGitRepository(archiveURL, xsum string) *sourcev1beta2.GitRepository {
Namespace: testNamespace,
},
Status: sourcev1beta2.GitRepositoryStatus{
Artifact: &sourcev1.Artifact{
Artifact: &meta.Artifact{
URL: archiveURL,
Digest: xsum,
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/generators/ocirepository/oci_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package ocirepository
import (
"testing"

"github.com/fluxcd/pkg/apis/meta"
"github.com/fluxcd/pkg/http/fetch"
"github.com/fluxcd/pkg/tar"
sourcev1 "github.com/fluxcd/source-controller/api/v1"
sourcev1beta2 "github.com/fluxcd/source-controller/api/v1beta2"
"github.com/go-logr/logr"
"github.com/google/go-cmp/cmp"
Expand Down Expand Up @@ -200,7 +200,7 @@ func TestGenerate_errors(t *testing.T) {

func withArchiveURLAndChecksum(archiveURL, xsum string) func(*sourcev1beta2.OCIRepository) {
return func(gr *sourcev1beta2.OCIRepository) {
gr.Status.Artifact = &sourcev1.Artifact{
gr.Status.Artifact = &meta.Artifact{
URL: archiveURL,
Digest: xsum,
}
Expand Down
5 changes: 2 additions & 3 deletions tests/e2e/gitopsset_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
imagev1 "github.com/fluxcd/image-reflector-controller/api/v1"
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2"
"github.com/fluxcd/pkg/apis/meta"
sourcev1 "github.com/fluxcd/source-controller/api/v1"
sourcev1beta2 "github.com/fluxcd/source-controller/api/v1beta2"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
Expand Down Expand Up @@ -900,8 +899,8 @@ func generateResourceInventory(objs []runtime.Object) *templatesv1.ResourceInven
return &templatesv1.ResourceInventory{Entries: entries}
}

func newArtifact(url, checksum string) *sourcev1.Artifact {
return &sourcev1.Artifact{
func newArtifact(url, checksum string) *meta.Artifact {
return &meta.Artifact{
URL: url,
Digest: checksum,
LastUpdateTime: metav1.Now(),
Expand Down
Loading