mirror of
https://github.com/notherealmarco/coredns-deployment.git
synced 2025-05-05 12:32:34 +02:00
add pod cidrs (#26)
This commit is contained in:
parent
5e6be8673a
commit
f40fd9b5b4
3 changed files with 9 additions and 11 deletions
|
@ -3,15 +3,15 @@
|
|||
# Deploys CoreDNS to a cluster currently running Kube-DNS.
|
||||
|
||||
SERVICE_CIDR=$1
|
||||
CLUSTER_DOMAIN=${2:-cluster.local}
|
||||
YAML_TEMPLATE=${3:-`pwd`/coredns.yaml.sed}
|
||||
YAML=${4:-`pwd`/coredns.yaml}
|
||||
POD_CIDR=$2
|
||||
CLUSTER_DOMAIN=${3:-cluster.local}
|
||||
YAML_TEMPLATE=${4:-`pwd`/coredns.yaml.sed}
|
||||
|
||||
if [[ -z $SERVICE_CIDR ]]; then
|
||||
echo "Usage: $0 SERVICE-CIDR [ CLUSTER-DOMAIN ] [ YAML-TEMPLATE ] [ YAML ]"
|
||||
echo "Usage: $0 SERVICE-CIDR [ POD-CIDR ] [ CLUSTER-DOMAIN ] [ YAML-TEMPLATE ]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CLUSTER_DNS_IP=$(kubectl get service --namespace kube-system kube-dns -o jsonpath="{.spec.clusterIP}")
|
||||
|
||||
sed -e s/CLUSTER_DNS_IP/$CLUSTER_DNS_IP/g -e s/CLUSTER_DOMAIN/$CLUSTER_DOMAIN/g -e s?SERVICE_CIDR?$SERVICE_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