Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Girish Kalele committed May 31, 2016
1 parent 4c1047d commit 60d2293
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 (<code>pod.beta.kubernetes.io/hostname, pod.beta.kubernetes.io/subdomain)</code>. 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
Expand Down
2 changes: 2 additions & 0 deletions build/kube-dns/Changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## Version 1.2 (Fri May 27 2016 Tim Hockin <[email protected]>)
- First Changelog entry
4 changes: 0 additions & 4 deletions build/kube-dns/MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@

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)]()
2 changes: 1 addition & 1 deletion build/kube-dns/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
47 changes: 47 additions & 0 deletions build/kube-dns/RELEASES.md
Original file line number Diff line number Diff line change
@@ -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=<your-docker-hub> 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)]()
2 changes: 1 addition & 1 deletion cluster/images/hyperkube/addons/dns-svc.yaml
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.

# 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:
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/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"
Expand Down
4 changes: 2 additions & 2 deletions cluster/saltbase/salt/kube-dns/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ all: transform

# .base -> .in pattern rule
%.in: %.base
sed -f transforms2salt.sed $< | sed s/__SOURCE_FILENAME__/$</g > $@
sed -f transforms2salt.sed $< | sed s/__SOURCE_FILENAME__/$</g > $@

# .base -> .sed pattern rule
%.sed: %.base
sed -f transforms2sed.sed $< | sed s/__SOURCE_FILENAME__/$</g > $@
sed -f transforms2sed.sed $< | sed s/__SOURCE_FILENAME__/$</g > $@

transform: skydns-rc.yaml.in skydns-svc.yaml.in skydns-rc.yaml.sed skydns-svc.yaml.sed

Expand Down
2 changes: 1 addition & 1 deletion cluster/saltbase/salt/kube-dns/skydns-svc.yaml.base
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.

# 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__

Expand Down
2 changes: 1 addition & 1 deletion cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in
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.

# 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

Expand Down
2 changes: 1 addition & 1 deletion cluster/saltbase/salt/kube-dns/skydns-svc.yaml.sed
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.

# 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

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/{{ 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"`

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 @@ -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 <<EOF >namespace.yaml
apiVersion: v1
kind: Namespace
Expand Down

0 comments on commit 60d2293

Please sign in to comment.