diff --git a/cortex.sh b/cortex.sh index e283e433aa..b94c21711a 100755 --- a/cortex.sh +++ b/cortex.sh @@ -179,7 +179,16 @@ if [ "$arg2" != "cli" ]; then set_aws_credentials fi +function validate_install() { + if [[ $CORTEX_NODE_TYPE == *nano ]] || [[ $CORTEX_NODE_TYPE == *micro ]] || [[ $CORTEX_NODE_TYPE == *small ]] || [[ $CORTEX_NODE_TYPE == *medium ]]; then + echo -e "\nCortex does not support nano, micro, small, or medium instances - please specify a larger instance type" + exit 1 + fi +} + if [ "$arg1" = "install" ] && [ "$arg2" = "" ] && [ "$arg3" = "" ]; then + validate_install + echo echo "○ cluster name: $CORTEX_CLUSTER" echo "○ region: $CORTEX_REGION" diff --git a/dev/uninstall_cortex.sh b/dev/uninstall_cortex.sh index 0634a72d58..d4db8bb724 100755 --- a/dev/uninstall_cortex.sh +++ b/dev/uninstall_cortex.sh @@ -25,5 +25,12 @@ echo "Uninstalling Cortex ..." kubectl delete --ignore-not-found=true namespace istio-system kubectl delete --ignore-not-found=true namespace $CORTEX_NAMESPACE +kubectl delete --ignore-not-found=true -n kube-system deployment cluster-autoscaler +kubectl delete --ignore-not-found=true apiservice v1beta1.metrics.k8s.io +kubectl delete --ignore-not-found=true -n kube-system deployment metrics-server +kubectl delete --ignore-not-found=true -n kube-system service metrics-server +kubectl delete --ignore-not-found=true -n kube-system daemonset istio-cni-node +kubectl delete --ignore-not-found=true -n kube-system daemonset aws-node +kubectl delete --all crds echo "✓ Uninstalled Cortex" diff --git a/images/istio-citadel/Dockerfile b/images/istio-citadel/Dockerfile index 1b80668054..a9545dafd7 100644 --- a/images/istio-citadel/Dockerfile +++ b/images/istio-citadel/Dockerfile @@ -1 +1 @@ -FROM docker.io/istio/citadel:1.3.0 +FROM docker.io/istio/citadel:1.3.2 diff --git a/images/istio-galley/Dockerfile b/images/istio-galley/Dockerfile index bfa7fcb396..cd6472ecd8 100644 --- a/images/istio-galley/Dockerfile +++ b/images/istio-galley/Dockerfile @@ -1 +1 @@ -FROM docker.io/istio/galley:1.3.0 +FROM docker.io/istio/galley:1.3.2 diff --git a/images/istio-pilot/Dockerfile b/images/istio-pilot/Dockerfile index 6afc16f13f..a873e7bc1e 100644 --- a/images/istio-pilot/Dockerfile +++ b/images/istio-pilot/Dockerfile @@ -1 +1 @@ -FROM docker.io/istio/pilot:1.3.0 +FROM docker.io/istio/pilot:1.3.2 diff --git a/images/istio-proxy/Dockerfile b/images/istio-proxy/Dockerfile index f025390674..f401ecca13 100644 --- a/images/istio-proxy/Dockerfile +++ b/images/istio-proxy/Dockerfile @@ -1 +1 @@ -FROM docker.io/istio/proxyv2:1.3.0 +FROM docker.io/istio/proxyv2:1.3.2 diff --git a/images/manager/Dockerfile b/images/manager/Dockerfile index 86181ec481..5482ca82d6 100644 --- a/images/manager/Dockerfile +++ b/images/manager/Dockerfile @@ -27,7 +27,7 @@ RUN curl -LO https://get.helm.sh/helm-v2.14.3-linux-amd64.tar.gz && \ rm -rf linux-amd64 && \ rm helm-v2.14.3-linux-amd64.tar.gz -RUN ISTIO_VERSION=1.3.0 && \ +RUN ISTIO_VERSION=1.3.2 && \ curl -L "https://github.com/istio/istio/releases/download/${ISTIO_VERSION}/istio-${ISTIO_VERSION}-linux.tar.gz" | tar xz && \ mkdir ./istio-manifests && \ mv ./istio-${ISTIO_VERSION}/install/kubernetes/helm/* ./istio-manifests/ && \ diff --git a/manager/install_cortex.sh b/manager/install_cortex.sh index 0324330b4a..f93706c055 100755 --- a/manager/install_cortex.sh +++ b/manager/install_cortex.sh @@ -91,7 +91,10 @@ function setup_istio() { echo -n "." helm template istio-manifests/istio-cni --name istio-cni --namespace kube-system | kubectl apply -f - >/dev/null - echo -n "." + until [ "$(kubectl get daemonset istio-cni-node -n kube-system -o 'jsonpath={.status.numberReady}')" == "$(kubectl get daemonset istio-cni-node -n kube-system -o 'jsonpath={.status.desiredNumberScheduled}')" ]; do + echo -n "." + sleep 5 + done envsubst < manifests/istio-values.yaml | helm template istio-manifests/istio --values - --name istio --namespace istio-system | kubectl apply -f - >/dev/null } @@ -172,9 +175,6 @@ function validate_cortex() { eksctl utils write-kubeconfig --name=$CORTEX_CLUSTER --region=$CORTEX_REGION | grep -v "saved kubeconfig as" | grep -v "using region" || true -# https://docs.aws.amazon.com/eks/latest/userguide/cni-upgrades.html -kubectl apply -f https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/v1.5.3/config/v1.5/aws-k8s-cni.yaml >/dev/null - setup_bucket setup_cloudwatch_logs @@ -185,6 +185,12 @@ setup_secrets echo "✓ Updated cluster configuration" echo -en "○ Configuring networking " +# https://docs.aws.amazon.com/eks/latest/userguide/cni-upgrades.html +kubectl apply -f https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/v1.5.4/config/v1.5/aws-k8s-cni.yaml >/dev/null +until [ "$(kubectl get daemonset aws-node -n kube-system -o 'jsonpath={.status.updatedNumberScheduled}')" == "$(kubectl get daemonset aws-node -n kube-system -o 'jsonpath={.status.desiredNumberScheduled}')" ]; do + echo -n "." + sleep 5 +done setup_istio envsubst < manifests/apis.yaml | kubectl apply -f - >/dev/null echo -e "\n✓ Configured networking"