From 916d90420df83ad7d2ab9135a409ea80780af9e0 Mon Sep 17 00:00:00 2001 From: Sandeep Rajan Date: Tue, 16 Jun 2020 10:33:08 -0400 Subject: [PATCH] Remove support for federation in deploy script (#229) * remove support for federation in deploy script * remove get node permissions Signed-off-by: Sandeep Rajan --- kubernetes/coredns.yaml.sed | 8 +------- kubernetes/deploy.sh | 11 ----------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/kubernetes/coredns.yaml.sed b/kubernetes/coredns.yaml.sed index b64725b..4c4067c 100644 --- a/kubernetes/coredns.yaml.sed +++ b/kubernetes/coredns.yaml.sed @@ -21,12 +21,6 @@ rules: verbs: - list - watch -- apiGroups: - - "" - resources: - - nodes - verbs: - - get --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -60,7 +54,7 @@ data: ready kubernetes CLUSTER_DOMAIN REVERSE_CIDRS { fallthrough in-addr.arpa ip6.arpa - }FEDERATIONS + } prometheus :9153 forward . UPSTREAMNAMESERVER cache 30 diff --git a/kubernetes/deploy.sh b/kubernetes/deploy.sh index 73b647f..95d8880 100755 --- a/kubernetes/deploy.sh +++ b/kubernetes/deploy.sh @@ -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}"