forked from kubevela/catalog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate.sh
55 lines (45 loc) · 2.03 KB
/
update.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
RELEASE_CLUSTER_GATEWAY=v1.4.0
RELEASE_CLUSTER_PROXY=v0.2.2
RELEASE_MANAGED_SERVICE_ACCOUNT=v0.2.0
[email protected]:open-cluster-management-io/cluster-proxy.git
[email protected]:open-cluster-management-io/managed-serviceaccount.git
[email protected]:oam-dev/cluster-gateway.git
set -e -u
BASEDIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
TEMPDIR=$(mktemp -d)
rm -rf "$BASEDIR"/resources
pushd "$TEMPDIR"
# cluster proxy
git clone --branch $RELEASE_CLUSTER_PROXY $REPO_CLUSTER_PROXY
mkdir -p "${BASEDIR}"/resources/cluster-proxy/"${RELEASE_CLUSTER_PROXY}"
pushd cluster-proxy
helm template -n open-cluster-management-addon \
./charts/cluster-proxy/ --output-dir "${BASEDIR}"/resources/cluster-proxy/"${RELEASE_CLUSTER_PROXY}"/ \
--set tag=${RELEASE_CLUSTER_PROXY} \
--set proxyServerImage=quay.io/open-cluster-management/cluster-proxy:$RELEASE_CLUSTER_PROXY \
--set proxyAgentImage=quay.io/open-cluster-management/cluster-proxy:$RELEASE_CLUSTER_PROXY
popd
rm -rf cluster-proxy
# managed service account
git clone --branch $RELEASE_MANAGED_SERVICE_ACCOUNT $REPO_MANAGED_SERVICEACCOUNT
mkdir -p "${BASEDIR}"/resources/managed-serviceaccount/"${RELEASE_MANAGED_SERVICE_ACCOUNT}"
pushd managed-serviceaccount
helm template -n open-cluster-management-addon \
./charts/managed-serviceaccount/ --output-dir "${BASEDIR}"/resources/managed-serviceaccount/"${RELEASE_MANAGED_SERVICE_ACCOUNT}"/ \
--set tag=${RELEASE_MANAGED_SERVICE_ACCOUNT}
popd
rm -rf managed-serviceaccount
# cluster-gateway
git clone --branch $RELEASE_CLUSTER_GATEWAY $REPO_CLUSTER_GATEWAY
mkdir -p "${BASEDIR}"/resources/cluster-gateway/"${RELEASE_CLUSTER_GATEWAY}"
pushd cluster-gateway
helm template -n open-cluster-management-addon \
./charts/addon-manager/ --output-dir "${BASEDIR}"/resources/cluster-gateway/"${RELEASE_CLUSTER_GATEWAY}"/ \
--set tag=${RELEASE_CLUSTER_GATEWAY} \
--set manualSecretManagement=false \
--set konnectivityEgress=true
popd
rm -rf cluster-gateway
popd
rmdir "$TEMPDIR"