2020-07-14 15:58:14 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
|
2020-10-02 17:38:09 +00:00
|
|
|
export ISTIO_VERSION=1.7.3
|
2020-07-14 15:58:14 +00:00
|
|
|
|
2020-10-02 17:38:09 +00:00
|
|
|
if [ ! -d istio-$ISTIO_VERSION ]; then
|
|
|
|
NAME="istio-$ISTIO_VERSION"
|
|
|
|
URL="https://github.com/istio/istio/releases/download/${ISTIO_VERSION}/istio-${ISTIO_VERSION}-linux-amd64.tar.gz"
|
2020-07-14 15:58:14 +00:00
|
|
|
|
2020-10-02 17:38:09 +00:00
|
|
|
curl -sL "$URL" | tar xz
|
|
|
|
fi
|
2020-07-14 15:58:14 +00:00
|
|
|
|
|
|
|
# Now lets extract what we need
|
|
|
|
rm -rf charts/istio-operator
|
2020-07-15 14:21:49 +00:00
|
|
|
cp -r istio-${ISTIO_VERSION}/manifests/charts/istio-operator charts
|
2020-07-14 15:58:14 +00:00
|
|
|
|
2020-07-14 17:01:13 +00:00
|
|
|
# Apply our patch
|
2020-09-11 14:06:38 +00:00
|
|
|
patch -i istio-operator.patch -p0
|
2020-07-22 15:01:36 +00:00
|
|
|
|
2020-10-02 17:38:09 +00:00
|
|
|
[ -x istioctl ] || { curl -sL https://github.com/istio/istio/releases/download/${ISTIO_VERSION}/istioctl-${ISTIO_VERSION}-linux-amd64.tar.gz | tar xz; chmod +x istioctl; }
|
|
|
|
|
2020-07-22 15:01:36 +00:00
|
|
|
# Extract base / CRDs from istioctl into plain manifest to workaround chicken egg problem with CRDs
|
2020-10-02 17:38:09 +00:00
|
|
|
./istioctl manifest generate --set profile=empty --set components.base.enabled=true > templates/istio-base.yaml
|
2020-10-02 17:44:15 +00:00
|
|
|
|
|
|
|
# Remove double CRD
|
|
|
|
patch -i istio-base.patch -p3
|