Skip to content

Commit

Permalink
upgrade to kubernetes version 1.4.0
Browse files Browse the repository at this point in the history
test to change the machine type

Revert "test to change the machine type"

This reverts commit 7a91f1b.

use google dns server when no upstream dns are defined

comment upstream_dns_servers

update documentation

remove deprecated kubelet flags

Revert "remove deprecated kubelet flags"

This reverts commit 21e3b893c896d0291c36a07d0414f4cb88b8d8ac.
  • Loading branch information
Smana committed Oct 10, 2016
1 parent 8c8d978 commit 056f4b6
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 33 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you have questions, you can [invite yourself](https://slack.kubespray.io/) to

To deploy the cluster you can use :

[**kargo-cli**](https://github.com/kubespray/kargo-cli) <br>
[**kargo-cli**](https://github.com/kubespray/kargo-cli) (deprecated, a newer [go](https://github.com/Smana/kargo-cli/tree/kargogo) version soon)<br>
**Ansible** usual commands <br>
**vagrant** by simply running `vagrant up` (for tests purposes) <br>

Expand Down Expand Up @@ -41,7 +41,7 @@ Supported Linux distributions
Versions
--------------

[kubernetes](https://github.com/kubernetes/kubernetes/releases) v1.3.0 <br>
[kubernetes](https://github.com/kubernetes/kubernetes/releases) v1.4.0 <br>
[etcd](https://github.com/coreos/etcd/releases) v3.0.1 <br>
[calicoctl](https://github.com/projectcalico/calico-docker/releases) v0.20.0 <br>
[flanneld](https://github.com/coreos/flannel/releases) v0.5.5 <br>
Expand Down
6 changes: 3 additions & 3 deletions inventory/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ kube_apiserver_insecure_port: 8080 # (http)
# Do not install additional dnsmasq
skip_dnsmasq: false
# Upstream dns servers used by dnsmasq
upstream_dns_servers:
- 8.8.8.8
- 8.8.4.4
#upstream_dns_servers:
# - 8.8.8.8
# - 8.8.4.4
#
# # Use dns server : https://github.com/ansibl8s/k8s-skydns/blob/master/skydns-README.md
dns_setup: true
Expand Down
2 changes: 2 additions & 0 deletions roles/dnsmasq/templates/01-kube-dns.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ server=/{{ dns_domain }}/{{ skydns_server }}
{% for srv in upstream_dns_servers %}
server={{ srv }}
{% endfor %}
{% elif cloud_provider == "gce" %}
server=169.254.169.254
{% else %}
server=8.8.8.8
server=8.8.4.4
Expand Down
2 changes: 1 addition & 1 deletion roles/download/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local_release_dir: /tmp
download_run_once: False

# Versions
kube_version: v1.3.0
kube_version: v1.4.0

etcd_version: v3.0.6
#TODO(mattymo): Move calico versions to roles/network_plugins/calico/defaults
Expand Down
2 changes: 1 addition & 1 deletion roles/network_plugin/calico/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ ipip: false

# Set to true if you want your calico cni binaries to overwrite the
# ones from hyperkube while leaving other cni plugins intact.
overwrite_hyperkube_cni: false
overwrite_hyperkube_cni: true
15 changes: 2 additions & 13 deletions roles/network_plugin/calico/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,23 @@
changed_when: false
notify: restart calico-node

- name: Calico | Do not use hyperkube cni if kube_version under v1.3.4
set_fact:
use_hyperkube_cni: false
when: kube_version | version_compare('v1.3.4','<')

- name: Calico | Use hyperkube cni if kube_version above v1.3.4
set_fact:
use_hyperkube_cni: true
when: kube_version | version_compare('v1.3.4','>=')

- name: Calico | Copy cni plugins from hyperkube
command: "/usr/bin/docker run --rm -v /opt/cni/bin:/cnibindir {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }} /usr/bin/rsync -a /opt/cni/bin/ /cnibindir/"
register: cni_task_result
until: cni_task_result.rc == 0
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
changed_when: false
when: "{{ use_hyperkube_cni|bool }}"

- name: Calico | Install calico cni bin
command: rsync -pi "{{ local_release_dir }}/calico/bin/calico" "/opt/cni/bin/calico"
changed_when: false
when: "{{ not use_hyperkube_cni|bool or overwrite_hyperkube_cni|bool }}"
when: "{{ overwrite_hyperkube_cni|bool }}"

- name: Calico | Install calico-ipam cni bin
command: rsync -pi "{{ local_release_dir }}/calico/bin/calico-ipam" "/opt/cni/bin/calico-ipam"
changed_when: false
when: "{{ not use_hyperkube_cni|bool or overwrite_hyperkube_cni|bool }}"
when: "{{ overwrite_hyperkube_cni|bool }}"

- name: Calico | wait for etcd
uri: url=http://localhost:2379/health
Expand Down
12 changes: 0 additions & 12 deletions roles/network_plugin/weave/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,13 @@
notify:
- restart docker

- name: Weave | Determine hyperkube cni to use depending of the version of kube
set_fact:
use_hyperkube_cni: >
{%- if kube_version | version_compare('v1.3.4','>=') -%}
true
{%- elif kube_version | version_compare('v1.3.4','<') -%}
false
{%- else -%}
{{ ErrorCannotRecognizeVersion }}
{%- endif -%}
- name: Weave | Copy cni plugins from hyperkube
command: "/usr/bin/docker run --rm -v /opt/cni/bin:/cnibindir {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }} /bin/cp -r /opt/cni/bin/. /cnibindir/"
register: cni_task_result
until: cni_task_result.rc == 0
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
changed_when: false
when: "{{ use_hyperkube_cni|bool }}"

- name: Weave | Install weave
command: rsync -piu "{{ local_release_dir }}/weave/bin/weave" "{{ bin_dir }}/weave"
Expand Down
2 changes: 1 addition & 1 deletion roles/uploads/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local_release_dir: /tmp

# Versions
kube_version: v1.3.0
kube_version: v1.4.0

etcd_version: v3.0.6
calico_version: v0.20.0
Expand Down

0 comments on commit 056f4b6

Please sign in to comment.