-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.sh
executable file
·53 lines (39 loc) · 1.59 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
#############################################################
# Check for input parameters
#############################################################
if [ -z "$INPUT_KUBECONFIG" ]; then
echo "KUBECONFIG input parameter is not set, exiting..."
exit 1
fi
if [ -z "$INPUT_ISTIO_VERSION" ]; then
echo "ISTIO_VERSION input parameter is not set, exiting..."
exit 1
fi
#############################################################
# Create Kubernetes configuration to access the cluster
#############################################################
mkdir ~/.kube
echo "$INPUT_KUBECONFIG" > ~/.kube/config
cat ~/.kube/config
#############################################################
# Sanity check
#############################################################
kubectl get pods --all-namespaces
#############################################################
# Download and install Istio
#############################################################
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=${INPUT_ISTIO_VERSION} sh -
istio-${INPUT_ISTIO_VERSION}/bin/istioctl version
# Disable Kiali and Grafana as it is non-interactive
istio-${INPUT_ISTIO_VERSION}/bin/istioctl manifest apply \
--set profile=${INPUT_ISTIO_PROFILE} \
--set values.kiali.enabled=false \
--set values.grafana.enabled=false \
${INPUT_ISTIO_ARGS}
# Add a delay here so `kubectl wait` below is gated to Istio pods correctly
#sleep 1
# Wait for all Istio pods to become ready
# TODO: This wait might not be needed
#kubectl wait --for=condition=Ready pods --all -n istio-system --timeout=60s
kubectl -n istio-system get pods