Skip to content

Commit 36c035a

Browse files
authored
Move operator's cmd/operator/main.go to cmd/main.go to keep operator-sdk compatibility (#295)
1 parent ab6bc98 commit 36c035a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ COPY controllers/ controllers/
2222
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
2323
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
2424
USER root
25-
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/operator/main.go
25+
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go
2626

2727
# Use distroless as minimal base image to package the manager binary
2828
# Refer to https://github.com/GoogleContainerTools/distroless for more details

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ test: manifests generate fmt vet envtest ## Run tests.
114114

115115
.PHONY: build
116116
build: manifests generate fmt vet ## Build manager binary.
117-
go build -o bin/manager cmd/operator/main.go
117+
go build -o bin/manager cmd/main.go
118118

119119
.PHONY: run
120120
run: manifests generate fmt vet ## Run a controller from your host.
121-
go run ./cmd/operator/main.go --enable-services $(ENABLED_SERVICES)
121+
go run ./cmd/main.go --enable-services $(ENABLED_SERVICES)
122122

123123
# If you wish built the manager image targeting other platforms you can use the --platform flag.
124124
# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it.
File renamed without changes.

0 commit comments

Comments
 (0)