2020-07-14 15:58:14 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
|
2021-04-16 09:41:13 +00:00
|
|
|
export ISTIO_VERSION=1.9.3
|
2020-07-14 15:58:14 +00:00
|
|
|
|
2021-04-20 10:49:29 +00:00
|
|
|
rm -rf istio
|
|
|
|
curl -sL "https://github.com/istio/istio/releases/download/${ISTIO_VERSION}/istio-${ISTIO_VERSION}-linux-amd64.tar.gz" | tar xz
|
|
|
|
mv istio-${ISTIO_VERSION} istio
|
2020-07-14 15:58:14 +00:00
|
|
|
|
2021-04-20 10:49:29 +00:00
|
|
|
# remove unused old telemetry filters
|
|
|
|
rm -f istio/manifests/charts/istio-control/istio-discovery/templates/telemetryv2_1.[678].yaml
|
2020-07-14 15:58:14 +00:00
|
|
|
|
2021-04-20 10:49:29 +00:00
|
|
|
# Patch
|
|
|
|
patch -p0 -i zdt.patch --no-backup-if-mismatch
|
2020-11-24 14:44:57 +00:00
|
|
|
|
2021-04-20 10:49:29 +00:00
|
|
|
### Create kubezero istio charts
|
2020-11-21 12:24:57 +00:00
|
|
|
|
2021-04-20 10:49:29 +00:00
|
|
|
# remove previous charts
|
|
|
|
rm -rf charts/base charts/istio-*
|
|
|
|
|
|
|
|
# create istio main chart
|
|
|
|
cp -r istio/manifests/charts/base charts/
|
|
|
|
cp -r istio/manifests/charts/istio-control/istio-discovery charts/
|
2020-07-14 15:58:14 +00:00
|
|
|
|
2021-04-20 10:49:29 +00:00
|
|
|
# Create ingress charts
|
2020-11-24 14:44:57 +00:00
|
|
|
rm -rf ../kubezero-istio-ingress/charts/istio-*
|
2021-04-20 10:49:29 +00:00
|
|
|
cp -r istio/manifests/charts/gateways/istio-ingress ../kubezero-istio-ingress/charts/
|
|
|
|
cp -r istio/manifests/charts/gateways/istio-ingress ../kubezero-istio-ingress/charts/istio-private-ingress
|
2020-07-22 15:01:36 +00:00
|
|
|
|
2020-11-24 14:44:57 +00:00
|
|
|
# Rename private chart
|
|
|
|
sed -i -e 's/name: istio-ingress/name: istio-private-ingress/' ../kubezero-istio-ingress/charts/istio-private-ingress/Chart.yaml
|
|
|
|
|
|
|
|
# Get matching istioctl
|
2020-11-28 23:01:20 +00:00
|
|
|
[ -x istioctl ] && [ "$(./istioctl version --remote=false)" == $ISTIO_VERSION ] || { curl -sL https://github.com/istio/istio/releases/download/${ISTIO_VERSION}/istioctl-${ISTIO_VERSION}-linux-amd64.tar.gz | tar xz; chmod +x istioctl; }
|