diff --git a/CHANGELOG.md b/CHANGELOG.md index 59f1e67d05..38dd855537 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -547,7 +547,7 @@ hint to the scheduler; the scheduler will try to satisfy these requests but it does not guarantee they will be satisfied. Both the “hard” and “soft” variants of node affinity use the new syntax. Documentation is [here](http://kubernetes.io/docs/user-guide/node-selection/) (see section “Alpha feature in Kubernetes v1.2: Node Affinity“). Design doc is [here](https://github.com/kubernetes/kubernetes/blob/release-1.2/docs/design/nodeaffinity.md). * A pod can specify its own Hostname and Subdomain via annotations (pod.beta.kubernetes.io/hostname, pod.beta.kubernetes.io/subdomain). If the Subdomain matches the name of a [headless service](http://kubernetes.io/docs/user-guide/services/#headless-services) in the same namespace, a DNS A record is also created for the pod’s FQDN. More -details can be found in the [DNS README](https://github.com/kubernetes/kubernetes/blob/release-1.2/cluster/addons/dns/README.md#a-records-and-hostname-based-on-pod-annotations---a-beta-feature-in-kubernetes-v12). Changes were introduced in PR [#20688](https://github.com/kubernetes/kubernetes/pull/20688). +details can be found in the [DNS README](https://github.com/kubernetes/kubernetes/blob/release-1.2/cluster/saltbase/salt/kube-dns/README.md#a-records-and-hostname-based-on-pod-annotations---a-beta-feature-in-kubernetes-v12). Changes were introduced in PR [#20688](https://github.com/kubernetes/kubernetes/pull/20688). * New SchedulerExtender enables users to implement custom out-of-(the-scheduler)-process scheduling predicates and priority functions, for example to schedule pods based on resources that are not directly managed diff --git a/build/kube-dns/Changelog b/build/kube-dns/Changelog new file mode 100644 index 0000000000..48f268af6c --- /dev/null +++ b/build/kube-dns/Changelog @@ -0,0 +1,2 @@ +## Version 1.2 (Fri May 27 2016 Tim Hockin ) + - First Changelog entry diff --git a/build/kube-dns/MAINTAINERS.md b/build/kube-dns/MAINTAINERS.md index 9756da18d4..8e16d51663 100644 --- a/build/kube-dns/MAINTAINERS.md +++ b/build/kube-dns/MAINTAINERS.md @@ -2,8 +2,4 @@ Tim Hockin - -[![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)]() diff --git a/build/kube-dns/Makefile b/build/kube-dns/Makefile index 9e67ca6cc8..806d88c33a 100644 --- a/build/kube-dns/Makefile +++ b/build/kube-dns/Makefile @@ -48,7 +48,7 @@ all: container container: # Copy the content in this dir to the temp dir - cp $(KUBE_ROOT)/_output/local/bin/$(PLATFORM)/$(ARCH)/kube-dns $(TEMP_DIR) + cp $(KUBE_ROOT)/_output/dockerized/bin/$(PLATFORM)/$(ARCH)/kube-dns $(TEMP_DIR) cp $(KUBE_ROOT)/build/kube-dns/Dockerfile $(TEMP_DIR) # Replace BASEIMAGE with the real base image diff --git a/build/kube-dns/RELEASES.md b/build/kube-dns/RELEASES.md new file mode 100644 index 0000000000..60bcd76c2f --- /dev/null +++ b/build/kube-dns/RELEASES.md @@ -0,0 +1,47 @@ +# Cutting a release + +Until we have a proper setup for building this automatically with every binary +release, here are the steps for making a release. We make releases when they +are ready, not on every PR. + +1. Build the container for testing: + +`make release` +`cd build/kube-dns` +`make container PREFIX= TAG=rc` + +2. Manually deploy this to your own cluster by updating the replication + controller and deleting the running pod(s). + +3. Verify it works. + +4. Update the TAG version in `Makefile` and update the `Changelog`. Update the + `*.yaml.in` to point to the new tag. Send a PR but mark it as "DO NOT MERGE". + +5. Once the PR is approved, build and push the container for real for all architectures: + + ```console + # Build for linux/amd64 (default) + $ make push ARCH=amd64 + # ---> gcr.io/google_containers/kube-dns-amd64:TAG + # ---> gcr.io/google_containers/kube-dns:TAG (image with backwards-compatible naming) + + $ make push ARCH=arm + # ---> gcr.io/google_containers/kube-dns-arm:TAG + + $ make push ARCH=arm64 + # ---> gcr.io/google_containers/kube-dns-arm64:TAG + + $ make push ARCH=ppc64le + # ---> gcr.io/google_containers/kube-dns-ppc64le:TAG + ``` + +6. Manually deploy this to your own cluster by updating the replication + controller and deleting the running pod(s). + +7. Verify it works. + +8. Allow the PR to be merged. + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/build/kube-dns/RELEASES.md?pixel)]() diff --git a/cluster/images/hyperkube/addons/dns-svc.yaml b/cluster/images/hyperkube/addons/dns-svc.yaml index 4c08c2d2ec..3448841246 100644 --- a/cluster/images/hyperkube/addons/dns-svc.yaml +++ b/cluster/images/hyperkube/addons/dns-svc.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This file should be kept in sync with cluster/addons/dns/skydns-svc.yaml.in +# This file should be kept in sync with cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in apiVersion: v1 kind: Service metadata: diff --git a/cluster/mesos/docker/deploy-dns.sh b/cluster/mesos/docker/deploy-dns.sh index 1f623ec5c3..f8f1734abd 100755 --- a/cluster/mesos/docker/deploy-dns.sh +++ b/cluster/mesos/docker/deploy-dns.sh @@ -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/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" +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" # Use kubectl to create skydns rc and service "${kubectl}" create -f "${workspace}/skydns-rc.yaml" diff --git a/cluster/saltbase/salt/kube-dns/Makefile b/cluster/saltbase/salt/kube-dns/Makefile index b388cb5d60..caa812194d 100644 --- a/cluster/saltbase/salt/kube-dns/Makefile +++ b/cluster/saltbase/salt/kube-dns/Makefile @@ -23,11 +23,11 @@ all: transform # .base -> .in pattern rule %.in: %.base - sed -f transforms2salt.sed $< | sed s/__SOURCE_FILENAME__/$ $@ + sed -f transforms2salt.sed $< | sed s/__SOURCE_FILENAME__/$ $@ # .base -> .sed pattern rule %.sed: %.base - sed -f transforms2sed.sed $< | sed s/__SOURCE_FILENAME__/$ $@ + sed -f transforms2sed.sed $< | sed s/__SOURCE_FILENAME__/$ $@ transform: skydns-rc.yaml.in skydns-svc.yaml.in skydns-rc.yaml.sed skydns-svc.yaml.sed diff --git a/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.base b/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.base index 6830d8a328..ea7e634fc6 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.base +++ b/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.base @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This file should be kept in sync with cluster/addons/dns/skydns-rc.yaml.in +# This file should be kept in sync with cluster/images/hyperkube/dns-svc.yaml # __MACHINE_GENERATED_WARNING__ diff --git a/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in b/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in index 14d97b61eb..1abcf16da1 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in +++ b/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This file should be kept in sync with cluster/addons/dns/skydns-rc.yaml.in +# This file should be kept in sync with cluster/images/hyperkube/dns-svc.yaml # Warning: This is a file generated from the base underscore template file: skydns-svc.yaml.base diff --git a/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.sed b/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.sed index 5fc731779b..95ffcffaf7 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.sed +++ b/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.sed @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This file should be kept in sync with cluster/addons/dns/skydns-rc.yaml.in +# This file should be kept in sync with cluster/images/hyperkube/dns-svc.yaml # Warning: This is a file generated from the base underscore template file: skydns-svc.yaml.base diff --git a/cluster/ubuntu/deployAddons.sh b/cluster/ubuntu/deployAddons.sh index a5fa809bc2..47a5b9773b 100755 --- a/cluster/ubuntu/deployAddons.sh +++ b/cluster/ubuntu/deployAddons.sh @@ -41,8 +41,8 @@ function init { function deploy_dns { echo "Deploying DNS on Kubernetes" - 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 - sed -e "s/{{ pillar\['dns_server'\] }}/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/addons/dns/skydns-svc.yaml.in" > skydns-svc.yaml + 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_server'\] }}/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in" > skydns-svc.yaml KUBEDNS=`eval "${KUBECTL} get services --namespace=kube-system | grep kube-dns | cat"` diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 9d036f559d..bff3408931 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -408,8 +408,8 @@ 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/addons/dns/skydns-rc.yaml.in" >| skydns-rc.yaml - sed -e "s/{{ pillar\['dns_server'\] }}/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/addons/dns/skydns-svc.yaml.in" >| skydns-svc.yaml + 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_server'\] }}/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in" >| skydns-svc.yaml cat <namespace.yaml apiVersion: v1 kind: Namespace