Skip to content
Open
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
31 changes: 25 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,37 +117,56 @@ run: manifests generate fmt vet ## Run a controller from your host.
go run cmd/fluent-manager/main.go

# Build amd64/arm64 Fluent Operator container image
.PHONY: build-op
build-op:
docker buildx build --push --platform linux/amd64,linux/arm64 -f cmd/fluent-manager/Dockerfile . -t ${FO_IMG}

# Build amd64/arm64 Fluent Bit container image
.PHONY: build-fb
build-fb: prepare-build
docker buildx build --push --platform linux/amd64,linux/arm64 -f cmd/fluent-watcher/fluentbit/Dockerfile . -t ${FB_IMG}

.PHONY: build-fb-debug
build-fb-debug: prepare-build
docker buildx build --push --platform linux/amd64,linux/arm64 -f cmd/fluent-watcher/fluentbit/Dockerfile.debug . -t ${FB_IMG_DEBUG}

# Build all amd64 docker images
.PHONY: build-amd64
build-amd64: build-op-amd64 build-fb-amd64 build-fd-amd64

# Build all arm64 docker images
.PHONY: build-arm64
build-arm64: build-op-arm64 build-fb-arm64 build-fd-arm64

# Build amd64 Fluent Operator container image
.PHONY: build-op-amd64
build-op-amd64:
docker build --platform=linux/amd64 -f cmd/fluent-manager/Dockerfile . -t ${FO_IMG}

# Build arm64 Fluent Operator container image
.PHONY: build-op-amd64
build-op-amd64:
docker build --platform=linux/arm64 -f cmd/fluent-manager/Dockerfile . -t ${FO_IMG}

# Build amd64 Fluent Bit container image
.PHONY: build-fb-amd64
build-fb-amd64:
docker build --platform=linux/amd64 -f cmd/fluent-watcher/fluentbit/Dockerfile . -t ${FB_IMG}

# Build arm64 Fluent Bit container image
.PHONY: build-fb-arm64
build-fb-arm64:
docker build --platform=linux/arm64 -f cmd/fluent-watcher/fluentbit/Dockerfile . -t ${FB_IMG}

# Build amd64 Fluentd container image
.PHONY: build-fd-amd64
build-fd-amd64:
docker build --platform=linux/amd64 -f cmd/fluent-watcher/fluentd/Dockerfile.amd64 . -t ${FD_IMG}

build-fd-arm64-base: prepare-build
docker buildx build --push --platform linux/arm64 -f cmd/fluent-watcher/fluentd/Dockerfile.arm64.base . -t ${FD_IMG_BASE}

# Use docker buildx to build arm64 Fluentd container image
build-fd-arm64: prepare-build
docker buildx build --push --platform linux/arm64 -f cmd/fluent-watcher/fluentd/Dockerfile.arm64.quick . -t ${FD_IMG}${ARCH} --build-arg ${FD_IMG_BASE} --build-arg ${FD_IMG_BASE_TAG}
# Build arm64 Fluentd container image
.PHONY: build-fd-arm64
build-fd-arm64:
docker build --platform=linux/arm64 -f cmd/fluent-watcher/fluentd/Dockerfile.amd64 . -t ${FD_IMG}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we actually have the fluentd dockerfile for arm64 or amd64? only see cmd/fluent-watcher/fluentd/Dockerfile

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use the same Dockerfile for both architectures.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then should we change the path to cmd/fluent-watcher/fluentd/Dockerfile?


# Prepare for arm64 building
prepare-build:
Expand Down
Loading