Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Federation] Remove FEDERATIONS_DOMAIN_MAP references #43137

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion cluster/addons/dns/kubedns-controller.yaml.base
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ spec:
- --dns-port=10053
- --config-dir=/kube-dns-config
- --v=2
__PILLAR__FEDERATIONS__DOMAIN__MAP__
env:
- name: PROMETHEUS_PORT
value: "10055"
Expand Down
1 change: 0 additions & 1 deletion cluster/addons/dns/kubedns-controller.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ spec:
- --dns-port=10053
- --config-dir=/kube-dns-config
- --v=2
{{ pillar['federations_domain_map'] }}
env:
- name: PROMETHEUS_PORT
value: "10055"
Expand Down
1 change: 0 additions & 1 deletion cluster/addons/dns/transforms2salt.sed
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
s/__PILLAR__DNS__SERVER__/{{ pillar['dns_server'] }}/g
s/__PILLAR__DNS__DOMAIN__/{{ pillar['dns_domain'] }}/g
s/__PILLAR__FEDERATIONS__DOMAIN__MAP__/{{ pillar['federations_domain_map'] }}/g
s/__MACHINE_GENERATED_WARNING__/Warning: This is a file generated from the base underscore template file: __SOURCE_FILENAME__/g
1 change: 0 additions & 1 deletion cluster/addons/dns/transforms2sed.sed
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
s/__PILLAR__DNS__SERVER__/$DNS_SERVER_IP/g
s/__PILLAR__DNS__DOMAIN__/$DNS_DOMAIN/g
/__PILLAR__FEDERATIONS__DOMAIN__MAP__/d
s/__MACHINE_GENERATED_WARNING__/Warning: This is a file generated from the base underscore template file: __SOURCE_FILENAME__/g
5 changes: 0 additions & 5 deletions cluster/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -868,11 +868,6 @@ EOF
if [[ -n "${FEDERATION:-}" ]]; then
cat >>$file <<EOF
FEDERATION: $(yaml-quote ${FEDERATION})
EOF
fi
if [ -n "${FEDERATIONS_DOMAIN_MAP:-}" ]; then
cat >>$file <<EOF
FEDERATIONS_DOMAIN_MAP: $(yaml-quote ${FEDERATIONS_DOMAIN_MAP})
EOF
fi
if [ -n "${FEDERATION_NAME:-}" ]; then
Expand Down
19 changes: 0 additions & 19 deletions cluster/gce/configure-vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -580,25 +580,6 @@ EOF
cat <<EOF >>/srv/salt-overlay/pillar/cluster-params.sls
enable_cluster_autoscaler: '$(echo "${ENABLE_CLUSTER_AUTOSCALER}" | sed -e "s/'/''/g")'
autoscaler_mig_config: '$(echo "${AUTOSCALER_MIG_CONFIG}" | sed -e "s/'/''/g")'
EOF
fi
if [[ "${FEDERATION:-}" == "true" ]]; then
local federations_domain_map="${FEDERATIONS_DOMAIN_MAP:-}"
if [[ -z "${federations_domain_map}" && -n "${FEDERATION_NAME:-}" && -n "${DNS_ZONE_NAME:-}" ]]; then
federations_domain_map="${FEDERATION_NAME}=${DNS_ZONE_NAME}"
fi
if [[ -n "${federations_domain_map}" ]]; then
cat <<EOF >>/srv/salt-overlay/pillar/cluster-params.sls
federations_domain_map: '$(echo "- --federations=${federations_domain_map}" | sed -e "s/'/''/g")'
EOF
else
cat <<EOF >>/srv/salt-overlay/pillar/cluster-params.sls
federations_domain_map: ''
EOF
fi
else
cat <<EOF >>/srv/salt-overlay/pillar/cluster-params.sls
federations_domain_map: ''
EOF
fi
if [ -n "${SCHEDULING_ALGORITHM_PROVIDER:-}" ]; then
Expand Down
14 changes: 0 additions & 14 deletions cluster/gce/container-linux/configure-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1143,20 +1143,6 @@ function start-kube-addons {
if [[ "${ENABLE_DNS_HORIZONTAL_AUTOSCALER:-}" == "true" ]]; then
setup-addon-manifests "addons" "dns-horizontal-autoscaler"
fi

if [[ "${FEDERATION:-}" == "true" ]]; then
local federations_domain_map="${FEDERATIONS_DOMAIN_MAP:-}"
if [[ -z "${federations_domain_map}" && -n "${FEDERATION_NAME:-}" && -n "${DNS_ZONE_NAME:-}" ]]; then
federations_domain_map="${FEDERATION_NAME}=${DNS_ZONE_NAME}"
fi
if [[ -n "${federations_domain_map}" ]]; then
sed -i -e "s@{{ *pillar\['federations_domain_map'\] *}}@- --federations=${federations_domain_map}@g" "${dns_controller_file}"
else
sed -i -e "/{{ *pillar\['federations_domain_map'\] *}}/d" "${dns_controller_file}"
fi
else
sed -i -e "/{{ *pillar\['federations_domain_map'\] *}}/d" "${dns_controller_file}"
fi
fi
if [[ "${ENABLE_CLUSTER_REGISTRY:-}" == "true" ]]; then
setup-addon-manifests "addons" "registry"
Expand Down
14 changes: 0 additions & 14 deletions cluster/gce/gci/configure-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1370,20 +1370,6 @@ function start-kube-addons {
if [[ "${ENABLE_DNS_HORIZONTAL_AUTOSCALER:-}" == "true" ]]; then
setup-addon-manifests "addons" "dns-horizontal-autoscaler"
fi

if [[ "${FEDERATION:-}" == "true" ]]; then
local federations_domain_map="${FEDERATIONS_DOMAIN_MAP:-}"
if [[ -z "${federations_domain_map}" && -n "${FEDERATION_NAME:-}" && -n "${DNS_ZONE_NAME:-}" ]]; then
federations_domain_map="${FEDERATION_NAME}=${DNS_ZONE_NAME}"
fi
if [[ -n "${federations_domain_map}" ]]; then
sed -i -e "s@{{ *pillar\['federations_domain_map'\] *}}@- --federations=${federations_domain_map}@g" "${dns_controller_file}"
else
sed -i -e "/{{ *pillar\['federations_domain_map'\] *}}/d" "${dns_controller_file}"
fi
else
sed -i -e "/{{ *pillar\['federations_domain_map'\] *}}/d" "${dns_controller_file}"
fi
fi
if [[ "${ENABLE_CLUSTER_REGISTRY:-}" == "true" ]]; then
setup-addon-manifests "addons" "registry"
Expand Down
2 changes: 1 addition & 1 deletion cluster/images/hyperkube/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ ifeq ($(CACHEBUST),1)
endif
cd ${TEMP_DIR} && sed -i.back "s|-amd64|-${ARCH}|g" addons/singlenode/*.yaml addons/multinode/*.yaml
cd ${TEMP_DIR} && sed -i.back "s|__PILLAR__DNS__SERVER__|10.0.0.10|g" addons/singlenode/kubedns*.yaml addons/multinode/kubedns*.yaml
cd ${TEMP_DIR} && sed -i.back "s|__PILLAR__DNS__DOMAIN__|cluster.local|g;s|__PILLAR__FEDERATIONS__DOMAIN__MAP__||g;" addons/singlenode/kubedns*.yaml addons/multinode/kubedns*.yaml
cd ${TEMP_DIR} && sed -i.back "s|__PILLAR__DNS__DOMAIN__|cluster.local|g" addons/singlenode/kubedns*.yaml addons/multinode/kubedns*.yaml
cd ${TEMP_DIR} && rm -f addons/singlenode/*.back addons/multinode/*.back static-pods/*.back

# Make scripts executable before they are copied into the Docker image. If we make them executable later, in another layer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ write_files:
dns_server: 10.246.0.10
dns_domain: cluster.local
enable_dns_horizontal_autoscaler: "false"
federations_domain_map: ''
instance_prefix: kubernetes
admission_control: NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,DefaultStorageClass,ResourceQuota,DefaultTolerationSeconds
enable_cpu_cfs_quota: "true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ elasticsearch_replicas: $ELASTICSEARCH_LOGGING_REPLICAS
enable_cluster_dns: "${ENABLE_CLUSTER_DNS:-false}"
dns_server: $DNS_SERVER_IP
dns_domain: $DNS_DOMAIN
federations_domain_map: ''
e2e_storage_test_environment: "${E2E_STORAGE_TEST_ENVIRONMENT:-false}"
cluster_cidr: "$NODE_IP_RANGES"
allocate_node_cidrs: "${ALLOCATE_NODE_CIDRS:-true}"
Expand Down
1 change: 0 additions & 1 deletion cluster/vagrant/provision-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ elasticsearch_replicas: '$(echo "$ELASTICSEARCH_LOGGING_REPLICAS" | sed -e "s/'/
enable_cluster_dns: '$(echo "$ENABLE_CLUSTER_DNS" | sed -e "s/'/''/g")'
dns_server: '$(echo "$DNS_SERVER_IP" | sed -e "s/'/''/g")'
dns_domain: '$(echo "$DNS_DOMAIN" | sed -e "s/'/''/g")'
federations_domain_map: ''
instance_prefix: '$(echo "$INSTANCE_PREFIX" | sed -e "s/'/''/g")'
admission_control: '$(echo "$ADMISSION_CONTROL" | sed -e "s/'/''/g")'
enable_cpu_cfs_quota: '$(echo "$ENABLE_CPU_CFS_QUOTA" | sed -e "s/'/''/g")'
Expand Down
1 change: 0 additions & 1 deletion cmd/kubeadm/app/phases/addons/manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ spec:
- --dns-port=10053
- --config-dir=/kube-dns-config
- --v=2
# Do we need to set __PILLAR__FEDERATIONS__DOMAIN__MAP__ here?
env:
- name: PROMETHEUS_PORT
value: "10055"
Expand Down
1 change: 0 additions & 1 deletion federation/cluster/federation-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ source "${KUBE_ROOT}/federation/cluster/common.sh"

DNS_ZONE_NAME="${FEDERATION_DNS_ZONE_NAME:-}"
DNS_PROVIDER="${FEDERATION_DNS_PROVIDER:-google-clouddns}"
FEDERATIONS_DOMAIN_MAP="${FEDERATIONS_DOMAIN_MAP:-}"

# get_version returns the version in KUBERNETES_RELEASE or defaults to the
# value in the federation `versions` file.
Expand Down
13 changes: 0 additions & 13 deletions hack/local-up-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -674,19 +674,6 @@ function start_kubedns {
if [[ "${ENABLE_CLUSTER_DNS}" = true ]]; then
echo "Creating kube-system namespace"
sed -e "s/{{ pillar\['dns_domain'\] }}/${DNS_DOMAIN}/g" "${KUBE_ROOT}/cluster/addons/dns/kubedns-controller.yaml.in" >| kubedns-deployment.yaml
if [[ "${FEDERATION:-}" == "true" ]]; then
FEDERATIONS_DOMAIN_MAP="${FEDERATIONS_DOMAIN_MAP:-}"
if [[ -z "${FEDERATIONS_DOMAIN_MAP}" && -n "${FEDERATION_NAME:-}" && -n "${DNS_ZONE_NAME:-}" ]]; then
FEDERATIONS_DOMAIN_MAP="${FEDERATION_NAME}=${DNS_ZONE_NAME}"
fi
if [[ -n "${FEDERATIONS_DOMAIN_MAP}" ]]; then
sed -i -e "s/{{ pillar\['federations_domain_map'\] }}/- --federations=${FEDERATIONS_DOMAIN_MAP}/g" kubedns-deployment.yaml
else
sed -i -e "/{{ pillar\['federations_domain_map'\] }}/d" kubedns-deployment.yaml
fi
else
sed -i -e "/{{ pillar\['federations_domain_map'\] }}/d" kubedns-deployment.yaml
fi
sed -e "s/{{ pillar\['dns_server'\] }}/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/addons/dns/kubedns-svc.yaml.in" >| kubedns-svc.yaml

# TODO update to dns role once we have one.
Expand Down