#!/bin/bash # # Copyright Istio Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -euo pipefail SINGLE_CLUSTER=0 REVISION="" while (( "$#" )); do case "$1" in --single-cluster) SINGLE_CLUSTER=1 shift ;; --cluster) # No longer does anything, but keep it around to avoid breaking users shift 2 ;; --network) NETWORK=$2 shift 2 ;; --mesh) # No longer does anything, but keep it around to avoid breaking users shift 2 ;; --revision) REVISION=$2 shift 2 ;; -*) echo "Error: Unsupported flag $1" >&2 exit 1 ;; esac done # single-cluster installations may need this gateway to allow VMs to get discovery # for non-single cluster, we add additional topology information SINGLE_CLUSTER="${SINGLE_CLUSTER:-0}" if [[ "${SINGLE_CLUSTER}" -eq 0 ]]; then if [[ -z "${NETWORK:-}" ]]; then echo "Must specify either --single-cluster or --network." exit 1 fi fi # base IOP=$(cat <