-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathupgrade_fusion.sh.example
executable file
·25 lines (19 loc) · 1.12 KB
/
upgrade_fusion.sh.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bash
# This script helps you keep track of the parameters needed to upgrade a Fusion cluster in Kubernetes
# vs. having to remember all the --values parameters you need to pass
PROVIDER=<PROVIDER>
CLUSTER_NAME=<CLUSTER>
RELEASE=<RELEASE>
NAMESPACE=<NAMESPACE>
CHART_VERSION=<CHART_VERSION>
MY_VALUES="--values ${PROVIDER}_${CLUSTER_NAME}_${RELEASE}_fusion_values.yaml"
# TODO: append more --values <file> args here as needed for your installation
#MY_VALUES="${MY_VALUES} --values ${PROVIDER}_${CLUSTER_NAME}_${RELEASE}_fusion_affinity.yaml"
current_context=$(kubectl config current-context | grep "$CLUSTER_NAME")
if [ "${current_context}" == "" ]; then
echo -e "\nERROR: Current kubeconfig not pointing to the $CLUSTER_NAME cluster!\nPlease update your current config to the correct cluster for upgrading Fusion.\n"
exit 1
fi
helm repo update
echo -e "Upgrading the '$RELEASE' release (Fusion chart: $CHART_VERSION) in the '$NAMESPACE' namespace in the '$CLUSTER_NAME' cluster using values:\n ${MY_VALUES}"
helm upgrade ${RELEASE} "lucidworks/fusion" --namespace "${NAMESPACE}" --version "${CHART_VERSION}" ${MY_VALUES}