Skip to content

Commit 097bf9b

Browse files
Moving version and util to internal/shared
This partially fixes #1707. The intent is to consolidate internal code from operator-controller and catalogd within internal e.g.: catalogd/ - code specific to catalogd internal/ - holds internal code of catalogd and operator-controller. internal/catalogd - holds unexported code specific to catalogd internal/operator-controller - holds unexported code specific to operator-comntroller internal/shared - shared code between catalogd and operator-controller which can not be exported outside. Signed-off-by: Lalatendu Mohanty <[email protected]>
1 parent 9be7693 commit 097bf9b

File tree

16 files changed

+15
-15
lines changed

16 files changed

+15
-15
lines changed

catalogd/cmd/catalogd/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ import (
6464
"github.com/operator-framework/operator-controller/catalogd/internal/source"
6565
"github.com/operator-framework/operator-controller/catalogd/internal/storage"
6666
"github.com/operator-framework/operator-controller/catalogd/internal/webhook"
67-
fsutil "github.com/operator-framework/operator-controller/internal/util/fs"
68-
"github.com/operator-framework/operator-controller/internal/version"
67+
fsutil "github.com/operator-framework/operator-controller/internal/shared/util/fs"
68+
"github.com/operator-framework/operator-controller/internal/shared/version"
6969
)
7070

7171
var (

catalogd/internal/source/containers_image.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import (
2424

2525
catalogdv1 "github.com/operator-framework/operator-controller/catalogd/api/v1"
2626
"github.com/operator-framework/operator-controller/internal/operator-controller/httputil"
27-
fsutil "github.com/operator-framework/operator-controller/internal/util/fs"
28-
imageutil "github.com/operator-framework/operator-controller/internal/util/image"
27+
fsutil "github.com/operator-framework/operator-controller/internal/shared/util/fs"
28+
imageutil "github.com/operator-framework/operator-controller/internal/shared/util/image"
2929
)
3030

3131
const ConfigDirLabel = "operators.operatorframework.io.index.configs.v1"

cmd/operator-controller/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ import (
7070
"github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/preflights/crdupgradesafety"
7171
"github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/source"
7272
"github.com/operator-framework/operator-controller/internal/operator-controller/scheme"
73-
fsutil "github.com/operator-framework/operator-controller/internal/util/fs"
74-
"github.com/operator-framework/operator-controller/internal/version"
73+
fsutil "github.com/operator-framework/operator-controller/internal/shared/util/fs"
74+
"github.com/operator-framework/operator-controller/internal/shared/version"
7575
)
7676

7777
var (

internal/operator-controller/catalogmetadata/filter/bundle_predicates.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/operator-framework/operator-registry/alpha/declcfg"
77

88
"github.com/operator-framework/operator-controller/internal/operator-controller/bundleutil"
9-
"github.com/operator-framework/operator-controller/internal/util/filter"
9+
"github.com/operator-framework/operator-controller/internal/shared/util/filter"
1010
)
1111

1212
func InMastermindsSemverRange(semverRange *mmsemver.Constraints) filter.Predicate[declcfg.Bundle] {

internal/operator-controller/catalogmetadata/filter/successors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/operator-framework/operator-registry/alpha/declcfg"
1010

1111
ocv1 "github.com/operator-framework/operator-controller/api/v1"
12-
"github.com/operator-framework/operator-controller/internal/util/filter"
12+
"github.com/operator-framework/operator-controller/internal/shared/util/filter"
1313
)
1414

1515
func SuccessorsOf(installedBundle ocv1.BundleMetadata, channels ...declcfg.Channel) (filter.Predicate[declcfg.Bundle], error) {

internal/operator-controller/catalogmetadata/filter/successors_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
ocv1 "github.com/operator-framework/operator-controller/api/v1"
1717
"github.com/operator-framework/operator-controller/internal/operator-controller/bundleutil"
1818
"github.com/operator-framework/operator-controller/internal/operator-controller/catalogmetadata/compare"
19-
"github.com/operator-framework/operator-controller/internal/util/filter"
19+
"github.com/operator-framework/operator-controller/internal/shared/util/filter"
2020
)
2121

2222
func TestSuccessorsPredicate(t *testing.T) {

internal/operator-controller/resolve/catalog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"github.com/operator-framework/operator-controller/internal/operator-controller/bundleutil"
2323
"github.com/operator-framework/operator-controller/internal/operator-controller/catalogmetadata/compare"
2424
"github.com/operator-framework/operator-controller/internal/operator-controller/catalogmetadata/filter"
25-
filterutil "github.com/operator-framework/operator-controller/internal/util/filter"
25+
filterutil "github.com/operator-framework/operator-controller/internal/shared/util/filter"
2626
)
2727

2828
type ValidationFunc func(*declcfg.Bundle) error

internal/operator-controller/rukpak/source/containers_image.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import (
2121
"sigs.k8s.io/controller-runtime/pkg/reconcile"
2222

2323
"github.com/operator-framework/operator-controller/internal/operator-controller/httputil"
24-
fsutil "github.com/operator-framework/operator-controller/internal/util/fs"
25-
imageutil "github.com/operator-framework/operator-controller/internal/util/image"
24+
fsutil "github.com/operator-framework/operator-controller/internal/shared/util/fs"
25+
imageutil "github.com/operator-framework/operator-controller/internal/shared/util/image"
2626
)
2727

2828
var insecurePolicy = []byte(`{"default":[{"type":"insecureAcceptAnything"}]}`)

internal/operator-controller/rukpak/source/containers_image_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"sigs.k8s.io/controller-runtime/pkg/reconcile"
2424

2525
"github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/source"
26-
fsutil "github.com/operator-framework/operator-controller/internal/util/fs"
26+
fsutil "github.com/operator-framework/operator-controller/internal/shared/util/fs"
2727
)
2828

2929
const (

internal/util/filter/filter_test.go renamed to internal/shared/util/filter/filter_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/stretchr/testify/require"
77

8-
"github.com/operator-framework/operator-controller/internal/util/filter"
8+
"github.com/operator-framework/operator-controller/internal/shared/util/filter"
99
)
1010

1111
func TestAnd(t *testing.T) {
File renamed without changes.
File renamed without changes.

internal/util/image/layers.go renamed to internal/shared/util/image/layers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/containers/image/v5/types"
1717
"sigs.k8s.io/controller-runtime/pkg/log"
1818

19-
fsutil "github.com/operator-framework/operator-controller/internal/util/fs"
19+
fsutil "github.com/operator-framework/operator-controller/internal/shared/util/fs"
2020
)
2121

2222
// ForceOwnershipRWX is a passthrough archive.Filter that sets a tar header's
File renamed without changes.

0 commit comments

Comments
 (0)