-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·30 lines (24 loc) · 962 Bytes
/
install.sh
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
26
27
28
29
30
#!/bin/bash
set -euox pipefail
NAME=$1
echo "Installing to namespace $NAME..."
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
GOPATH=${SCRIPT_DIR}/../../../..
cd ${SCRIPT_DIR}
cd $GOPATH/src/github.com/Peripli/service-broker-proxy-k8s
git checkout -- .
# Add ISTIO environment variables to deployment after "key: sm_password"
sed -i -e "/key: sm_password/r $SCRIPT_DIR/env.yml" charts/service-broker-proxy-k8s/templates/deployment.yaml
helm del --purge $NAME || true
helm install \
--name $NAME \
--namespace $NAME \
--set config.sm.url=${SM_URL} \
--set sm.user=$SM_USER \
--set sm.password=$SM_PASSWORD \
--set image.repository=$HUB/sb-istio-proxy-k8s \
--set image.tag=$TAG \
--set istio.consumer_id=${ISTIO_CONSUMER_ID} \
--set istio.service_name_prefix=${ISTIO_SERVICE_NAME_PREFIX:-istio-} \
--set istio.network_profile=${ISTIO_NETWORK_PROFILE} \
charts/service-broker-proxy-k8s