Browse Source

Merge pull request #328 from kubespray/upgrade_k8s_v1.3.0

upgrade to k8s v1.3.0
pull/286/head
Smaine Kahlouch 8 years ago
committed by GitHub
parent
commit
ee7ac22f0d
6 changed files with 17 additions and 9 deletions
  1. 6
      roles/download/vars/kube_versions.yml
  2. 2
      roles/kubernetes/node/defaults/main.yml
  3. 4
      roles/uploads/tasks/main.yml
  4. 6
      roles/uploads/vars/kube_versions.yml
  5. 3
      scripts/change_k8s_version.py
  6. 5
      tests/testcases/010_check-apiserver.yml

6
roles/download/vars/kube_versions.yml

@ -15,4 +15,8 @@ kube_checksum:
kube_apiserver: fbe8296ad4b194c06f6802a126d35cd2887dc1aded308d4da2b580f270412b33 kube_apiserver: fbe8296ad4b194c06f6802a126d35cd2887dc1aded308d4da2b580f270412b33
kubectl: 5526a496a84701015485e32c86486e2f23599f7a865164f546e619c6a62f7f19 kubectl: 5526a496a84701015485e32c86486e2f23599f7a865164f546e619c6a62f7f19
kubelet: cd15b929f0190876216f397c2c6e7aa8c08d3b047fd90b4980cd68c8f4896211 kubelet: cd15b929f0190876216f397c2c6e7aa8c08d3b047fd90b4980cd68c8f4896211
kube_version: v1.2.4
v1.3.0:
kube_apiserver: 431cd312984a29f45590138e990d5c4d537b069b71f2587a72414fabc4fcffdd
kubectl: f40b2d0ff33984e663a0dea4916f1cb9041abecc09b11f9372cdb8049ded95dc
kubelet: bd5f10ccb95fe6e95ddf7ad8a119195c27cb2bce4be6f80c1810ff1a2111496d
kube_version: v1.3.0

2
roles/kubernetes/node/defaults/main.yml

@ -32,7 +32,7 @@ dns_domain: "{{ cluster_name }}"
kube_proxy_mode: userspace kube_proxy_mode: userspace
hyperkube_image_repo: "quay.io/smana/kubernetes-hyperkube" hyperkube_image_repo: "quay.io/smana/kubernetes-hyperkube"
hyperkube_image_tag: "v1.2.5"
hyperkube_image_tag: "v1.3.0"
# IP address of the DNS server. # IP address of the DNS server.
# Kubernetes will create a pod with several containers, serving as the DNS # Kubernetes will create a pod with several containers, serving as the DNS

4
roles/uploads/tasks/main.yml

@ -21,6 +21,6 @@
src: "{{ local_release_dir }}/{{item.dest}}" src: "{{ local_release_dir }}/{{item.dest}}"
mode: put mode: put
permission: public-read permission: public-read
gs_access_key: "changeme"
gs_secret_key: "changeme"
gs_access_key: 'changeme'
gs_secret_key: 'changeme'
with_items: '{{downloads}}' with_items: '{{downloads}}'

6
roles/uploads/vars/kube_versions.yml

@ -15,4 +15,8 @@ kube_checksum:
kube_apiserver: fbe8296ad4b194c06f6802a126d35cd2887dc1aded308d4da2b580f270412b33 kube_apiserver: fbe8296ad4b194c06f6802a126d35cd2887dc1aded308d4da2b580f270412b33
kubectl: 5526a496a84701015485e32c86486e2f23599f7a865164f546e619c6a62f7f19 kubectl: 5526a496a84701015485e32c86486e2f23599f7a865164f546e619c6a62f7f19
kubelet: cd15b929f0190876216f397c2c6e7aa8c08d3b047fd90b4980cd68c8f4896211 kubelet: cd15b929f0190876216f397c2c6e7aa8c08d3b047fd90b4980cd68c8f4896211
kube_version: v1.2.4
v1.3.0:
kube_apiserver: 431cd312984a29f45590138e990d5c4d537b069b71f2587a72414fabc4fcffdd
kubectl: f40b2d0ff33984e663a0dea4916f1cb9041abecc09b11f9372cdb8049ded95dc
kubelet: bd5f10ccb95fe6e95ddf7ad8a119195c27cb2bce4be6f80c1810ff1a2111496d
kube_version: v1.3.0

3
scripts/change_k8s_version.py

@ -24,7 +24,7 @@ import shutil
from re import sub from re import sub
def get_remote_sha256_sum(url, max_file_size=100*1024*1024):
def get_remote_sha256_sum(url, max_file_size=1024*1024*1024):
remote = urllib2.urlopen(url) remote = urllib2.urlopen(url)
hash = hashlib.sha256() hash = hashlib.sha256()
total_read = 0 total_read = 0
@ -111,5 +111,6 @@ if __name__ == '__main__':
for f in var_files: for f in var_files:
current = read_vars(f) current = read_vars(f)
current['kube_checksum'][args.kube_version] = new current['kube_checksum'][args.kube_version] = new
current['kube_version'] = args.kube_version
with open(f, 'w') as out: with open(f, 'w') as out:
out.write(yaml.dump(current, indent=4, default_flow_style=False)) out.write(yaml.dump(current, indent=4, default_flow_style=False))

5
tests/testcases/010_check-apiserver.yml

@ -3,9 +3,8 @@
tasks: tasks:
- name: Check the API servers are responding - name: Check the API servers are responding
local_action:
module: uri
url: https://{{ansible_ssh_host}}/api/v1
uri:
url: "https://{{ansible_ssh_host}}/api/v1"
user: kube user: kube
password: changeme password: changeme
validate_certs: no validate_certs: no

Loading…
Cancel
Save