28 lines
914 B
Bash
Executable File
28 lines
914 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
export HELM_DRIVER=${HELM_DRIVER:-configmap}
|
|
|
|
registry=${CHART_REGISTRY:-oci://registry.brunner.ninja/feedc0de/charts}
|
|
version=${CHART_VERSION:?Set CHART_VERSION to the published chart version}
|
|
namespace=${NAMESPACE:-gramps}
|
|
release=${RELEASE:-gramps}
|
|
project_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
|
|
|
|
helm_args=(
|
|
upgrade --install "${release}" "${registry}/gramps-web"
|
|
--version "${version}"
|
|
--namespace "${namespace}" --create-namespace
|
|
--values "${project_dir}/values-arschrock.yaml"
|
|
--take-ownership --wait --timeout 20m
|
|
)
|
|
|
|
# Never auto-uninstall resources during the initial ownership transfer. Once
|
|
# the parent release exists, normal upgrades may safely roll back to it.
|
|
if helm status "${release}" --namespace "${namespace}" 2>/dev/null \
|
|
| grep -q '^STATUS: deployed$'; then
|
|
helm_args+=(--rollback-on-failure)
|
|
fi
|
|
helm "${helm_args[@]}"
|