Skip to content

Commit

Permalink
Switch DNS addons from skydns to kubedns
Browse files Browse the repository at this point in the history
Unified skydns templates using a simple underscore based template and
added transform sed scripts to transform into salt and sed yaml
templates

Moved all content out of cluster/addons/dns into build/kube-dns and
saltbase/salt/kube-dns
  • Loading branch information
Girish Kalele committed May 31, 2016
1 parent 5762ebf commit 4c1047d
Show file tree
Hide file tree
Showing 31 changed files with 450 additions and 1,736 deletions.
3 changes: 3 additions & 0 deletions build/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,9 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ Tim Hockin <[email protected]>


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/addons/dns/MAINTAINERS.md?pixel)]()


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/build/kube-dns/MAINTAINERS.md?pixel)]()
4 changes: 2 additions & 2 deletions build/kube-dns/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Makefile for the Docker image gcr.io/google_containers/kube2sky
# Makefile for the Docker image gcr.io/google_containers/kubedns-<ARCH>
# MAINTAINER: Tim Hockin <[email protected]>
# If you update this image please bump the tag value before pushing.
#
Expand All @@ -22,7 +22,7 @@
# Default registry, arch and tag. This can be overwritten by arguments to make
PLATFORM?=linux
ARCH?=amd64
TAG?=1.1
TAG?=1.2
REGISTRY?=gcr.io/google_containers

GOLANG_VERSION=1.6
Expand Down
File renamed without changes.
23 changes: 13 additions & 10 deletions cluster/addons/dns/README.md → 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](skydns-rc.yaml.in) and
[Service](skydns-svc.yaml.in)), but keep in mind that these are templated for
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
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 Expand Up @@ -217,14 +217,14 @@ If you see that, DNS is working correctly.


## How does it work?
SkyDNS depends on etcd for what to serve, but it doesn't really need all of
<del>SkyDNS depends on etcd for what to serve, but it doesn't really need all of
what etcd offers (at least not in the way we use it). For simplicity, we run
etcd and SkyDNS together in a pod, and we do not try to link etcd instances
across replicas. A helper container called [kube2sky](kube2sky/) also runs in
the pod and acts a bridge between Kubernetes and SkyDNS. It finds the
Kubernetes master through the `kubernetes` service (via environment
variables), pulls service info from the master, and writes that to etcd for
SkyDNS to find.
SkyDNS to find.</del>

## Inheriting DNS from the node
When running a pod, kubelet will prepend the cluster DNS server and search
Expand Down Expand Up @@ -252,11 +252,14 @@ some of those settings will be lost. As a partial workaround, the node can run
entries. You can also use kubelet's `--resolv-conf` flag.

## Making changes
Please observe the release process for making changes to the `kube2sky`
image that is documented in [RELEASES.md](kube2sky/RELEASES.md). Any significant changes
to the YAML template for `kube-dns` should result a bump of the version number
for the `kube-dns` replication controller and well as the `version` label. This
will permit a rolling update of `kube-dns`.
The container containing the kube-dns binary needs to be built for every
architecture and pushed to the registry manually whenever the kube-dns binary
has code changes. Every significant change to the functionality should result
in a bump of the TAG in the Makefile.

Any significant changes to the YAML template for `kube-dns` should result a bump
of the version number for the `kube-dns` replication controller and well as the
`version` label. This will permit a rolling update of `kube-dns`.

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/addons/dns/README.md?pixel)]()

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/build/kube-dns/README.md?pixel)]()
1 change: 0 additions & 1 deletion cluster/addons/dns/kube2sky/.gitignore

This file was deleted.

40 changes: 0 additions & 40 deletions cluster/addons/dns/kube2sky/Changelog

This file was deleted.

86 changes: 0 additions & 86 deletions cluster/addons/dns/kube2sky/Makefile

This file was deleted.

37 changes: 0 additions & 37 deletions cluster/addons/dns/kube2sky/README.md

This file was deleted.

43 changes: 0 additions & 43 deletions cluster/addons/dns/kube2sky/RELEASES.md

This file was deleted.

Loading

0 comments on commit 4c1047d

Please sign in to comment.