Files
truecharts/.github/scripts/install_dependencies.sh
T
Kjeld Schouten 4377fa9bfa Update install_dependencies.sh
Signed-off-by: Kjeld Schouten <info@kjeldschouten.nl>
2024-10-19 17:33:52 +02:00

96 lines
3.1 KiB
Bash
Executable File

#!/bin/bash
curr_chart=$1
if [ -z "$curr_chart" ]
then
echo "No chart name provided"
exit 1
fi
echo "Chart name: $curr_chart"
if [[ "$curr_chart" != "charts/system/prometheus-operator" ]]; then
echo "Installing prometheus-operator chart"
helm install prometheus-operator oci://tccr.io/truecharts/prometheus-operator --namespace prometheus-operator --create-namespace --wait
if [[ "$?" != "0" ]]; then
echo "Failed to install prometheus-operator chart"
exit 1
fi
echo "Done installing prometheus-operator chart"
fi
if [[ "$curr_chart" == "charts/premium/volsync" ]]; then
echo "Installing volumesnapshots chart"
helm install volumesnapshots oci://tccr.io/truecharts/volumesnapshots --namespace volumesnapshots --create-namespace --wait
if [[ "$?" != "0" ]]; then
echo "Failed to install volumesnapshots chart"
exit 1
fi
echo "Done installing volumesnapshots chart"
fi
if [[ "$curr_chart" == "charts/premium/metallb-config" ]]; then
echo "Installing metallb chart"
helm install metallb oci://tccr.io/truecharts/metallb --namespace metallb --create-namespace --wait
if [[ "$?" != "0" ]]; then
echo "Failed to install metallb chart"
exit 1
fi
echo "Done installing metallb chart"
fi
if [[ "$curr_chart" == "charts/premium/clusterissuer" ]]; then
echo "Installing cert-manager chart"
helm install cert-manager oci://tccr.io/truecharts/cert-manager --namespace cert-manager --create-namespace --wait
if [[ "$?" != "0" ]]; then
echo "Failed to install cert-manager chart"
exit 1
fi
echo "Done installing cert-manager chart"
fi
if grep -q "cnpg:" "$curr_chart/values.yaml"; then
echo "Installing cloudnative-pg chart"
helm install cloudnative-pg oci://tccr.io/truecharts/cloudnative-pg --namespace cloudnative-pg --create-namespace --wait
if [[ "$?" != "0" ]]; then
echo "Failed to install cloudnative-pg chart"
exit 1
fi
echo "Done installing cloudnative-pg chart"
else
echo "cnpg: not found in $curr_chart/values.yaml, skipping installation."
fi
if [[ "$curr_chart" == "charts/premium/traefik" ]]; then
echo "Installing traefik-crds chart"
helm install traefik oci://tccr.io/truecharts/traefik-crds --wait
if [[ "$?" != "0" ]]; then
echo "Failed to install traefik-crds chart"
fi
echo "Done installing traefik-crds chart"
fi
if [[ "$curr_chart" == "charts/system/intel-device-plugins-operator" ]]; then
echo "Installing cert-manager chart"
helm install cert-manager oci://tccr.io/truecharts/cert-manager --namespace cert-manager --create-namespace --wait
if [[ "$?" != "0" ]]; then
echo "Failed to install cert-manager chart"
exit 1
fi
echo "Done installing cert-manager chart"
fi
if [[ "$curr_chart" == "charts/premium/kubernetes-dashboard" ]]; then
echo "Installing metrics-server chart"
helm install metrics-server oci://tccr.io/truecharts/metrics-server --namespace metrics-server --create-namespace --wait
if [[ "$?" != "0" ]]; then
echo "Failed to install metrics-server chart"
exit 1
fi
echo "Done installing metrics-server chart"
fi