Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update K8s to v1.17.7 and upgrade CNI plugins #1392

Merged
merged 13 commits into from
Jun 29, 2020
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
# Subscriptions with certs: subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"
# w/o subscription https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

- name: Install the latest version of ca-certificates package
yum:
name: ca-certificates
state: latest

- name: Install RedHat family packages
yum:
name:
- bash-completion
- ca-certificates
- curl
- ebtables
- ethtool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,10 @@
when:
- docker_image.name != specification.registry_image.name

- name: Remove downloaded image archive {{ docker_image.file_name }}
file:
path: "{{ download_directory }}/{{ docker_image.file_name }}"
state: absent

when:
- image_check.stdout | length == 0
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
- name: Install Kubernetes packages for Debian family
apt:
name:
- kubernetes-cni=0.7.5-00
- kubelet={{specification.version}}-00
- kubectl={{specification.version}}-00
- kubeadm={{specification.version}}-00
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
- name: Install Kubernetes packages for RedHat family
yum:
name:
- kubernetes-cni-0.7.5-0
- kubelet-{{specification.version}}-0
- kubectl-{{specification.version}}-0
- kubeadm-{{specification.version}}-0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,17 @@

- name: Create calico deployment
template:
src: calico.yml.j2
src: "{{ template_file_name }}"
dest: "/home/{{ admin_user.name }}/calico.yml"
owner: "{{ admin_user.name }}"
group: "{{ admin_user.name }}"
vars:
template_file_name: >-
{%- if k8s_server_version is defined and k8s_server_version is version('v1.16', '<') -%}
calico-for-k8s-below-1.16.yml.j2
{%- else -%}
calico.yml.j2
{%- endif -%}

- name: Apply calico definition
environment:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
---
- name: Create canal deployment
template:
src: canal-deployment.yml.j2
dest: "/home/{{ admin_user.name }}/canal-deployment.yml"
src: "{{ template_file_name }}"
dest: "/home/{{ admin_user.name }}/canal.yml"
owner: "{{ admin_user.name }}"
group: "{{ admin_user.name }}"
vars:
template_file_name: >-
{%- if k8s_server_version is defined and k8s_server_version is version('v1.16', '<') -%}
canal-for-k8s-below-1.16.yml.j2
{%- else -%}
canal.yml.j2
{%- endif -%}

- name: Apply canal deployment
environment:
KUBECONFIG: "/home/{{ admin_user.name }}/.kube/config"
shell: |
kubectl apply \
-f /home/{{ admin_user.name }}/canal-deployment.yml
-f /home/{{ admin_user.name }}/canal.yml
args:
executable: /bin/bash
Loading