fix indent

This commit is contained in:
Sandeep Rajan
2017-11-16 09:13:13 -05:00
parent 134487191d
commit 939d1b3be9
2 changed files with 36 additions and 36 deletions

View File

@@ -1228,34 +1228,34 @@ function update-prometheus-to-sd-parameters {
fi fi
} }
# Prepares the manifests of coreDNS for k8s addons. # Sets up the manifests of coreDNS for k8s addons.
function setup-coredns-manifest { function setup-coredns-manifest {
local -r coredns_file="${dst_dir}/dns/coredns.yaml" local -r coredns_file="${dst_dir}/dns/coredns.yaml"
mv "${dst_dir}/dns/coredns.yaml.in" "${coredns_file}" mv "${dst_dir}/dns/coredns.yaml.in" "${coredns_file}"
# Replace the salt configurations with variable values. # Replace the salt configurations with variable values.
sed -i -e "s@{{ *pillar\['dns_domain'\] *}}@${DNS_DOMAIN}@g" "${coredns_file}" sed -i -e "s@{{ *pillar\['dns_domain'\] *}}@${DNS_DOMAIN}@g" "${coredns_file}"
sed -i -e "s@{{ *pillar\['dns_server'\] *}}@${DNS_SERVER_IP}@g" "${coredns_file}" sed -i -e "s@{{ *pillar\['dns_server'\] *}}@${DNS_SERVER_IP}@g" "${coredns_file}"
sed -i -e "s@{{ *pillar\['service_cluster_ip_range'\] *}}@${SERVICE_CLUSTER_IP_RANGE}@g" "${coredns_file}" sed -i -e "s@{{ *pillar\['service_cluster_ip_range'\] *}}@${SERVICE_CLUSTER_IP_RANGE}@g" "${coredns_file}"
} }
# Prepares the manifests of kube-dns for k8s addons. # Sets up the manifests of kube-dns for k8s addons.
function setup-kube-dns-manifest { function setup-kube-dns-manifest {
local -r kubedns_file="${dst_dir}/dns/kube-dns.yaml" local -r kubedns_file="${dst_dir}/dns/kube-dns.yaml"
mv "${dst_dir}/dns/kube-dns.yaml.in" "${kubedns_file}" mv "${dst_dir}/dns/kube-dns.yaml.in" "${kubedns_file}"
if [ -n "${CUSTOM_KUBE_DNS_YAML:-}" ]; then if [ -n "${CUSTOM_KUBE_DNS_YAML:-}" ]; then
# Replace with custom GKE kube-dns deployment. # Replace with custom GKE kube-dns deployment.
cat > "${kubedns_file}" <<EOF cat > "${kubedns_file}" <<EOF
$(echo "$CUSTOM_KUBE_DNS_YAML") $(echo "$CUSTOM_KUBE_DNS_YAML")
EOF EOF
update-prometheus-to-sd-parameters ${kubedns_file} update-prometheus-to-sd-parameters ${kubedns_file}
fi fi
# Replace the salt configurations with variable values. # Replace the salt configurations with variable values.
sed -i -e "s@{{ *pillar\['dns_domain'\] *}}@${DNS_DOMAIN}@g" "${kubedns_file}" sed -i -e "s@{{ *pillar\['dns_domain'\] *}}@${DNS_DOMAIN}@g" "${kubedns_file}"
sed -i -e "s@{{ *pillar\['dns_server'\] *}}@${DNS_SERVER_IP}@g" "${kubedns_file}" sed -i -e "s@{{ *pillar\['dns_server'\] *}}@${DNS_SERVER_IP}@g" "${kubedns_file}"
if [[ "${ENABLE_DNS_HORIZONTAL_AUTOSCALER:-}" == "true" ]]; then if [[ "${ENABLE_DNS_HORIZONTAL_AUTOSCALER:-}" == "true" ]]; then
setup-addon-manifests "addons" "dns-horizontal-autoscaler" setup-addon-manifests "addons" "dns-horizontal-autoscaler"
fi fi
} }
# Prepares the manifests of k8s addons, and starts the addon manager. # Prepares the manifests of k8s addons, and starts the addon manager.

View File

@@ -1765,31 +1765,31 @@ function update-prometheus-to-sd-parameters {
# Sets up the manifests of coreDNS for k8s addons. # Sets up the manifests of coreDNS for k8s addons.
function setup-coredns-manifest { function setup-coredns-manifest {
local -r coredns_file="${dst_dir}/dns/coredns.yaml" local -r coredns_file="${dst_dir}/dns/coredns.yaml"
mv "${dst_dir}/dns/coredns.yaml.in" "${coredns_file}" mv "${dst_dir}/dns/coredns.yaml.in" "${coredns_file}"
# Replace the salt configurations with variable values. # Replace the salt configurations with variable values.
sed -i -e "s@{{ *pillar\['dns_domain'\] *}}@${DNS_DOMAIN}@g" "${coredns_file}" sed -i -e "s@{{ *pillar\['dns_domain'\] *}}@${DNS_DOMAIN}@g" "${coredns_file}"
sed -i -e "s@{{ *pillar\['dns_server'\] *}}@${DNS_SERVER_IP}@g" "${coredns_file}" sed -i -e "s@{{ *pillar\['dns_server'\] *}}@${DNS_SERVER_IP}@g" "${coredns_file}"
sed -i -e "s@{{ *pillar\['service_cluster_ip_range'\] *}}@${SERVICE_CLUSTER_IP_RANGE}@g" "${coredns_file}" sed -i -e "s@{{ *pillar\['service_cluster_ip_range'\] *}}@${SERVICE_CLUSTER_IP_RANGE}@g" "${coredns_file}"
} }
# Sets up the manifests of kube-dns for k8s addons. # Sets up the manifests of kube-dns for k8s addons.
function setup-kube-dns-manifest { function setup-kube-dns-manifest {
local -r kubedns_file="${dst_dir}/dns/kube-dns.yaml" local -r kubedns_file="${dst_dir}/dns/kube-dns.yaml"
mv "${dst_dir}/dns/kube-dns.yaml.in" "${kubedns_file}" mv "${dst_dir}/dns/kube-dns.yaml.in" "${kubedns_file}"
if [ -n "${CUSTOM_KUBE_DNS_YAML:-}" ]; then if [ -n "${CUSTOM_KUBE_DNS_YAML:-}" ]; then
# Replace with custom GKE kube-dns deployment. # Replace with custom GKE kube-dns deployment.
cat > "${kubedns_file}" <<EOF cat > "${kubedns_file}" <<EOF
$(echo "$CUSTOM_KUBE_DNS_YAML") $(echo "$CUSTOM_KUBE_DNS_YAML")
EOF EOF
update-prometheus-to-sd-parameters ${kubedns_file} update-prometheus-to-sd-parameters ${kubedns_file}
fi fi
# Replace the salt configurations with variable values. # Replace the salt configurations with variable values.
sed -i -e "s@{{ *pillar\['dns_domain'\] *}}@${DNS_DOMAIN}@g" "${kubedns_file}" sed -i -e "s@{{ *pillar\['dns_domain'\] *}}@${DNS_DOMAIN}@g" "${kubedns_file}"
sed -i -e "s@{{ *pillar\['dns_server'\] *}}@${DNS_SERVER_IP}@g" "${kubedns_file}" sed -i -e "s@{{ *pillar\['dns_server'\] *}}@${DNS_SERVER_IP}@g" "${kubedns_file}"
if [[ "${ENABLE_DNS_HORIZONTAL_AUTOSCALER:-}" == "true" ]]; then if [[ "${ENABLE_DNS_HORIZONTAL_AUTOSCALER:-}" == "true" ]]; then
setup-addon-manifests "addons" "dns-horizontal-autoscaler" setup-addon-manifests "addons" "dns-horizontal-autoscaler"
fi fi
} }
# Prepares the manifests of k8s addons, and starts the addon manager. # Prepares the manifests of k8s addons, and starts the addon manager.