mirror of
https://github.com/notherealmarco/coredns-deployment.git
synced 2025-05-05 20:42:33 +02:00
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:
parent
9d3a29d237
commit
56e54e3797
2 changed files with 6 additions and 1 deletions
|
@ -51,6 +51,7 @@ data:
|
||||||
log
|
log
|
||||||
health
|
health
|
||||||
kubernetes CLUSTER_DOMAIN SERVICE_CIDR POD_CIDR
|
kubernetes CLUSTER_DOMAIN SERVICE_CIDR POD_CIDR
|
||||||
|
prometheus :9153
|
||||||
proxy . /etc/resolv.conf
|
proxy . /etc/resolv.conf
|
||||||
cache 30
|
cache 30
|
||||||
}
|
}
|
||||||
|
@ -81,7 +82,7 @@ spec:
|
||||||
operator: "Exists"
|
operator: "Exists"
|
||||||
containers:
|
containers:
|
||||||
- name: coredns
|
- name: coredns
|
||||||
image: coredns/coredns:0.9.10
|
image: coredns/coredns:1.0.0
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
args: [ "-conf", "/etc/coredns/Corefile" ]
|
args: [ "-conf", "/etc/coredns/Corefile" ]
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
|
|
@ -13,5 +13,9 @@ if [[ -z $SERVICE_CIDR ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CLUSTER_DNS_IP=$(kubectl get service --namespace kube-system kube-dns -o jsonpath="{.spec.clusterIP}")
|
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
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue