mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-03 21:53:20 +09:00
Add a `version` value (v25.8, v25.3, v24.9; default v24.9) to the
ClickHouse chart, backed by files/versions.yaml and resolved by
templates/_versions.tpl for both the ClickHouse server and Keeper
images, so the Cozystack API returns the engine version (spec.version)
like the other managed-DB charts. Default v24.9 -> 24.9.2.42 keeps
existing installations byte-for-byte identical.
The maintainer-run hack/update-versions.sh generator intersects the
server/keeper Docker Hub tags byte-collated (LC_ALL=C) so comm keeps
tags across the X.9 -> X.10 boundary; freezes the default major to the
tag it already ships (read from versions.yaml, so the freeze follows the
default); errors on a dropped default or an unresolvable major; writes
atomically; and runs on stock macOS bash 3.2 / BSD. Covered by
hack/clickhouse-update-versions_test.bats (10 cases) and the
tests/version_test.yaml helm-unittest suite.
Refs: #1246
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
(cherry picked from commit 3c78c0be56)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Assisted-By: LLM
35 lines
1.3 KiB
Makefile
35 lines
1.3 KiB
Makefile
CLICKHOUSE_BACKUP_TAG = $(shell awk '$$0 ~ /^version:/ {print $$2}' Chart.yaml)
|
|
|
|
include ../../../hack/common-envs.mk
|
|
include ../../../hack/package.mk
|
|
|
|
generate:
|
|
cozyvalues-gen -m 'clickhouse' -v values.yaml -s values.schema.json -r README.md -g ../../../api/apps/v1alpha1/clickhouse/types.go
|
|
../../../hack/update-crd.sh
|
|
|
|
update:
|
|
hack/update-versions.sh
|
|
make generate
|
|
|
|
.PHONY: test
|
|
test:
|
|
helm unittest .
|
|
|
|
image:
|
|
docker buildx build images/clickhouse-backup \
|
|
$(call image-tags,clickhouse-backup,$(CLICKHOUSE_BACKUP_TAG)) \
|
|
$(call cache-args,clickhouse-backup) \
|
|
--metadata-file images/clickhouse-backup.json \
|
|
$(BUILDX_ARGS)
|
|
echo "$(REGISTRY)/clickhouse-backup:$(IMAGE_TAG)@$$(yq e '."containerimage.digest"' images/clickhouse-backup.json -o json -r)" \
|
|
> images/clickhouse-backup.tag
|
|
rm -f images/clickhouse-backup.json
|
|
docker buildx build images/altinity-clickhouse-backup \
|
|
$(call image-tags,altinity-clickhouse-backup,$(CLICKHOUSE_BACKUP_TAG)) \
|
|
$(call cache-args,altinity-clickhouse-backup) \
|
|
--metadata-file images/altinity-clickhouse-backup.json \
|
|
$(BUILDX_ARGS)
|
|
echo "$(REGISTRY)/altinity-clickhouse-backup:$(IMAGE_TAG)@$$(yq e '."containerimage.digest"' images/altinity-clickhouse-backup.json -o json -r)" \
|
|
> images/altinity-clickhouse-backup.tag
|
|
rm -f images/altinity-clickhouse-backup.json
|