@@ -27,6 +27,7 @@ DOCKER_BUILDX_CMD ?= docker buildx
27
27
IMAGE_BUILD_CMD ?= $(DOCKER_BUILDX_CMD ) build
28
28
IMAGE_BUILD_EXTRA_OPTS ?=
29
29
SYNCER_IMAGE_BUILD_EXTRA_OPTS ?=
30
+ BBR_IMAGE_BUILD_EXTRA_OPTS ?=
30
31
IMAGE_REGISTRY ?= us-central1-docker.pkg.dev/k8s-staging-images/gateway-api-inference-extension
31
32
IMAGE_NAME := epp
32
33
IMAGE_REPO ?= $(IMAGE_REGISTRY ) /$(IMAGE_NAME )
@@ -36,6 +37,10 @@ SYNCER_IMAGE_NAME := lora-syncer
36
37
SYNCER_IMAGE_REPO ?= $(IMAGE_REGISTRY ) /$(SYNCER_IMAGE_NAME )
37
38
SYNCER_IMAGE_TAG ?= $(SYNCER_IMAGE_REPO ) :$(GIT_TAG )
38
39
40
+ BBR_IMAGE_NAME := body-based-router
41
+ BBR_IMAGE_REPO ?= $(IMAGE_REGISTRY ) /$(BBR_IMAGE_NAME )
42
+ BBR_IMAGE_TAG ?= $(BBR_IMAGE_REPO ) :$(GIT_TAG )
43
+
39
44
BASE_IMAGE ?= gcr.io/distroless/static:nonroot
40
45
BUILDER_IMAGE ?= golang:1.23
41
46
ifdef GO_VERSION
@@ -45,10 +50,12 @@ endif
45
50
ifdef EXTRA_TAG
46
51
IMAGE_EXTRA_TAG ?= $(IMAGE_REPO ) :$(EXTRA_TAG )
47
52
SYNCER_IMAGE_EXTRA_TAG ?= $(SYNCER_IMAGE_REPO ) :$(EXTRA_TAG )
53
+ BBR_IMAGE_EXTRA_TAG ?= $(BBR_IMAGE_REPO ) :$(EXTRA_TAG )
48
54
endif
49
55
ifdef IMAGE_EXTRA_TAG
50
56
IMAGE_BUILD_EXTRA_OPTS += -t $(IMAGE_EXTRA_TAG )
51
57
SYNCER_IMAGE_BUILD_EXTRA_OPTS += -t $(SYNCER_IMAGE_EXTRA_TAG )
58
+ BBR_IMAGE_BUILD_EXTRA_OPTS += -t $(BBR_IMAGE_EXTRA_TAG )
52
59
endif
53
60
54
61
# The name of the kind cluster to use for the "kind-load" target.
@@ -203,6 +210,46 @@ syncer-image-build:
203
210
syncer-image-push : PUSH=--push
204
211
syncer-image-push : syncer-image-build
205
212
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
+
206
253
# #@ Docs
207
254
208
255
.PHONY : build-docs
0 commit comments