diff --git a/README.md b/README.md index 9cc72e94e..7ad831c27 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,5 @@ ![Kubespray Logo](http://s9.postimg.org/md5dyjl67/kubespray_logoandkubespray_small.png) The documentation can be found [THERE](https://docs.kubespray.io) + +[![Build Status](https://travis-ci.org/kubespray/kubespray.svg)](https://travis-ci.org/kubespray/kubespray) diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml index 3caecf3af..685bc57cd 100644 --- a/roles/docker/defaults/main.yml +++ b/roles/docker/defaults/main.yml @@ -1 +1 @@ -docker_version: 1.9 +docker_version: 1.10 diff --git a/roles/docker/vars/debian.yml b/roles/docker/vars/debian.yml index 9a116a636..87bd8834c 100644 --- a/roles/docker/vars/debian.yml +++ b/roles/docker/vars/debian.yml @@ -4,7 +4,7 @@ docker_kernel_min_version: '3.2' docker_versioned_pkg: latest: docker-engine 1.9: docker-engine=1.9.1-0~{{ ansible_distribution_release|lower }} - 1.10: docker-engine=1.10.1-0~{{ ansible_distribution_release|lower }} + 1.10: docker-engine=1.10.3-0~{{ ansible_distribution_release|lower }} docker_package_info: pkg_mgr: apt diff --git a/roles/docker/vars/ubuntu.yml b/roles/docker/vars/ubuntu.yml index 98eef3960..0f8ca9d96 100644 --- a/roles/docker/vars/ubuntu.yml +++ b/roles/docker/vars/ubuntu.yml @@ -5,7 +5,7 @@ docker_kernel_min_version: '3.2' docker_versioned_pkg: latest: docker-engine 1.9: docker-engine=1.9.0-0~{{ ansible_distribution_release|lower }} - 1.10: docker-engine=1.10.1-0~{{ ansible_distribution_release|lower }} + 1.10: docker-engine=1.10.3-0~{{ ansible_distribution_release|lower }} docker_package_info: pkg_mgr: apt diff --git a/roles/download/defaults/main.yml b/roles/download/defaults/main.yml index be3f568d2..592480c9c 100644 --- a/roles/download/defaults/main.yml +++ b/roles/download/defaults/main.yml @@ -2,7 +2,7 @@ local_release_dir: /tmp # Versions -kube_version: v1.1.8 +kube_version: v1.2.0 etcd_version: v2.2.5 calico_version: v0.17.0 calico_cni_version: v1.0.0 @@ -25,9 +25,9 @@ calico_cni_checksum: "cfbb95d4416cb65845a188f3bd991fff232bd5ce3463b2919d586ab779 calico_cni_ipam_checksum: "93ebf8756b26314e1e3f612f1e824418cbb0a8df2942664422e697bcb109fbb2" weave_checksum: "152942c330f87ab475d87d9311b91674b90f25ea685bd4e04e0495d5fe09a957" etcd_checksum: "aa6037406257d2a1bc48ffa769afe7a4f8a04cc1ffcd36ef84f9ee8bc4eca756" -kubectl_checksum: "b2222986e9f05da8091a16134022d243b3c46a5899486d1b775dbc950ebf36cd" -kubelet_checksum: "a73cf50ce3da2d88a46064cd7e5ef48ece3c73518cf7a609ef8a680c214d3f4c" -kube_apiserver_checksum: "aebb2c131674e231ba8dcad4438624c876627e77f47b0c6ef96bd21d23298ffa" +kubectl_checksum: "0fd51875a4783fb106f769bdbc81012066b4a2785ba88b0280870a25cab76296" +kubelet_checksum: "a1da4b8d0965f66b7243d22f2b307227ec24bbd7ce8522cd3ce4ec1206c3a09e" +kube_apiserver_checksum: "fe50e4014a96897a708b3c847550b4e510a390585209c2b11c02a32123570d43" downloads: - name: calico diff --git a/roles/download/tasks/uploads.yml b/roles/download/tasks/uploads.yml deleted file mode 100644 index ed97d539c..000000000 --- a/roles/download/tasks/uploads.yml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/roles/kubernetes/master/tasks/main.yml b/roles/kubernetes/master/tasks/main.yml index e79631f61..5124e152b 100644 --- a/roles/kubernetes/master/tasks/main.yml +++ b/roles/kubernetes/master/tasks/main.yml @@ -75,17 +75,12 @@ - name: Write kube-controller-manager manifest template: src: manifests/kube-controller-manager.manifest.j2 - dest: "{{ kube_config_dir }}/kube-controller-manager.manifest" + dest: "{{ kube_manifest_dir }}/kube-controller-manager.manifest" - name: Write kube-scheduler manifest template: src: manifests/kube-scheduler.manifest.j2 - dest: "{{ kube_config_dir }}/kube-scheduler.manifest" - -- name: Write podmaster manifest - template: - src: manifests/kube-podmaster.manifest.j2 - dest: "{{ kube_manifest_dir }}/kube-podmaster.manifest" + dest: "{{ kube_manifest_dir }}/kube-scheduler.manifest" - name: restart kubelet service: diff --git a/roles/kubernetes/master/templates/manifests/kube-controller-manager.manifest.j2 b/roles/kubernetes/master/templates/manifests/kube-controller-manager.manifest.j2 index c692f758f..4b9ed2f74 100644 --- a/roles/kubernetes/master/templates/manifests/kube-controller-manager.manifest.j2 +++ b/roles/kubernetes/master/templates/manifests/kube-controller-manager.manifest.j2 @@ -12,6 +12,7 @@ spec: - /hyperkube - controller-manager - --master=http://127.0.0.1:{{kube_apiserver_insecure_port}} + - --leader-elect=true - --service-account-private-key-file={{ kube_cert_dir }}/apiserver-key.pem - --root-ca-file={{ kube_cert_dir }}/ca.pem - --v={{ kube_log_level | default('2') }} diff --git a/roles/kubernetes/master/templates/manifests/kube-podmaster.manifest.j2 b/roles/kubernetes/master/templates/manifests/kube-podmaster.manifest.j2 deleted file mode 100644 index 86447badf..000000000 --- a/roles/kubernetes/master/templates/manifests/kube-podmaster.manifest.j2 +++ /dev/null @@ -1,46 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: kube-podmaster - namespace: kube-system -spec: - hostNetwork: true - containers: - - name: scheduler-elector - image: gcr.io/google_containers/podmaster:1.1 - command: - - /podmaster - - --etcd-servers={% for srv in groups['etcd'] %}http://{{ srv }}:2379{% if not loop.last %},{% endif %}{% endfor %} - - - --key=scheduler - - --source-file={{ kube_config_dir}}/kube-scheduler.manifest - - --dest-file={{ kube_manifest_dir }}/kube-scheduler.manifest - volumeMounts: - - mountPath: {{ kube_config_dir }} - name: manifest-src - readOnly: true - - mountPath: {{ kube_manifest_dir }} - name: manifest-dst - - name: controller-manager-elector - image: gcr.io/google_containers/podmaster:1.1 - command: - - /podmaster - - --etcd-servers={% for srv in groups['etcd'] %}http://{{ srv }}:2379{% if not loop.last %},{% endif %}{% endfor %} - - - --key=controller - - --source-file={{ kube_config_dir }}/kube-controller-manager.manifest - - --dest-file={{ kube_manifest_dir }}/kube-controller-manager.manifest - terminationMessagePath: /dev/termination-log - volumeMounts: - - mountPath: {{ kube_config_dir }} - name: manifest-src - readOnly: true - - mountPath: {{ kube_manifest_dir }} - name: manifest-dst - volumes: - - hostPath: - path: {{ kube_config_dir }} - name: manifest-src - - hostPath: - path: {{ kube_manifest_dir }} - name: manifest-dst diff --git a/roles/kubernetes/master/templates/manifests/kube-scheduler.manifest.j2 b/roles/kubernetes/master/templates/manifests/kube-scheduler.manifest.j2 index 9e8579548..f642fbf70 100644 --- a/roles/kubernetes/master/templates/manifests/kube-scheduler.manifest.j2 +++ b/roles/kubernetes/master/templates/manifests/kube-scheduler.manifest.j2 @@ -11,6 +11,7 @@ spec: command: - /hyperkube - scheduler + - --leader-elect=true - --master=http://127.0.0.1:{{kube_apiserver_insecure_port}} - --v={{ kube_log_level | default('2') }} livenessProbe: diff --git a/roles/kubernetes/node/defaults/main.yml b/roles/kubernetes/node/defaults/main.yml index f915a84f6..5cac568d9 100644 --- a/roles/kubernetes/node/defaults/main.yml +++ b/roles/kubernetes/node/defaults/main.yml @@ -32,7 +32,7 @@ dns_domain: "{{ cluster_name }}" kube_proxy_mode: userspace hyperkube_image_repo: quay.io/ant31/kubernetes-hyperkube -hyperkube_image_tag: v1.1.8 +hyperkube_image_tag: v1.2.0 # IP address of the DNS server. # Kubernetes will create a pod with several containers, serving as the DNS @@ -41,6 +41,6 @@ hyperkube_image_tag: v1.1.8 # pick the 10th ip address in the kube_service_addresses range and use that. dns_server: "{{ kube_service_addresses|ipaddr('net')|ipaddr(253)|ipaddr('address') }}" -kube_api_runtime_config: - - extensions/v1beta1/daemonsets=true - - extensions/v1beta1/deployments=true +# kube_api_runtime_config: +# - extensions/v1beta1/daemonsets=true +# - extensions/v1beta1/deployments=true diff --git a/roles/kubernetes/node/templates/kubelet.j2 b/roles/kubernetes/node/templates/kubelet.j2 index 0f9197586..b7fc61d57 100644 --- a/roles/kubernetes/node/templates/kubelet.j2 +++ b/roles/kubernetes/node/templates/kubelet.j2 @@ -7,7 +7,9 @@ KUBE_LOGGING="--logtostderr=true" {% endif %} KUBE_LOG_LEVEL="--v={{ kube_log_level | default('2') }}" KUBE_ALLOW_PRIV="--allow_privileged=true" +{% if inventory_hostname in groups['kube-node'] %} KUBELET_API_SERVER="--api_servers={% for host in groups['kube-master'] %}https://{{ hostvars[host]['access_ip'] | default(hostvars[host]['ip'] | default(hostvars[host]['ansible_default_ipv4']['address'])) }}:{{ kube_apiserver_port }}{% if not loop.last %},{% endif %}{% endfor %}" +{% endif %} # The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces) KUBELET_ADDRESS="--address=0.0.0.0" # The port for the info server to serve on diff --git a/roles/kubernetes/preinstall/vars/debian.yml b/roles/kubernetes/preinstall/vars/debian.yml index 5b77dd75c..596d2ac8b 100644 --- a/roles/kubernetes/preinstall/vars/debian.yml +++ b/roles/kubernetes/preinstall/vars/debian.yml @@ -1,4 +1,5 @@ required_pkgs: - python-apt + - aufs-tools - apt-transport-https - software-properties-common diff --git a/roles/uploads/defaults/main.yml b/roles/uploads/defaults/main.yml index f1a767b48..988f370d8 100644 --- a/roles/uploads/defaults/main.yml +++ b/roles/uploads/defaults/main.yml @@ -2,7 +2,7 @@ local_release_dir: /tmp # Versions -kube_version: v1.1.8 +kube_version: v1.2.0 etcd_version: v2.2.5 calico_version: v0.17.0 calico_cni_version: v1.0.0 @@ -22,9 +22,9 @@ calico_cni_checksum: "cfbb95d4416cb65845a188f3bd991fff232bd5ce3463b2919d586ab779 calico_cni_ipam_checksum: "93ebf8756b26314e1e3f612f1e824418cbb0a8df2942664422e697bcb109fbb2" weave_checksum: "152942c330f87ab475d87d9311b91674b90f25ea685bd4e04e0495d5fe09a957" etcd_checksum: "aa6037406257d2a1bc48ffa769afe7a4f8a04cc1ffcd36ef84f9ee8bc4eca756" -kubectl_checksum: "b2222986e9f05da8091a16134022d243b3c46a5899486d1b775dbc950ebf36cd" -kubelet_checksum: "a73cf50ce3da2d88a46064cd7e5ef48ece3c73518cf7a609ef8a680c214d3f4c" -kube_apiserver_checksum: "aebb2c131674e231ba8dcad4438624c876627e77f47b0c6ef96bd21d23298ffa" +kubectl_checksum: "0fd51875a4783fb106f769bdbc81012066b4a2785ba88b0280870a25cab76296" +kubelet_checksum: "a1da4b8d0965f66b7243d22f2b307227ec24bbd7ce8522cd3ce4ec1206c3a09e" +kube_apiserver_checksum: "fe50e4014a96897a708b3c847550b4e510a390585209c2b11c02a32123570d43" downloads: - name: calico