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

@ -51,6 +51,7 @@ data:
log
health
kubernetes CLUSTER_DOMAIN SERVICE_CIDR POD_CIDR
prometheus :9153
proxy . /etc/resolv.conf
cache 30
}
@ -81,7 +82,7 @@ spec:
operator: "Exists"
containers:
- name: coredns
image: coredns/coredns:0.9.10
image: coredns/coredns:1.0.0
imagePullPolicy: Always
args: [ "-conf", "/etc/coredns/Corefile" ]
volumeMounts:

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