From 60d2293f4c4d3f78a19c98faba2b04d3b42e62d4 Mon Sep 17 00:00:00 2001 From: Girish Kalele Date: Fri, 27 May 2016 18:29:59 -0700 Subject: [PATCH] Address review comments --- CHANGELOG.md | 2 +- build/kube-dns/Changelog | 2 + build/kube-dns/MAINTAINERS.md | 4 -- build/kube-dns/Makefile | 2 +- build/kube-dns/RELEASES.md | 47 +++++++++++++++++++ cluster/images/hyperkube/addons/dns-svc.yaml | 2 +- cluster/mesos/docker/deploy-dns.sh | 4 +- cluster/saltbase/salt/kube-dns/Makefile | 4 +- .../salt/kube-dns/skydns-svc.yaml.base | 2 +- .../saltbase/salt/kube-dns/skydns-svc.yaml.in | 2 +- .../salt/kube-dns/skydns-svc.yaml.sed | 2 +- cluster/ubuntu/deployAddons.sh | 4 +- hack/local-up-cluster.sh | 4 +- 13 files changed, 63 insertions(+), 18 deletions(-) create mode 100644 build/kube-dns/Changelog create mode 100644 build/kube-dns/RELEASES.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 59f1e67d056..38dd8555373 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 00000000000..48f268af6cb --- /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 9756da18d42..8e16d516637 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 9e67ca6cc80..806d88c33a8 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 00000000000..60bcd76c2f7 --- /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 4c08c2d2ec4..34488412463 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 1f623ec5c3f..f8f1734abd0 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 b388cb5d60d..caa812194dc 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 6830d8a3280..ea7e634fc6d 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 14d97b61eb2..1abcf16da1a 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 5fc731779b0..95ffcffaf7c 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 a5fa809bc22..47a5b9773b5 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 9d036f559d9..bff34089318 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