@@ -27,6 +27,7 @@ DOCKER_BUILDX_CMD ?= docker buildx
2727IMAGE_BUILD_CMD ?= $(DOCKER_BUILDX_CMD ) build
2828IMAGE_BUILD_EXTRA_OPTS ?=
2929SYNCER_IMAGE_BUILD_EXTRA_OPTS ?=
30+ BBR_IMAGE_BUILD_EXTRA_OPTS ?=
3031IMAGE_REGISTRY ?= us-central1-docker.pkg.dev/k8s-staging-images/gateway-api-inference-extension
3132IMAGE_NAME := epp
3233IMAGE_REPO ?= $(IMAGE_REGISTRY ) /$(IMAGE_NAME )
@@ -36,6 +37,10 @@ SYNCER_IMAGE_NAME := lora-syncer
3637SYNCER_IMAGE_REPO ?= $(IMAGE_REGISTRY ) /$(SYNCER_IMAGE_NAME )
3738SYNCER_IMAGE_TAG ?= $(SYNCER_IMAGE_REPO ) :$(GIT_TAG )
3839
40+ BBR_IMAGE_NAME := bbr
41+ BBR_IMAGE_REPO ?= $(IMAGE_REGISTRY ) /$(BBR_IMAGE_NAME )
42+ BBR_IMAGE_TAG ?= $(BBR_IMAGE_REPO ) :$(GIT_TAG )
43+
3944BASE_IMAGE ?= gcr.io/distroless/static:nonroot
4045BUILDER_IMAGE ?= golang:1.23
4146ifdef GO_VERSION
@@ -45,10 +50,12 @@ endif
4550ifdef EXTRA_TAG
4651IMAGE_EXTRA_TAG ?= $(IMAGE_REPO ) :$(EXTRA_TAG )
4752SYNCER_IMAGE_EXTRA_TAG ?= $(SYNCER_IMAGE_REPO ) :$(EXTRA_TAG )
53+ BBR_IMAGE_EXTRA_TAG ?= $(BBR_IMAGE_REPO ) :$(EXTRA_TAG )
4854endif
4955ifdef IMAGE_EXTRA_TAG
5056IMAGE_BUILD_EXTRA_OPTS += -t $(IMAGE_EXTRA_TAG )
5157SYNCER_IMAGE_BUILD_EXTRA_OPTS += -t $(SYNCER_IMAGE_EXTRA_TAG )
58+ BBR_IMAGE_BUILD_EXTRA_OPTS += -t $(BBR_IMAGE_EXTRA_TAG )
5259endif
5360
5461# The name of the kind cluster to use for the "kind-load" target.
@@ -203,6 +210,46 @@ syncer-image-build:
203210syncer-image-push : PUSH=--push
204211syncer-image-push : syncer-image-build
205212
213+ # #@ Body-based Routing extension
214+
215+ # Build the container image
216+ .PHONY : bbr-image-local-build
217+ bbr-image-local-build : # # Build the image using Docker Buildx for local development.
218+ BUILDER=$(shell $(DOCKER_BUILDX_CMD ) create --use)
219+ $(MAKE ) bbr-image-build PUSH=$(PUSH )
220+ $(MAKE ) bbr-image-build LOAD=$(LOAD )
221+ $(DOCKER_BUILDX_CMD ) rm $$ BUILDER
222+
223+ .PHONY : bbr-image-local-push
224+ bbr-image-local-push : PUSH=--push # # Build the image for local development and push it to $IMAGE_REPO.
225+ bbr-image-local-push : bbr-image-local-build
226+
227+ .PHONY : bbr-image-local-load
228+ bbr-image-local-load : LOAD=--load # # Build the image for local development and load it in the local Docker registry.
229+ bbr-image-local-load : bbr-image-local-build
230+
231+ .PHONY : bbr-image-build
232+ bbr-image-build : # # Build the image using Docker Buildx.
233+ $(IMAGE_BUILD_CMD ) -f body-based-routing.Dockerfile -t $(BBR_IMAGE_TAG ) \
234+ --platform=$(PLATFORMS ) \
235+ --build-arg BASE_IMAGE=$(BASE_IMAGE ) \
236+ --build-arg BUILDER_IMAGE=$(BUILDER_IMAGE ) \
237+ $(PUSH ) \
238+ $(LOAD ) \
239+ .
240+
241+ .PHONY : bbr-image-push
242+ bbr-image-push : PUSH=--push # # Build the image and push it to $IMAGE_REPO.
243+ bbr-image-push : bbr-image-build
244+
245+ .PHONY : bbr-image-load
246+ bbr-image-load : LOAD=--load # # Build the image and load it in the local Docker registry.
247+ bbr-image-load : bbr-image-build
248+
249+ .PHONY : bbr-image-kind
250+ bbr-image-kind : bbr-image-build # # Build the image and load it to kind cluster $KIND_CLUSTER ("kind" by default).
251+ kind load docker-image $(BBR_IMAGE_TAG ) --name $(KIND_CLUSTER )
252+
206253# #@ Docs
207254
208255.PHONY : build-docs
0 commit comments