cozystack/packages/system/metallb/Makefile
Andrei Kvapil 3618abed62
refactor: move scripts to hack directory
Move common-envs.mk and package.mk from scripts/ to hack/ directory.
Update all Makefile includes to use new paths. Remove unused
issue-flux-certificates.sh script.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-01-15 16:06:56 +01:00

31 lines
1.1 KiB
Makefile

export NAME=metallb
export NAMESPACE=cozy-$(NAME)
include ../../../hack/common-envs.mk
include ../../../hack/package.mk
update:
rm -rf charts
helm repo add metallb https://metallb.github.io/metallb
helm repo update metallb
helm pull metallb/metallb --untar --untardir charts
rm -rf charts/metallb/charts/frr-k8s
image-controller image-speaker:
$(eval TARGET := $(subst image-,,$@))
$(eval VERSION := $(shell yq '.appVersion' charts/metallb/Chart.yaml))
docker buildx build images/metallb \
--target $(TARGET) \
--build-arg VERSION=$(VERSION) \
--tag $(REGISTRY)/metallb-$(TARGET):$(VERSION) \
--cache-from type=registry,ref=$(REGISTRY)/metallb-$(TARGET):latest \
--cache-to type=inline \
--metadata-file images/$(TARGET).json \
$(BUILDX_ARGS)
REPOSITORY="$(REGISTRY)/metallb-$(TARGET)" \
yq -i '.metallb.$(TARGET).image.repository = strenv(REPOSITORY)' values.yaml
TAG=$(VERSION)@$$(yq e '."containerimage.digest"' images/$(TARGET).json -o json -r) \
yq -i '.metallb.$(TARGET).image.tag = strenv(TAG)' values.yaml
rm -f images/$(TARGET).json
image: image-controller image-speaker