From f871fbdb1eb2e415b428c3f378d8eb43cc96b067 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Wed, 24 Sep 2025 12:22:13 +0200 Subject: [PATCH] Remove versions_map logic Signed-off-by: Andrei Kvapil --- Makefile | 5 - hack/gen_versions_map.sh | 64 ------ hack/package_chart.sh | 65 ------ packages/apps/Makefile | 18 +- packages/apps/bucket/Chart.yaml | 20 +- packages/apps/clickhouse/Chart.yaml | 20 +- packages/apps/ferretdb/Chart.yaml | 20 +- packages/apps/http-cache/Chart.yaml | 20 +- packages/apps/kafka/Chart.yaml | 20 +- packages/apps/kubernetes/Chart.yaml | 20 +- packages/apps/mysql/Chart.yaml | 20 +- packages/apps/nats/Chart.yaml | 20 +- packages/apps/postgres/Chart.yaml | 20 +- packages/apps/rabbitmq/Chart.yaml | 20 +- packages/apps/redis/Chart.yaml | 20 +- packages/apps/tcp-balancer/Chart.yaml | 20 +- packages/apps/tenant/Chart.yaml | 3 +- packages/apps/tenant/templates/ingress.yaml | 2 +- packages/apps/versions_map | 196 ------------------ packages/apps/virtual-machine/Chart.yaml | 21 +- packages/apps/vm-disk/Chart.yaml | 20 +- packages/apps/vm-instance/Chart.yaml | 21 +- packages/apps/vpn/Chart.yaml | 20 +- .../installer/images/cozystack/Dockerfile | 1 - packages/extra/Makefile | 20 +- packages/extra/bootbox/Chart.yaml | 2 +- packages/extra/etcd/Chart.yaml | 2 +- packages/extra/info/Chart.yaml | 2 +- packages/extra/ingress/Chart.yaml | 2 +- packages/extra/monitoring/Chart.yaml | 2 +- packages/extra/seaweedfs/Chart.yaml | 20 +- packages/extra/versions_map | 71 ------- packages/library/Makefile | 14 +- packages/library/cozy-lib/Chart.yaml | 15 +- packages/system/Makefile | 8 +- .../system/bootbox/templates/bootbox.yaml | 2 +- packages/system/etcd-operator/Chart.yaml | 2 +- packages/system/hetzner-robotlb/Chart.yaml | 2 +- packages/system/kubeovn-plunger/Chart.yaml | 2 +- packages/system/kubeovn-webhook/Chart.yaml | 2 +- .../Chart.yaml | 0 .../Makefile | 0 .../templates/volumesnapshotclasses.yaml | 0 .../templates/volumesnapshotcontents.yaml | 0 .../templates/volumesnapshots.yaml | 0 pkg/registry/apps/application/rest.go | 9 +- 46 files changed, 67 insertions(+), 786 deletions(-) delete mode 100755 hack/gen_versions_map.sh delete mode 100755 hack/package_chart.sh delete mode 100644 packages/apps/versions_map delete mode 100644 packages/extra/versions_map rename packages/system/{volumesnapshot-crd-for-tenant-k8s => vsnap-crd}/Chart.yaml (100%) rename packages/system/{volumesnapshot-crd-for-tenant-k8s => vsnap-crd}/Makefile (100%) rename packages/system/{volumesnapshot-crd-for-tenant-k8s => vsnap-crd}/templates/volumesnapshotclasses.yaml (100%) rename packages/system/{volumesnapshot-crd-for-tenant-k8s => vsnap-crd}/templates/volumesnapshotcontents.yaml (100%) rename packages/system/{volumesnapshot-crd-for-tenant-k8s => vsnap-crd}/templates/volumesnapshots.yaml (100%) diff --git a/Makefile b/Makefile index cd94d5db..c941a9ff 100644 --- a/Makefile +++ b/Makefile @@ -30,14 +30,9 @@ build: build-deps repos: rm -rf _out - make -C packages/apps check-version-map - make -C packages/extra check-version-map make -C packages/system repo make -C packages/apps repo make -C packages/extra repo - mkdir -p _out/logos - cp ./packages/apps/*/logos/*.svg ./packages/extra/*/logos/*.svg _out/logos/ - manifests: mkdir -p _out/assets diff --git a/hack/gen_versions_map.sh b/hack/gen_versions_map.sh deleted file mode 100755 index 60ede8ba..00000000 --- a/hack/gen_versions_map.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -set -e - -file=versions_map - -charts=$(find . -mindepth 2 -maxdepth 2 -name Chart.yaml | awk 'sub("/Chart.yaml", "")') - -new_map=$( - for chart in $charts; do - awk '/^name:/ {chart=$2} /^version:/ {version=$2} END{printf "%s %s %s\n", chart, version, "HEAD"}' "$chart/Chart.yaml" - done -) - -if [ ! -f "$file" ] || [ ! -s "$file" ]; then - echo "$new_map" > "$file" - exit 0 -fi - -miss_map=$(mktemp) -trap 'rm -f "$miss_map"' EXIT -echo -n "$new_map" | awk 'NR==FNR { nm[$1 " " $2] = $3; next } { if (!($1 " " $2 in nm)) print $1, $2, $3}' - "$file" > $miss_map - -# search accross all tags sorted by version -search_commits=$(git ls-remote --tags origin | awk -F/ '$3 ~ /v[0-9]+.[0-9]+.[0-9]+/ {print}' | sort -k2,2 -rV | awk '{print $1}') - -resolved_miss_map=$( - while read -r chart version commit; do - # if version is found in HEAD, it's HEAD - if [ "$(awk '$1 == "version:" {print $2}' ./${chart}/Chart.yaml)" = "${version}" ]; then - echo "$chart $version HEAD" - continue - fi - - # if commit is not HEAD, check if it's valid - if [ "$commit" != "HEAD" ]; then - if [ "$(git show "${commit}:./${chart}/Chart.yaml" | awk '$1 == "version:" {print $2}')" != "${version}" ]; then - echo "Commit $commit for $chart $version is not valid" >&2 - exit 1 - fi - - commit=$(git rev-parse --short "$commit") - echo "$chart $version $commit" - continue - fi - - # if commit is HEAD, but version is not found in HEAD, check all tags - found_tag="" - for tag in $search_commits; do - if [ "$(git show "${tag}:./${chart}/Chart.yaml" | awk '$1 == "version:" {print $2}')" = "${version}" ]; then - found_tag=$(git rev-parse --short "${tag}") - break - fi - done - - if [ -z "$found_tag" ]; then - echo "Can't find $chart $version in any version tag, removing it" >&2 - continue - fi - - echo "$chart $version $found_tag" - done < $miss_map -) - -printf "%s\n" "$new_map" "$resolved_miss_map" | sort -k1,1 -k2,2 -V | awk '$1' > "$file" diff --git a/hack/package_chart.sh b/hack/package_chart.sh deleted file mode 100755 index f8ab297f..00000000 --- a/hack/package_chart.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh - -set -e - -usage() { - printf "%s\n" "Usage:" >&2 ; - printf -- "%s\n" '---' >&2 ; - printf "%s %s\n" "$0" "INPUT_DIR OUTPUT_DIR TMP_DIR [DEPENDENCY_DIR]" >&2 ; - printf -- "%s\n" '---' >&2 ; - printf "%s\n" "Takes a helm repository from INPUT_DIR, with an optional library repository in" >&2 ; - printf "%s\n" "DEPENDENCY_DIR, prepares a view of the git archive at select points in history" >&2 ; - printf "%s\n" "in TMP_DIR and packages helm charts, outputting the tarballs to OUTPUT_DIR" >&2 ; -} - -if [ "x$(basename $PWD)" != "xpackages" ] -then - echo "Error: This script must run from the ./packages/ directory" >&2 - echo >&2 - usage - exit 1 -fi - -if [ "x$#" != "x3" ] && [ "x$#" != "x4" ] -then - echo "Error: This script takes 3 or 4 arguments" >&2 - echo "Got $# arguments:" "$@" >&2 - echo >&2 - usage - exit 1 -fi - -input_dir=$1 -output_dir=$2 -tmp_dir=$3 - -if [ "x$#" = "x4" ] -then - dependency_dir=$4 -fi - -rm -rf "${output_dir:?}" -mkdir -p "${output_dir}" -while read package _ commit -do - # this lets devs build the packages from a dirty repo for quick local testing - if [ "x$commit" = "xHEAD" ] - then - helm package "${input_dir}/${package}" -d "${output_dir}" - continue - fi - git archive --format tar "${commit}" "${input_dir}/${package}" | tar -xf- -C "${tmp_dir}/" - - # the library chart is not present in older commits and git archive doesn't fail gracefully if the path is not found - if [ "x${dependency_dir}" != "x" ] && git ls-tree --name-only "${commit}" "${dependency_dir}" | grep -qx "${dependency_dir}" - then - git archive --format tar "${commit}" "${dependency_dir}" | tar -xf- -C "${tmp_dir}/" - fi - helm package "${tmp_dir}/${input_dir}/${package}" -d "${output_dir}" - rm -rf "${tmp_dir:?}/${input_dir:?}/${package:?}" - if [ "x${dependency_dir}" != "x" ] - then - rm -rf "${tmp_dir:?}/${dependency_dir:?}" - fi -done < "${input_dir}/versions_map" -helm repo index "${output_dir}" diff --git a/packages/apps/Makefile b/packages/apps/Makefile index 8751a048..845f0a92 100644 --- a/packages/apps/Makefile +++ b/packages/apps/Makefile @@ -1,14 +1,12 @@ OUT=../_out/repos/apps -TMP := $(shell mktemp -d) +CHARTS := $(shell find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}') + +include ../../scripts/common-envs.mk repo: - cd .. && ../hack/package_chart.sh apps $(OUT) $(TMP) library + rm -rf "$(OUT)" + helm package -d "$(OUT)" $(CHARTS) --version $(COZYSTACK_VERSION) + helm repo index "$(OUT)" -fix-chartnames: - find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed -i "s/^name: .*/name: $$i/" "$$i/Chart.yaml"; done - -gen-versions-map: fix-chartnames - ../../hack/gen_versions_map.sh - -check-version-map: gen-versions-map - git diff --exit-code -- versions_map +fix-charts: + find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed -i -e "s/^name: .*/name: $$i/" -e "s/^version: .*/version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process/g" "$$i/Chart.yaml"; done diff --git a/packages/apps/bucket/Chart.yaml b/packages/apps/bucket/Chart.yaml index c0c0c0d0..f1c03d81 100644 --- a/packages/apps/bucket/Chart.yaml +++ b/packages/apps/bucket/Chart.yaml @@ -2,24 +2,6 @@ apiVersion: v2 name: bucket description: S3 compatible storage icon: /logos/bucket.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: "0.2.0" diff --git a/packages/apps/clickhouse/Chart.yaml b/packages/apps/clickhouse/Chart.yaml index ed4dd70e..0ff41400 100644 --- a/packages/apps/clickhouse/Chart.yaml +++ b/packages/apps/clickhouse/Chart.yaml @@ -2,24 +2,6 @@ apiVersion: v2 name: clickhouse description: Managed ClickHouse service icon: /logos/clickhouse.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.13.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: "24.9.2" diff --git a/packages/apps/ferretdb/Chart.yaml b/packages/apps/ferretdb/Chart.yaml index 2bba009f..3044103a 100644 --- a/packages/apps/ferretdb/Chart.yaml +++ b/packages/apps/ferretdb/Chart.yaml @@ -2,24 +2,6 @@ apiVersion: v2 name: ferretdb description: Managed FerretDB service icon: /logos/ferretdb.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: 2.4.0 diff --git a/packages/apps/http-cache/Chart.yaml b/packages/apps/http-cache/Chart.yaml index 25c5f061..bbd4f3a2 100644 --- a/packages/apps/http-cache/Chart.yaml +++ b/packages/apps/http-cache/Chart.yaml @@ -2,24 +2,6 @@ apiVersion: v2 name: http-cache description: Layer7 load balancer and caching service icon: /logos/nginx.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.7.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: "1.25.3" diff --git a/packages/apps/kafka/Chart.yaml b/packages/apps/kafka/Chart.yaml index edfea302..6136729b 100644 --- a/packages/apps/kafka/Chart.yaml +++ b/packages/apps/kafka/Chart.yaml @@ -2,24 +2,6 @@ apiVersion: v2 name: kafka description: Managed Kafka service icon: /logos/kafka.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.8.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: "3.7.0" diff --git a/packages/apps/kubernetes/Chart.yaml b/packages/apps/kubernetes/Chart.yaml index 46930bf4..5fc52ff3 100644 --- a/packages/apps/kubernetes/Chart.yaml +++ b/packages/apps/kubernetes/Chart.yaml @@ -2,24 +2,6 @@ apiVersion: v2 name: kubernetes description: Managed Kubernetes service icon: /logos/kubernetes.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.29.2 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: 1.32.6 diff --git a/packages/apps/mysql/Chart.yaml b/packages/apps/mysql/Chart.yaml index 5ef7501a..f9cedb1b 100644 --- a/packages/apps/mysql/Chart.yaml +++ b/packages/apps/mysql/Chart.yaml @@ -2,24 +2,6 @@ apiVersion: v2 name: mysql description: Managed MariaDB service icon: /logos/mariadb.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.10.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: "11.0.2" diff --git a/packages/apps/nats/Chart.yaml b/packages/apps/nats/Chart.yaml index fecf2a6d..419b6183 100644 --- a/packages/apps/nats/Chart.yaml +++ b/packages/apps/nats/Chart.yaml @@ -2,24 +2,6 @@ apiVersion: v2 name: nats description: Managed NATS service icon: /logos/nats.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.9.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: "1.4.1" diff --git a/packages/apps/postgres/Chart.yaml b/packages/apps/postgres/Chart.yaml index 5cf92358..9c1cd00b 100644 --- a/packages/apps/postgres/Chart.yaml +++ b/packages/apps/postgres/Chart.yaml @@ -2,24 +2,6 @@ apiVersion: v2 name: postgres description: Managed PostgreSQL service icon: /logos/postgres.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.18.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: "16.2" diff --git a/packages/apps/rabbitmq/Chart.yaml b/packages/apps/rabbitmq/Chart.yaml index 3bacee79..13500669 100644 --- a/packages/apps/rabbitmq/Chart.yaml +++ b/packages/apps/rabbitmq/Chart.yaml @@ -2,24 +2,6 @@ apiVersion: v2 name: rabbitmq description: Managed RabbitMQ service icon: /logos/rabbitmq.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.9.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: "3.13.2" diff --git a/packages/apps/redis/Chart.yaml b/packages/apps/redis/Chart.yaml index 6aa59e8e..8e237b25 100644 --- a/packages/apps/redis/Chart.yaml +++ b/packages/apps/redis/Chart.yaml @@ -2,24 +2,6 @@ apiVersion: v2 name: redis description: Managed Redis service icon: /logos/redis.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.10.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: "6.2.6" diff --git a/packages/apps/tcp-balancer/Chart.yaml b/packages/apps/tcp-balancer/Chart.yaml index 9ada1e60..a65c69e7 100644 --- a/packages/apps/tcp-balancer/Chart.yaml +++ b/packages/apps/tcp-balancer/Chart.yaml @@ -2,24 +2,6 @@ apiVersion: v2 name: tcp-balancer description: Layer4 load balancer service icon: /logos/haproxy.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.6.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: "2.9.7" diff --git a/packages/apps/tenant/Chart.yaml b/packages/apps/tenant/Chart.yaml index ca48d19f..47635918 100644 --- a/packages/apps/tenant/Chart.yaml +++ b/packages/apps/tenant/Chart.yaml @@ -2,6 +2,5 @@ apiVersion: v2 name: tenant description: Separated tenant namespace icon: /logos/tenant.svg - type: application -version: 1.14.1 +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process diff --git a/packages/apps/tenant/templates/ingress.yaml b/packages/apps/tenant/templates/ingress.yaml index c42f3d95..80a14cd3 100644 --- a/packages/apps/tenant/templates/ingress.yaml +++ b/packages/apps/tenant/templates/ingress.yaml @@ -17,7 +17,7 @@ spec: kind: HelmRepository name: cozystack-extra namespace: cozy-public - version: "*" + version: '>= 0.0.0-0' interval: 1m0s timeout: 5m0s upgrade: diff --git a/packages/apps/versions_map b/packages/apps/versions_map deleted file mode 100644 index 87fecd01..00000000 --- a/packages/apps/versions_map +++ /dev/null @@ -1,196 +0,0 @@ -bucket 0.1.0 632224a3 -bucket 0.2.0 HEAD -clickhouse 0.1.0 f7eaab0a -clickhouse 0.2.0 53f2365e -clickhouse 0.2.1 dfbc210b -clickhouse 0.3.0 6c5cf5bf -clickhouse 0.4.0 b40e1b09 -clickhouse 0.5.0 0f312d5c -clickhouse 0.6.0 1ec10165 -clickhouse 0.6.1 c62a83a7 -clickhouse 0.6.2 8267072d -clickhouse 0.7.0 93bdf411 -clickhouse 0.9.0 6130f43d -clickhouse 0.9.2 632224a3 -clickhouse 0.10.0 6358fd7a -clickhouse 0.10.1 4369b031 -clickhouse 0.11.0 08cb7c0f -clickhouse 0.11.1 0e47e1e8 -clickhouse 0.12.0 c02a3818 -clickhouse 0.13.0 53fbe7c2 -clickhouse 0.13.1 HEAD -ferretdb 0.1.0 e9716091 -ferretdb 0.1.1 91b0499a -ferretdb 0.2.0 6c5cf5bf -ferretdb 0.3.0 b8e33d19 -ferretdb 0.4.0 b40e1b09 -ferretdb 0.4.1 1ec10165 -ferretdb 0.4.2 8267072d -ferretdb 0.5.0 93bdf411 -ferretdb 0.6.0 6130f43d -ferretdb 0.6.1 632224a3 -ferretdb 0.7.0 62cb694d -ferretdb 0.7.1 4369b031 -ferretdb 0.8.0 08cb7c0f -ferretdb 1.0.0 c02a3818 -ferretdb 1.1.0 HEAD -http-cache 0.1.0 263e47be -http-cache 0.2.0 53f2365e -http-cache 0.3.0 6c5cf5bf -http-cache 0.3.1 0f312d5c -http-cache 0.4.0 93bdf411 -http-cache 0.5.0 6130f43d -http-cache 0.5.1 62cb694d -http-cache 0.5.2 4369b031 -http-cache 0.6.0 08cb7c0f -http-cache 0.6.1 c02a3818 -http-cache 0.7.0 HEAD -kafka 0.1.0 f7eaab0a -kafka 0.2.0 c0685f43 -kafka 0.2.1 dfbc210b -kafka 0.2.2 e9716091 -kafka 0.2.3 91b0499a -kafka 0.3.0 6c5cf5bf -kafka 0.3.1 c62a83a7 -kafka 0.3.2 93c46161 -kafka 0.3.3 8267072d -kafka 0.4.0 85ec09b8 -kafka 0.5.0 93bdf411 -kafka 0.6.0 6130f43d -kafka 0.6.1 632224a3 -kafka 0.7.0 6358fd7a -kafka 0.7.1 4369b031 -kafka 0.8.0 08cb7c0f -kafka 0.8.1 HEAD -kubernetes 0.24.0 62cb694d -kubernetes 0.25.0 70f82667 -kubernetes 0.25.1 acd4663a -kubernetes 0.25.2 08cb7c0f -kubernetes 0.26.0 9584e5f5 -kubernetes 0.26.1 0e47e1e8 -kubernetes 0.26.2 8ddbe32e -kubernetes 0.26.3 c02a3818 -kubernetes 0.27.0 6cd5e746 -kubernetes 0.28.0 7f477eec -kubernetes 0.29.0 87b23161 -kubernetes 0.29.1 53fbe7c2 -kubernetes 0.29.2 HEAD -mysql 0.1.0 263e47be -mysql 0.2.0 c24a103f -mysql 0.3.0 53f2365e -mysql 0.4.0 6c5cf5bf -mysql 0.5.0 b40e1b09 -mysql 0.5.1 0f312d5c -mysql 0.5.2 1ec10165 -mysql 0.5.3 8267072d -mysql 0.6.0 93bdf411 -mysql 0.7.0 6130f43d -mysql 0.7.1 632224a3 -mysql 0.8.0 62cb694d -mysql 0.8.1 4369b031 -mysql 0.9.0 08cb7c0f -mysql 0.9.1 c02a3818 -mysql 0.10.0 53fbe7c2 -mysql 0.10.1 HEAD -nats 0.1.0 e9716091 -nats 0.2.0 6c5cf5bf -nats 0.3.0 78366f19 -nats 0.3.1 c62a83a7 -nats 0.4.0 898374b5 -nats 0.4.1 8267072d -nats 0.5.0 93bdf411 -nats 0.6.0 6130f43d -nats 0.6.1 632224a3 -nats 0.7.0 62cb694d -nats 0.7.1 4369b031 -nats 0.8.0 08cb7c0f -nats 0.8.1 c02a3818 -nats 0.9.0 HEAD -postgres 0.1.0 263e47be -postgres 0.2.0 53f2365e -postgres 0.2.1 d7cfa53c -postgres 0.3.0 dfbc210b -postgres 0.4.0 e9716091 -postgres 0.4.1 91b0499a -postgres 0.5.0 6c5cf5bf -postgres 0.6.0 b40e1b09 -postgres 0.6.2 0f312d5c -postgres 0.7.0 4b90bf5a -postgres 0.7.1 1ec10165 -postgres 0.8.0 4e68e65c -postgres 0.9.0 8267072d -postgres 0.10.0 721c12a7 -postgres 0.10.1 93bdf411 -postgres 0.11.0 f9f8bb2f -postgres 0.12.0 6130f43d -postgres 0.12.1 632224a3 -postgres 0.14.0 62cb694d -postgres 0.15.1 4369b031 -postgres 0.16.0 70f82667 -postgres 0.17.0 acd4663a -postgres 0.17.1 08cb7c0f -postgres 0.17.3 c02a3818 -postgres 0.18.0 53fbe7c2 -postgres 0.18.1 HEAD -rabbitmq 0.1.0 263e47be -rabbitmq 0.2.0 53f2365e -rabbitmq 0.3.0 6c5cf5bf -rabbitmq 0.4.0 b40e1b09 -rabbitmq 0.4.1 1128d0cb -rabbitmq 0.4.2 4b90bf5a -rabbitmq 0.4.3 1ec10165 -rabbitmq 0.4.4 8267072d -rabbitmq 0.5.0 93bdf411 -rabbitmq 0.6.0 632224a3 -rabbitmq 0.7.0 62cb694d -rabbitmq 0.7.1 4369b031 -rabbitmq 0.8.0 08cb7c0f -rabbitmq 0.8.1 c02a3818 -rabbitmq 0.9.0 HEAD -redis 0.1.1 263e47be -redis 0.2.0 53f2365e -redis 0.3.0 6c5cf5bf -redis 0.3.1 c62a83a7 -redis 0.4.0 84f3ccc0 -redis 0.5.0 4e68e65c -redis 0.6.0 93bdf411 -redis 0.7.0 6130f43d -redis 0.7.1 632224a3 -redis 0.8.0 62cb694d -redis 0.8.1 4369b031 -redis 0.9.0 08cb7c0f -redis 0.9.1 c02a3818 -redis 0.10.0 HEAD -tcp-balancer 0.1.0 263e47be -tcp-balancer 0.2.0 53f2365e -tcp-balancer 0.3.0 93bdf411 -tcp-balancer 0.4.0 6130f43d -tcp-balancer 0.4.1 62cb694d -tcp-balancer 0.4.2 4369b031 -tcp-balancer 0.5.0 08cb7c0f -tcp-balancer 0.5.1 c02a3818 -tcp-balancer 0.6.0 HEAD -tenant 1.13.0 8f1975d1 -tenant 1.14.0 53fbe7c2 -tenant 1.14.1 HEAD -virtual-machine 0.14.0 HEAD -vm-disk 0.1.0 d971f2ff -vm-disk 0.1.1 6130f43d -vm-disk 0.1.2 632224a3 -vm-disk 0.2.0 4369b031 -vm-disk 0.3.0 c02a3818 -vm-disk 0.4.0 HEAD -vm-instance 0.12.0 HEAD -vpn 0.1.0 263e47be -vpn 0.2.0 53f2365e -vpn 0.3.0 6c5cf5bf -vpn 0.3.1 1ec10165 -vpn 0.4.0 93bdf411 -vpn 0.5.0 6130f43d -vpn 0.5.1 632224a3 -vpn 0.6.1 62cb694d -vpn 0.6.2 4369b031 -vpn 0.7.0 08cb7c0f -vpn 0.7.1 c02a3818 -vpn 0.8.0 53fbe7c2 -vpn 0.8.1 HEAD diff --git a/packages/apps/virtual-machine/Chart.yaml b/packages/apps/virtual-machine/Chart.yaml index a282fdba..7067744b 100644 --- a/packages/apps/virtual-machine/Chart.yaml +++ b/packages/apps/virtual-machine/Chart.yaml @@ -1,26 +1,7 @@ apiVersion: v2 -#name: Virtual Machine name: virtual-machine description: Virtual Machine (simple) icon: /logos/vm.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.14.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: 0.14.0 diff --git a/packages/apps/vm-disk/Chart.yaml b/packages/apps/vm-disk/Chart.yaml index 7f35ab60..fcdd9352 100644 --- a/packages/apps/vm-disk/Chart.yaml +++ b/packages/apps/vm-disk/Chart.yaml @@ -2,24 +2,6 @@ apiVersion: v2 name: vm-disk description: Virtual Machine disk icon: /logos/disk.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.4.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: 0.4.0 diff --git a/packages/apps/vm-instance/Chart.yaml b/packages/apps/vm-instance/Chart.yaml index bf86d22d..0764bed6 100644 --- a/packages/apps/vm-instance/Chart.yaml +++ b/packages/apps/vm-instance/Chart.yaml @@ -1,26 +1,7 @@ apiVersion: v2 -#name: Virtual Machine name: vm-instance description: Virtual machine instance icon: /logos/vmi.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.12.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: 0.12.0 diff --git a/packages/apps/vpn/Chart.yaml b/packages/apps/vpn/Chart.yaml index 62afad45..097794c0 100644 --- a/packages/apps/vpn/Chart.yaml +++ b/packages/apps/vpn/Chart.yaml @@ -2,24 +2,6 @@ apiVersion: v2 name: vpn description: Managed VPN service icon: /logos/outline.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.8.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: "1.8.1" diff --git a/packages/core/installer/images/cozystack/Dockerfile b/packages/core/installer/images/cozystack/Dockerfile index a7e910b7..a268c401 100644 --- a/packages/core/installer/images/cozystack/Dockerfile +++ b/packages/core/installer/images/cozystack/Dockerfile @@ -40,7 +40,6 @@ COPY --from=builder /src/scripts /cozystack/scripts COPY --from=builder /src/packages/core /cozystack/packages/core COPY --from=builder /src/packages/system /cozystack/packages/system COPY --from=builder /src/_out/repos /cozystack/assets/repos -COPY --from=builder /src/_out/logos /cozystack/assets/logos COPY --from=builder /cozystack-assets-server /usr/bin/cozystack-assets-server COPY --from=k8s-await-election-builder /k8s-await-election /usr/bin/k8s-await-election COPY --from=builder /src/dashboards /cozystack/assets/dashboards diff --git a/packages/extra/Makefile b/packages/extra/Makefile index e05e4985..5872855b 100644 --- a/packages/extra/Makefile +++ b/packages/extra/Makefile @@ -1,14 +1,12 @@ -OUT=../_out/repos/extra -TMP := $(shell mktemp -d) +OUT=../../_out/repos/extra +CHARTS := $(shell find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}') + +include ../../scripts/common-envs.mk repo: - cd .. && ../hack/package_chart.sh extra $(OUT) $(TMP) library + rm -rf "$(OUT)" + helm package -d "$(OUT)" $(CHARTS) --version $(COZYSTACK_VERSION) + helm repo index "$(OUT)" -fix-chartnames: - find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed -i "s/^name: .*/name: $$i/" "$$i/Chart.yaml"; done - -gen-versions-map: fix-chartnames - ../../hack/gen_versions_map.sh - -check-version-map: gen-versions-map - git diff --exit-code -- versions_map +fix-charts: + find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed -i -e "s/^name: .*/name: $$i/" -e "s/^version: .*/version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process/g" "$$i/Chart.yaml"; done diff --git a/packages/extra/bootbox/Chart.yaml b/packages/extra/bootbox/Chart.yaml index 01f4744d..00b591c4 100644 --- a/packages/extra/bootbox/Chart.yaml +++ b/packages/extra/bootbox/Chart.yaml @@ -3,4 +3,4 @@ name: bootbox description: PXE hardware provisioning icon: /logos/bootbox.svg type: application -version: 0.3.0 +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process diff --git a/packages/extra/etcd/Chart.yaml b/packages/extra/etcd/Chart.yaml index 6e5f5358..48900d42 100644 --- a/packages/extra/etcd/Chart.yaml +++ b/packages/extra/etcd/Chart.yaml @@ -3,4 +3,4 @@ name: etcd description: Storage for Kubernetes clusters icon: /logos/etcd.svg type: application -version: 2.10.1 +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process diff --git a/packages/extra/info/Chart.yaml b/packages/extra/info/Chart.yaml index 08df0dce..ad222011 100644 --- a/packages/extra/info/Chart.yaml +++ b/packages/extra/info/Chart.yaml @@ -3,4 +3,4 @@ name: info description: Info icon: /logos/info.svg type: application -version: 1.2.1 +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process diff --git a/packages/extra/ingress/Chart.yaml b/packages/extra/ingress/Chart.yaml index 3dbb396b..193d881d 100644 --- a/packages/extra/ingress/Chart.yaml +++ b/packages/extra/ingress/Chart.yaml @@ -3,4 +3,4 @@ name: ingress description: NGINX Ingress Controller icon: /logos/ingress-nginx.svg type: application -version: 1.9.0 +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process diff --git a/packages/extra/monitoring/Chart.yaml b/packages/extra/monitoring/Chart.yaml index 154eb6a7..2db12ec5 100644 --- a/packages/extra/monitoring/Chart.yaml +++ b/packages/extra/monitoring/Chart.yaml @@ -3,4 +3,4 @@ name: monitoring description: Monitoring and observability stack icon: /logos/monitoring.svg type: application -version: 1.13.2 +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process diff --git a/packages/extra/seaweedfs/Chart.yaml b/packages/extra/seaweedfs/Chart.yaml index b39b8a34..03754568 100644 --- a/packages/extra/seaweedfs/Chart.yaml +++ b/packages/extra/seaweedfs/Chart.yaml @@ -2,24 +2,6 @@ apiVersion: v2 name: seaweedfs description: Seaweedfs icon: /logos/seaweedfs.svg - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.7.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: "3.71" diff --git a/packages/extra/versions_map b/packages/extra/versions_map deleted file mode 100644 index 6ffb37b2..00000000 --- a/packages/extra/versions_map +++ /dev/null @@ -1,71 +0,0 @@ -bootbox 0.1.0 45a7416c -bootbox 0.1.1 632224a3 -bootbox 0.2.0 c02a3818 -bootbox 0.3.0 HEAD -etcd 1.0.0 ca79f725 -etcd 2.0.0 c0685f43 -etcd 2.0.1 007d414f -etcd 2.1.0 25221fdc -etcd 2.2.0 71514249 -etcd 2.3.0 fde4bcfa -etcd 2.4.0 af48519d -etcd 2.5.0 24fa7222 -etcd 2.6.0 8c460528 -etcd 2.6.1 45a7416c -etcd 2.7.0 632224a3 -etcd 2.8.0 4369b031 -etcd 2.9.0 8ddbe32e -etcd 2.9.1 c02a3818 -etcd 2.10.0 7f477eec -etcd 2.10.1 HEAD -info 1.0.0 93bdf411 -info 1.0.1 632224a3 -info 1.1.0 c02a3818 -info 1.2.0 53fbe7c2 -info 1.2.1 HEAD -ingress 1.0.0 d7cfa53c -ingress 1.1.0 5bbc488e -ingress 1.2.0 28fca4ef -ingress 1.3.0 fde4bcfa -ingress 1.4.0 fd240701 -ingress 1.5.0 93bdf411 -ingress 1.6.0 632224a3 -ingress 1.7.0 c02a3818 -ingress 1.8.0 8f1975d1 -ingress 1.9.0 HEAD -monitoring 1.0.0 d7cfa53c -monitoring 1.1.0 25221fdc -monitoring 1.2.0 f81be075 -monitoring 1.2.1 71514249 -monitoring 1.3.0 6c5cf5bf -monitoring 1.4.0 0f312d5c -monitoring 1.5.0 b8949304 -monitoring 1.5.1 c62a83a7 -monitoring 1.5.2 e44bece1 -monitoring 1.5.3 fde4bcfa -monitoring 1.5.4 d4634797 -monitoring 1.6.0 cb7b8158 -monitoring 1.6.1 4e68e65c -monitoring 1.7.0 2a976afe -monitoring 1.8.0 8c460528 -monitoring 1.8.1 8267072d -monitoring 1.9.0 45a7416c -monitoring 1.9.1 fd240701 -monitoring 1.9.2 f9f8bb2f -monitoring 1.10.0 632224a3 -monitoring 1.10.1 8c86905b -monitoring 1.11.0 4369b031 -monitoring 1.12.0 0e47e1e8 -monitoring 1.12.1 c02a3818 -monitoring 1.13.0 87b23161 -monitoring 1.13.1 53fbe7c2 -monitoring 1.13.2 HEAD -seaweedfs 0.1.0 71514249 -seaweedfs 0.2.0 5fb9cfe3 -seaweedfs 0.2.1 fde4bcfa -seaweedfs 0.3.0 45a7416c -seaweedfs 0.4.0 632224a3 -seaweedfs 0.4.1 8c86905b -seaweedfs 0.5.0 9584e5f5 -seaweedfs 0.6.0 8f1975d1 -seaweedfs 0.7.0 HEAD diff --git a/packages/library/Makefile b/packages/library/Makefile index 42651d03..da811e7e 100644 --- a/packages/library/Makefile +++ b/packages/library/Makefile @@ -1,8 +1,12 @@ -OUT=../_out/repos/library -TMP := $(shell mktemp -d) +OUT=../../_out/repos/library +CHARTS := $(shell find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}') + +include ../../scripts/common-envs.mk repo: - cd .. && ../hack/package_chart.sh library $(OUT) $(TMP) + rm -rf "$(OUT)" + helm package -d "$(OUT)" $(CHARTS) --version $(COZYSTACK_VERSION) + helm repo index "$(OUT)" -fix-chartnames: - find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed -i "s/^name: .*/name: $$i/" "$$i/Chart.yaml"; done +fix-charts: + find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed -i -e "s/^name: .*/name: $$i/" -e "s/^version: .*/version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process/g" "$$i/Chart.yaml"; done diff --git a/packages/library/cozy-lib/Chart.yaml b/packages/library/cozy-lib/Chart.yaml index 6aa01a14..0cda13e5 100644 --- a/packages/library/cozy-lib/Chart.yaml +++ b/packages/library/cozy-lib/Chart.yaml @@ -1,18 +1,5 @@ apiVersion: v2 name: cozy-lib description: Common Cozystack templates - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: library - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.3.0 +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process diff --git a/packages/system/Makefile b/packages/system/Makefile index 2031c3a0..2104647b 100644 --- a/packages/system/Makefile +++ b/packages/system/Makefile @@ -1,12 +1,12 @@ OUT=../../_out/repos/system +CHARTS := $(shell find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}') include ../../scripts/common-envs.mk repo: rm -rf "$(OUT)" - mkdir -p "$(OUT)" - helm package -d "$(OUT)" $$(find . -mindepth 2 -maxdepth 2 -name Chart.yaml | awk 'sub("/Chart.yaml", "")') --version $(COZYSTACK_VERSION) + helm package -d "$(OUT)" $(CHARTS) --version $(COZYSTACK_VERSION) cd "$(OUT)" && helm repo index . -fix-chartnames: - find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed -i "s/^name: .*/name: cozy-$$i/" "$$i/Chart.yaml"; done +fix-charts: + find . -maxdepth 2 -name Chart.yaml | awk -F/ '{print $$2}' | while read i; do sed -i -e "s/^name: .*/name: cozy-$$i/" -e "s/^version: .*/version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process/g" "$$i/Chart.yaml"; done diff --git a/packages/system/bootbox/templates/bootbox.yaml b/packages/system/bootbox/templates/bootbox.yaml index 7e7eb660..496e42e5 100644 --- a/packages/system/bootbox/templates/bootbox.yaml +++ b/packages/system/bootbox/templates/bootbox.yaml @@ -16,6 +16,6 @@ spec: kind: HelmRepository name: cozystack-extra namespace: cozy-public - version: '*' + version: '>= 0.0.0-0' interval: 1m0s timeout: 5m0s diff --git a/packages/system/etcd-operator/Chart.yaml b/packages/system/etcd-operator/Chart.yaml index b6483c15..e0ce7207 100644 --- a/packages/system/etcd-operator/Chart.yaml +++ b/packages/system/etcd-operator/Chart.yaml @@ -1,2 +1,2 @@ name: cozy-etcd-operator -version: 0.4.0 +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process diff --git a/packages/system/hetzner-robotlb/Chart.yaml b/packages/system/hetzner-robotlb/Chart.yaml index 5abfad98..15b72a32 100644 --- a/packages/system/hetzner-robotlb/Chart.yaml +++ b/packages/system/hetzner-robotlb/Chart.yaml @@ -1,3 +1,3 @@ apiVersion: v2 name: cozy-hetzner-robotlb -version: 0.1.3 # Placeholder, the actual version will be automatically set during the build process +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process diff --git a/packages/system/kubeovn-plunger/Chart.yaml b/packages/system/kubeovn-plunger/Chart.yaml index ce13b1fe..744ef9c0 100644 --- a/packages/system/kubeovn-plunger/Chart.yaml +++ b/packages/system/kubeovn-plunger/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: cozy-kubeovn-plunger description: External monitoring agent for Kube-OVN ovn-central; collects cluster state and exposes metrics/alerts type: application -version: 0.1.0 +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: "1.0.0" diff --git a/packages/system/kubeovn-webhook/Chart.yaml b/packages/system/kubeovn-webhook/Chart.yaml index f2c1e1b0..b8c1f40b 100644 --- a/packages/system/kubeovn-webhook/Chart.yaml +++ b/packages/system/kubeovn-webhook/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: cozy-kubeovn-webhook description: Helm chart for a mutating admission webhook that copies Namespace annotations into Pods type: application -version: 0.1.0 +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process appVersion: "1.0.0" diff --git a/packages/system/volumesnapshot-crd-for-tenant-k8s/Chart.yaml b/packages/system/vsnap-crd/Chart.yaml similarity index 100% rename from packages/system/volumesnapshot-crd-for-tenant-k8s/Chart.yaml rename to packages/system/vsnap-crd/Chart.yaml diff --git a/packages/system/volumesnapshot-crd-for-tenant-k8s/Makefile b/packages/system/vsnap-crd/Makefile similarity index 100% rename from packages/system/volumesnapshot-crd-for-tenant-k8s/Makefile rename to packages/system/vsnap-crd/Makefile diff --git a/packages/system/volumesnapshot-crd-for-tenant-k8s/templates/volumesnapshotclasses.yaml b/packages/system/vsnap-crd/templates/volumesnapshotclasses.yaml similarity index 100% rename from packages/system/volumesnapshot-crd-for-tenant-k8s/templates/volumesnapshotclasses.yaml rename to packages/system/vsnap-crd/templates/volumesnapshotclasses.yaml diff --git a/packages/system/volumesnapshot-crd-for-tenant-k8s/templates/volumesnapshotcontents.yaml b/packages/system/vsnap-crd/templates/volumesnapshotcontents.yaml similarity index 100% rename from packages/system/volumesnapshot-crd-for-tenant-k8s/templates/volumesnapshotcontents.yaml rename to packages/system/vsnap-crd/templates/volumesnapshotcontents.yaml diff --git a/packages/system/volumesnapshot-crd-for-tenant-k8s/templates/volumesnapshots.yaml b/packages/system/vsnap-crd/templates/volumesnapshots.yaml similarity index 100% rename from packages/system/volumesnapshot-crd-for-tenant-k8s/templates/volumesnapshots.yaml rename to packages/system/vsnap-crd/templates/volumesnapshots.yaml diff --git a/pkg/registry/apps/application/rest.go b/pkg/registry/apps/application/rest.go index caa42c0b..d456a12c 100644 --- a/pkg/registry/apps/application/rest.go +++ b/pkg/registry/apps/application/rest.go @@ -968,7 +968,6 @@ func (r *REST) convertHelmReleaseToApplication(hr *helmv2.HelmRelease) (appsv1al APIVersion: "apps.cozystack.io/v1alpha1", Kind: r.kindName, }, - AppVersion: hr.Spec.Chart.Spec.Version, ObjectMeta: metav1.ObjectMeta{ Name: strings.TrimPrefix(hr.Name, r.releaseConfig.Prefix), Namespace: hr.Namespace, @@ -1020,7 +1019,7 @@ func (r *REST) convertApplicationToHelmRelease(app *appsv1alpha1.Application) (* Chart: &helmv2.HelmChartTemplate{ Spec: helmv2.HelmChartTemplateSpec{ Chart: r.releaseConfig.Chart.Name, - Version: app.AppVersion, + Version: ">= 0.0.0-0", ReconcileStrategy: "Revision", SourceRef: helmv2.CrossNamespaceObjectReference{ Kind: r.releaseConfig.Chart.SourceRef.Kind, @@ -1029,6 +1028,12 @@ func (r *REST) convertApplicationToHelmRelease(app *appsv1alpha1.Application) (* }, }, }, + Interval: metav1.Duration{Duration: 5 * time.Minute}, + Upgrade: &helmv2.Upgrade{ + Remediation: &helmv2.UpgradeRemediation{ + Retries: -1, + }, + }, Values: app.Spec, }, }