[dx] Remove BUILDER and PLATFORM autodetection logic

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
Andrei Kvapil
2025-09-05 11:48:16 +02:00
parent 7090b8adf1
commit 9f2b98d364
18 changed files with 32 additions and 133 deletions

View File

@@ -12,16 +12,11 @@ image: image-s3manager
image-s3manager:
docker buildx build images/s3manager \
--provenance false \
--builder=$(BUILDER) \
--platform=$(PLATFORM) \
--tag $(REGISTRY)/s3manager:$(call settag,$(S3MANAGER_TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/s3manager:latest \
--cache-to type=inline \
--metadata-file images/s3manager.json \
--push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
--load=$(LOAD)
$(BUILDX_ARGS)
echo "$(REGISTRY)/s3manager:$(call settag,$(S3MANAGER_TAG))@$$(yq e '."containerimage.digest"' images/s3manager.json -o json -r)" \
> images/s3manager.tag
rm -f images/s3manager.json

View File

@@ -17,17 +17,12 @@ update:
image:
docker buildx build images/cilium \
--provenance false \
--builder=$(BUILDER) \
--platform=$(PLATFORM) \
--tag $(REGISTRY)/cilium:$(call settag,$(CILIUM_TAG)) \
--tag $(REGISTRY)/cilium:$(call settag,$(CILIUM_TAG)-$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/cilium:latest \
--cache-to type=inline \
--metadata-file images/cilium.json \
--push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
--load=$(LOAD)
$(BUILDX_ARGS)
REPOSITORY="$(REGISTRY)/cilium" \
yq -i '.cilium.image.repository = strenv(REPOSITORY)' values.yaml
TAG=$(call settag,$(CILIUM_TAG)) \

View File

@@ -8,16 +8,11 @@ image: image-cozystack-api
image-cozystack-api:
docker buildx build -f images/cozystack-api/Dockerfile ../../.. \
--provenance false \
--builder=$(BUILDER) \
--platform=$(PLATFORM) \
--tag $(REGISTRY)/cozystack-api:$(call settag,$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/cozystack-api:latest \
--cache-to type=inline \
--metadata-file images/cozystack-api.json \
--push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
--load=$(LOAD)
$(BUILDX_ARGS)
IMAGE="$(REGISTRY)/cozystack-api:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/cozystack-api.json -o json -r)" \
yq -i '.cozystackAPI.image = strenv(IMAGE)' values.yaml
rm -f images/cozystack-api.json

View File

@@ -8,16 +8,11 @@ image: image-cozystack-controller update-version
image-cozystack-controller:
docker buildx build -f images/cozystack-controller/Dockerfile ../../.. \
--provenance false \
--builder=$(BUILDER) \
--platform=$(PLATFORM) \
--tag $(REGISTRY)/cozystack-controller:$(call settag,$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/cozystack-controller:latest \
--cache-to type=inline \
--metadata-file images/cozystack-controller.json \
--push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
--load=$(LOAD)
$(BUILDX_ARGS)
IMAGE="$(REGISTRY)/cozystack-controller:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/cozystack-controller.json -o json -r)" \
yq -i '.cozystackController.image = strenv(IMAGE)' values.yaml
rm -f images/cozystack-controller.json

View File

@@ -28,16 +28,11 @@ update-dockerfiles:
image-dashboard: update-version
docker buildx build images/dashboard \
--provenance false \
--builder=$(BUILDER) \
--platform=$(PLATFORM) \
--tag $(REGISTRY)/dashboard:$(call settag,$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/dashboard:latest \
--cache-to type=inline \
--metadata-file images/dashboard.json \
--push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
--load=$(LOAD)
$(BUILDX_ARGS)
REGISTRY="$(REGISTRY)" \
yq -i '.kubeapps.dashboard.image.registry = strenv(REGISTRY)' values.yaml
REPOSITORY="dashboard" \
@@ -50,16 +45,11 @@ image-dashboard: update-version
image-kubeapps-apis: update-version
docker buildx build images/kubeapps-apis \
--provenance false \
--builder=$(BUILDER) \
--platform=$(PLATFORM) \
--tag $(REGISTRY)/kubeapps-apis:$(call settag,$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/kubeapps-apis:latest \
--cache-to type=inline \
--metadata-file images/kubeapps-apis.json \
--push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
--load=$(LOAD)
$(BUILDX_ARGS)
REGISTRY="$(REGISTRY)" \
yq -i '.kubeapps.kubeappsapis.image.registry = strenv(REGISTRY)' values.yaml
REPOSITORY="kubeapps-apis" \

View File

@@ -13,16 +13,11 @@ update:
image:
docker buildx build images/kamaji \
--provenance false \
--builder=$(BUILDER) \
--platform=$(PLATFORM) \
--tag $(REGISTRY)/kamaji:$(call settag,$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/kamaji:latest \
--cache-to type=inline \
--metadata-file images/kamaji.json \
--push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack"
--load=$(LOAD)
$(BUILDX_ARGS)
REPOSITORY="$(REGISTRY)/kamaji" \
yq -i '.kamaji.image.repository = strenv(REPOSITORY)' values.yaml
TAG=$(TAG)@$$(yq e '."containerimage.digest"' images/kamaji.json -o json -r) \

View File

@@ -6,16 +6,11 @@ include ../../../scripts/package.mk
image:
docker buildx build images/kubeovn-webhook \
--provenance false \
--builder=$(BUILDER) \
--platform=$(PLATFORM) \
--tag $(REGISTRY)/kubeovn-webhook:$(call settag,$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/kubeovn-webhook:latest \
--cache-to type=inline \
--metadata-file images/kubeovn-webhook.json \
--push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack"
--load=$(LOAD)
$(BUILDX_ARGS)
IMAGE="$(REGISTRY)/kubeovn-webhook:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/kubeovn-webhook.json -o json -r)" \
yq -i '.image = strenv(IMAGE)' values.yaml
rm -f images/kubeovn-webhook.json

View File

@@ -19,17 +19,12 @@ update:
image:
docker buildx build images/kubeovn \
--provenance false \
--builder=$(BUILDER) \
--platform=$(PLATFORM) \
--tag $(REGISTRY)/kubeovn:$(call settag,$(KUBEOVN_TAG)) \
--tag $(REGISTRY)/kubeovn:$(call settag,$(KUBEOVN_TAG)-$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/kubeovn:latest \
--cache-to type=inline \
--metadata-file images/kubeovn.json \
--push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
--load=$(LOAD)
$(BUILDX_ARGS)
REGISTRY="$(REGISTRY)" \
yq -i '.global.registry.address = strenv(REGISTRY)' values.yaml
REPOSITORY="kubeovn" \

View File

@@ -15,18 +15,13 @@ image-controller image-speaker:
$(eval TARGET := $(subst image-,,$@))
$(eval VERSION := $(shell yq '.appVersion' charts/metallb/Chart.yaml))
docker buildx build images/metallb \
--provenance false \
--builder=$(BUILDER) \
--platform=$(PLATFORM) \
--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 \
--push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
--load=$(LOAD)
$(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) \

View File

@@ -22,8 +22,7 @@ image-controller image-sidecar:
--cache-from type=registry,ref=$(REGISTRY)/objectstorage-$(TARGET):latest \
--cache-to type=inline \
--metadata-file images/$(TARGET).json \
--push=$(PUSH) --provenance=false --load=$(LOAD) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack"
$(BUILDX_ARGS)
IMAGE="$(REGISTRY)/objectstorage-$(TARGET):$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/$(TARGET).json -r)" \
yq -i '$(YAML_PATH) = strenv(IMAGE)' $(VALUES_FILE)
rm -f images/$(TARGET).json