Skip to content

Commit b75d613

Browse files
committed
Make api package dedicated module
As other controllers depend on source-controller because of the API package, but this pulls in obsolete dependencies for the controllers. By publishing the API package as a dedicated module while using a (local) replace for the project itself, this should be prevented.
1 parent 18da993 commit b75d613

File tree

5 files changed

+465
-51
lines changed

5 files changed

+465
-51
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ FROM golang:1.14 as builder
22

33
WORKDIR /workspace
44

5+
# copy api submodule
6+
COPY api/ api/
7+
58
# copy modules manifests
69
COPY go.mod go.mod
710
COPY go.sum go.sum
@@ -11,7 +14,6 @@ RUN go mod download
1114

1215
# copy source code
1316
COPY main.go main.go
14-
COPY api/ api/
1517
COPY controllers/ controllers/
1618
COPY pkg/ pkg/
1719
COPY internal/ internal/

api/go.mod

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module github.com/fluxcd/source-controller/api
2+
3+
go 1.14
4+
5+
require (
6+
k8s.io/api v0.18.4
7+
k8s.io/apimachinery v0.18.4
8+
sigs.k8s.io/controller-runtime v0.6.1
9+
)

0 commit comments

Comments
 (0)