Files
cozystack/packages/system/kilo/Makefile
Arsolitt 269fe97e34 feat(kilo): add patched image build infrastructure
Add Dockerfile for building kilo from upstream main branch source with
patch support, CNI plugins, and iptables-wrapper. Update Makefile with
`image:` target for building the patched image and an updated `update:`
target that pins the upstream commit SHA.

Signed-off-by: Arsolitt <arsolitt@gmail.com>
2026-05-11 12:11:31 +03:00

23 lines
770 B
Makefile

export NAME=kilo
export NAMESPACE=cozy-$(NAME)
include ../../../hack/common-envs.mk
include ../../../hack/package.mk
update:
sha=$$(git ls-remote https://github.com/squat/kilo refs/heads/main | awk '{print $$1}') && \
sed -i "/ARG VERSION/ s|=.*|=$${sha}|g" images/kilo/Dockerfile
image:
docker buildx build images/kilo \
--tag $(REGISTRY)/kilo:$(call settag,$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/kilo:latest \
--cache-to type=inline \
--metadata-file images/kilo.json \
$(BUILDX_ARGS)
REPOSITORY="$(REGISTRY)/kilo" \
yq -i '.kilo.image.repository = strenv(REPOSITORY)' values.yaml
TAG=$(TAG)@$$(yq e '."containerimage.digest"' images/kilo.json -o json -r) \
yq -i '.kilo.image.tag = strenv(TAG)' values.yaml
rm -f images/kilo.json