Skip to content

Commit

Permalink
move kube-dns to the cluster/addons/ directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedanese committed Jul 14, 2016
1 parent bea382c commit 95e2e29
Show file tree
Hide file tree
Showing 17 changed files with 13 additions and 16 deletions.
3 changes: 0 additions & 3 deletions build/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -955,9 +955,6 @@ function kube::release::package_kube_manifests_tarball() {
local objects
objects=$(cd "${KUBE_ROOT}/cluster/addons" && find . \( -name \*.yaml -or -name \*.yaml.in -or -name \*.json \) | grep -v demo)
tar c -C "${KUBE_ROOT}/cluster/addons" ${objects} | tar x -C "${dst_dir}"
objects=$(cd "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns" && find . \( -name \*.yaml -or -name \*.yaml.in -or -name \*.json \) | grep -v demo)
mkdir -p "${dst_dir}/dns"
tar c -C "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns" ${objects} | tar x -C "${dst_dir}/dns"

# This is for coreos only. ContainerVM, GCI, or Trusty does not use it.
cp -r "${KUBE_ROOT}/cluster/gce/coreos/kube-manifests"/* "${release_stage}/"
Expand Down
4 changes: 2 additions & 2 deletions build/kube-dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ set:
```

Second, you need to start the DNS server ReplicationController and Service. See
the example files ([ReplicationController](../../cluster/saltbase/salt/skydns-rc.yaml.in) and
[Service](../../cluster/saltbase/salt/skydns-svc.yaml.in)), but keep in mind that these are templated for
the example files ([ReplicationController](../../cluster/addns/dns/skydns-rc.yaml.in) and
[Service](../../cluster/addons/dns/skydns-svc.yaml.in)), but keep in mind that these are templated for
Salt. You will need to replace the `{{ <param> }}` blocks with your own values
for the config variables mentioned above. Other than the templating, these are
normal kubernetes objects, and can be instantiated with `kubectl create`.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ skydns-svc.yaml.in
skydns-rc.yaml.sed
skydns-svc.yaml.sed

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/saltbase/salt/kube-dns/README.md?pixel)]()
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/addons/dns/README.md?pixel)]()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions cluster/images/hyperkube/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ endif
mkdir -p ${TEMP_DIR}/cni ${TEMP_DIR}/addons
cp ../../saltbase/salt/helpers/safe_format_and_mount ${TEMP_DIR}
cp ../../saltbase/salt/generate-cert/make-ca-cert.sh ${TEMP_DIR}
cp ../../saltbase/salt/kube-dns/skydns-rc.yaml.base ${TEMP_DIR}/addons/skydns-rc.yaml
cp ../../saltbase/salt/kube-dns/skydns-svc.yaml.base ${TEMP_DIR}/addons/skydns-svc.yaml
cp ../../addons/dns/skydns-rc.yaml.base ${TEMP_DIR}/addons/skydns-rc.yaml
cp ../../addons/dns/skydns-svc.yaml.base ${TEMP_DIR}/addons/skydns-svc.yaml
cp ../../addons/dashboard/dashboard-controller.yaml ${TEMP_DIR}/addons
cp ../../addons/dashboard/dashboard-service.yaml ${TEMP_DIR}/addons

Expand Down
4 changes: 2 additions & 2 deletions cluster/mesos/docker/deploy-dns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ kubectl="${KUBE_ROOT}/cluster/kubectl.sh"
workspace=$(pwd)

# Process salt pillar templates manually
sed -e "s/{{ pillar\['dns_replicas'\] }}/${DNS_REPLICAS}/g;s/{{ pillar\['dns_domain'\] }}/${DNS_DOMAIN}/g" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in" > "${workspace}/skydns-rc.yaml"
sed -e "s/{{ pillar\['dns_server'\] }}/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in" > "${workspace}/skydns-svc.yaml"
sed -e "s/{{ pillar\['dns_replicas'\] }}/${DNS_REPLICAS}/g;s/{{ pillar\['dns_domain'\] }}/${DNS_DOMAIN}/g" "${KUBE_ROOT}/cluster/addons/dns/skydns-rc.yaml.in" > "${workspace}/skydns-rc.yaml"
sed -e "s/{{ pillar\['dns_server'\] }}/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/addons/dns/skydns-svc.yaml.in" > "${workspace}/skydns-svc.yaml"

# Federation specific values.
if [[ "${FEDERATION:-}" == "true" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions cluster/saltbase/salt/kube-addons/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ addon-dir-create:
{% if pillar.get('enable_cluster_dns', '').lower() == 'true' %}
/etc/kubernetes/addons/dns/skydns-svc.yaml:
file.managed:
- source: salt://kube-dns/skydns-svc.yaml.in
- source: salt://kube-addons/dns/skydns-svc.yaml.in
- template: jinja
- group: root
- dir_mode: 755
- makedirs: True

/etc/kubernetes/addons/dns/skydns-rc.yaml:
file.managed:
- source: salt://kube-dns/skydns-rc.yaml.in
- source: salt://kube-addons/dns/skydns-rc.yaml.in
- template: jinja
- group: root
- dir_mode: 755
Expand Down
4 changes: 2 additions & 2 deletions cluster/ubuntu/deployAddons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ function init {

function deploy_dns {
echo "Deploying DNS on Kubernetes"
sed -e "s/\\\$DNS_REPLICAS/${DNS_REPLICAS}/g;s/\\\$DNS_DOMAIN/${DNS_DOMAIN}/g;" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed" > skydns-rc.yaml
sed -e "s/\\\$DNS_SERVER_IP/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.sed" > skydns-svc.yaml
sed -e "s/\\\$DNS_REPLICAS/${DNS_REPLICAS}/g;s/\\\$DNS_DOMAIN/${DNS_DOMAIN}/g;" "${KUBE_ROOT}/cluster/addons/dns/skydns-rc.yaml.sed" > skydns-rc.yaml
sed -e "s/\\\$DNS_SERVER_IP/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/addons/dns/skydns-svc.yaml.sed" > skydns-svc.yaml

KUBEDNS=`eval "${KUBECTL} get services --namespace=kube-system | grep kube-dns | cat"`

Expand Down
4 changes: 2 additions & 2 deletions hack/local-up-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ function start_kubedns {

if [[ "${ENABLE_CLUSTER_DNS}" = true ]]; then
echo "Creating kube-system namespace"
sed -e "s/{{ pillar\['dns_replicas'\] }}/${DNS_REPLICAS}/g;s/{{ pillar\['dns_domain'\] }}/${DNS_DOMAIN}/g;" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in" >| skydns-rc.yaml
sed -e "s/{{ pillar\['dns_replicas'\] }}/${DNS_REPLICAS}/g;s/{{ pillar\['dns_domain'\] }}/${DNS_DOMAIN}/g;" "${KUBE_ROOT}/cluster/addons/dns/skydns-rc.yaml.in" >| skydns-rc.yaml
if [[ "${FEDERATION:-}" == "true" ]]; then
FEDERATIONS_DOMAIN_MAP="${FEDERATIONS_DOMAIN_MAP:-}"
if [[ -z "${FEDERATIONS_DOMAIN_MAP}" && -n "${FEDERATION_NAME:-}" && -n "${DNS_ZONE_NAME:-}" ]]; then
Expand All @@ -423,7 +423,7 @@ function start_kubedns {
else
sed -i -e "/{{ pillar\['federations_domain_map'\] }}/d" skydns-rc.yaml
fi
sed -e "s/{{ pillar\['dns_server'\] }}/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in" >| skydns-svc.yaml
sed -e "s/{{ pillar\['dns_server'\] }}/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/addons/dns/skydns-svc.yaml.in" >| skydns-svc.yaml
cat <<EOF >namespace.yaml
apiVersion: v1
kind: Namespace
Expand Down

0 comments on commit 95e2e29

Please sign in to comment.