Use direct Helm sources for existing Argo applications

This commit is contained in:
2026-10-18 17:19:03 +02:00
parent bd2dcaa30a
commit 7cee092bb8
48 changed files with 441 additions and 460 deletions
+33
View File
@@ -0,0 +1,33 @@
#!/bin/sh
set -eu
if [ "$#" -ne 2 ]; then
echo "usage: $0 APPLICATION CHART_VERSION" >&2
exit 2
fi
application=$1
version=$2
case "$application" in
''|*[!a-z0-9-]*) echo "invalid application name: $application" >&2; exit 2 ;;
esac
case "$version" in
''|*[!0-9A-Za-z.+-]*) echo "invalid chart version: $version" >&2; exit 2 ;;
esac
file="bootstrap/${application}.yaml"
test -f "$file"
tmp=$(mktemp)
trap 'rm -f "$tmp"' EXIT
awk -v version="$version" '
$1 == "chart:" && !chart { chart=1 }
chart && $1 == "targetRevision:" && !updated {
sub(/targetRevision:.*/, "targetRevision: " version)
updated=1
}
{ print }
END { if (!updated) exit 3 }
' "$file" > "$tmp"
mv "$tmp" "$file"
trap - EXIT
-36
View File
@@ -1,36 +0,0 @@
#!/bin/sh
set -eu
if [ "$#" -ne 1 ] || ! printf '%s\n' "$1" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+([+-][0-9A-Za-z.-]+)?$'; then
echo "usage: $0 <semantic-chart-version>" >&2
exit 2
fi
script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
repository_dir=$(dirname -- "${script_dir}")
chart="${repository_dir}/apps/immichframe/Chart.yaml"
temporary="${chart}.tmp"
awk -v version="$1" '
/^- name: immichframe$/ {
dependency = 1
}
dependency && /^ version: / {
if (updated) {
print "multiple immichframe dependency versions found" > "/dev/stderr"
exit 1
}
print " version: " version
updated = 1
dependency = 0
next
}
{ print }
END {
if (!updated) {
print "immichframe dependency version not found" > "/dev/stderr"
exit 1
}
}
' "${chart}" > "${temporary}"
mv "${temporary}" "${chart}"