feat/update version k8s (#31)

* feat: raise error if kubectl failed

* feat: upgrade to version 1.0.0

* fix: syntax
This commit is contained in:
Tomasz Prus 2017-12-11 15:38:44 +01:00 committed by John Belamaric
parent 9d3a29d237
commit 56e54e3797
2 changed files with 6 additions and 1 deletions

View file

@ -13,5 +13,9 @@ if [[ -z $SERVICE_CIDR ]]; then
fi
CLUSTER_DNS_IP=$(kubectl get service --namespace kube-system kube-dns -o jsonpath="{.spec.clusterIP}")
if [ $? -ne 0 ]; then
>&2 echo "Error! The IP address for DNS service couldn't be determined by kubectl command"
exit 2
fi
sed -e s/CLUSTER_DNS_IP/$CLUSTER_DNS_IP/g -e s/CLUSTER_DOMAIN/$CLUSTER_DOMAIN/g -e s?SERVICE_CIDR?$SERVICE_CIDR?g -e s?POD_CIDR?$POD_CIDR?g $YAML_TEMPLATE