Files
cozystack/packages/system/dashboard/Makefile
Andrei Kvapil 9873011ebf [dashboard] refactor dashboard configuration
- Refactor code for dashboard resources creation
- Move dashboard-config helm chart to dynamic dashboard controller
- Move white-label configuration to separate configmap

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-09-25 14:57:33 +02:00

71 lines
2.7 KiB
Makefile

export NAME=dashboard
export NAMESPACE=cozy-$(NAME)
include ../../../scripts/common-envs.mk
include ../../../scripts/package.mk
update: update-crd update-dockerfiles
image: image-openapi-ui image-openapi-ui-k8s-bff image-token-proxy update-tenant-text
update-dockerfiles:
@echo Update dockerfiles manually
update-crd:
rm -rf crds
mkdir -p crds
wget -O- https://github.com/PRO-Robotech/helmfile-manifests/archive/refs/heads/main.tar.gz | tar -C crds -xzvf- helmfile-manifests-main/charts/incloud-main/incloud-web-1.0.0/incloud-web/templates --strip-components=6
rm -f crds/_helpers.tpl
sed -i '/{{/d' crds/*.yml crds/*.yaml
image-openapi-ui:
docker buildx build images/openapi-ui \
--provenance false \
--builder=$(BUILDER) \
--platform=linux/amd64 \
--tag $(REGISTRY)/openapi-ui:$(call settag,$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/openapi-ui:latest \
--cache-to type=inline \
--metadata-file images/openapi-ui.json \
--push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
--load=$(LOAD)
IMAGE="$(REGISTRY)/openapi-ui:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/openapi-ui.json -r)" \
yq -i '.openapiUI.image = strenv(IMAGE)' values.yaml
rm -f images/openapi-ui.json
image-openapi-ui-k8s-bff:
docker buildx build images/openapi-ui-k8s-bff \
--provenance false \
--builder=$(BUILDER) \
--platform=linux/amd64 \
--tag $(REGISTRY)/openapi-ui-k8s-bff:$(call settag,$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/openapi-ui-k8s-bff:latest \
--cache-to type=inline \
--metadata-file images/openapi-ui-k8s-bff.json \
--push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
--load=$(LOAD)
IMAGE="$(REGISTRY)/openapi-ui-k8s-bff:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/openapi-ui-k8s-bff.json -r)" \
yq -i '.openapiUIK8sBff.image = strenv(IMAGE)' values.yaml
rm -f images/openapi-ui-k8s-bff.json
image-token-proxy:
docker buildx build images/token-proxy \
--provenance false \
--builder=$(BUILDER) \
--platform=linux/amd64 \
--tag $(REGISTRY)/token-proxy:$(call settag,$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/token-proxy:latest \
--cache-to type=inline \
--metadata-file images/token-proxy.json \
--push=$(PUSH) \
--label "org.opencontainers.image.source=https://github.com/cozystack/cozystack" \
--load=$(LOAD)
IMAGE="$(REGISTRY)/token-proxy:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/token-proxy.json -r)" \
yq -i '.tokenProxy.image = strenv(IMAGE)' values.yaml
rm -f images/token-proxy.json
update-tenant-text:
yq -i '.data.TENANT_TEXT = "$(TAG)"' ./templates/configmap.yaml