mirror of
https://github.com/notherealmarco/coredns-deployment.git
synced 2025-05-05 12:32:34 +02:00
Remove support for federation in deploy script (#229)
* remove support for federation in deploy script * remove get node permissions Signed-off-by: Sandeep Rajan <srajan@infoblox.com>
This commit is contained in:
parent
69fc3d9f27
commit
916d90420d
2 changed files with 1 additions and 18 deletions
|
@ -23,23 +23,13 @@ CLUSTER_DOMAIN=cluster.local
|
|||
YAML_TEMPLATE="$DIR/coredns.yaml.sed"
|
||||
STUBDOMAINS=""
|
||||
UPSTREAM=\\/etc\\/resolv\.conf
|
||||
FEDERATIONS=""
|
||||
|
||||
|
||||
# Translates the kube-dns ConfigMap to equivalent CoreDNS Configuration.
|
||||
function translate-kube-dns-configmap {
|
||||
kube-dns-federation-to-coredns
|
||||
kube-dns-upstreamnameserver-to-coredns
|
||||
kube-dns-stubdomains-to-coredns
|
||||
}
|
||||
|
||||
function kube-dns-federation-to-coredns {
|
||||
fed=$(kubectl -n kube-system get configmap kube-dns -ojsonpath='{.data.federations}' 2> /dev/null | jq . | tr -d '":,')
|
||||
if [[ ! -z ${fed} ]]; then
|
||||
FEDERATIONS=$(sed -e '1s/^/federation /' -e 's/^/ /' -e '1i\\' <<< "${fed}") # add federation to the stanza
|
||||
fi
|
||||
}
|
||||
|
||||
function kube-dns-upstreamnameserver-to-coredns {
|
||||
up=$(kubectl -n kube-system get configmap kube-dns -ojsonpath='{.data.upstreamNameservers}' 2> /dev/null | tr -d '[",]')
|
||||
if [[ ! -z ${up} ]]; then
|
||||
|
@ -127,6 +117,5 @@ sed -e "s/CLUSTER_DNS_IP/$CLUSTER_DNS_IP/g" \
|
|||
-e "s/CLUSTER_DOMAIN/$CLUSTER_DOMAIN/g" \
|
||||
-e "s?REVERSE_CIDRS?$REVERSE_CIDRS?g" \
|
||||
-e "s@STUBDOMAINS@${STUBDOMAINS//$orig/$replace}@g" \
|
||||
-e "s@FEDERATIONS@${FEDERATIONS//$orig/$replace}@g" \
|
||||
-e "s/UPSTREAMNAMESERVER/$UPSTREAM/g" \
|
||||
"${YAML_TEMPLATE}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue