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

Release 2.15 #35

Merged
merged 49 commits into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
f26cc9f
Only use stat get_checksum: yes when needed (#7270)
champtar Feb 10, 2021
53b9388
Add kube-ipvs0/nodelocaldns to NetworkManager unmanaged-devices (#7315)
champtar Mar 3, 2021
3c8ad07
Stop using kubeadm to update server in kubeconfigs (#7338)
champtar Mar 3, 2021
f4d3a4a
kubeadm-config.v1beta2.yaml.j2: etcd log level arg (#7339)
dujiulun Mar 3, 2021
1216a0d
Remove pre kubeadm cert migration tasks
champtar Mar 3, 2021
76a1697
Remove useless call to 'kubeadm version'
champtar Mar 3, 2021
591a51a
Remove admin.conf removal
champtar Mar 3, 2021
9ecbf75
Remove rotate_tokens logic
champtar Mar 3, 2021
8c693e8
Always backup both certs and kubeconfig
champtar Mar 3, 2021
704a054
Delete misnammed kubeadm-version.yml
champtar Mar 3, 2021
01e527a
Add privileged_without_host_devices support (#7343)
electrocucaracha Mar 8, 2021
0ea4328
ansible and jinja2 updates (#7357)
maciejaszek Mar 8, 2021
c22915a
Fixup kubelet.conf to point to kubelet-client-current.pem (#7347)
champtar Mar 9, 2021
ac1aa4d
Check for dummy kernel module (#7348)
Mar 9, 2021
bac71fa
Fixup one more missing kubespray-defaults (#7375)
champtar Mar 15, 2021
c1c7204
Upgrade openSUSE Leap to 15.2 (#7331)
maciejaszek Mar 17, 2021
d74dcfd
Update kube-ovn to 1.6.0 (#7240)
floryut Feb 10, 2021
df00b1d
Minor update to cilium and calico
floryut Feb 18, 2021
5e4f3ca
Update nodelocaldns to 1.17.1
floryut Mar 15, 2021
e12850b
Download Calico KDD CRDs (#7372)
mirwan Mar 19, 2021
cd46286
Update CNI (calico, kubeovn, multus) and Helm
floryut Mar 16, 2021
eb8dd77
Fix calico crds missing 3.16.9 (#7386)
floryut Mar 19, 2021
c1a686b
Update hashes for 1.20.5/1.19.9/1.18.17
floryut Mar 18, 2021
4e52da6
Set K8S default to v1.19.9
champtar Mar 22, 2021
b19d109
Auto renew control plane certificates (#7358)
champtar Mar 22, 2021
44d1f83
Add cryptography installation (#7404)
oomichi Mar 25, 2021
65aa921
Allow connecting to bastion via non-standard SSH port (#7396)
belak Mar 26, 2021
b0b5696
Correct Jinja Syntax for etcd-unsupported-arch (#6919)
anthr76 Mar 26, 2021
0f7b936
Fix k8s-certs-renew for k8s < 1.20 (#7410)
champtar Mar 26, 2021
26183c2
Remove ignore_errors from drain tasks and enable retires (#7151)
dlouks Jan 15, 2021
e7f8d5a
Fix remove-node by removing jq usage (#7405)
champtar Mar 26, 2021
ba1d3dc
Remove left over nodes_to_drain
champtar Mar 26, 2021
4661e7d
remove local lb privileged (#7437) (#7454)
bleech1 Apr 7, 2021
0bb0f4d
Add new kubernetes hashes (1.19.10, 1.20.6)
floryut Apr 15, 2021
58b9265
Default to latest kubernetes patch version (1.19.10)
Xartos Apr 16, 2021
45a92e4
Update k8s-certs-renew.sh.j2 (#7422)
hjanuschka Mar 31, 2021
0e67e28
reset roles need flush iptables:raw (#7426)
liupeng0518 Apr 5, 2021
16c750b
Remove calico-rr from local inventory hosts file (#7439)
lodow Apr 5, 2021
5cf0de6
Replace deprecated 'with_dict' with 'loop' (#7442)
floryut Apr 5, 2021
3e8e92b
local provisioner 'useNodeNameOnly' option can be configured (#7421)
orange-llajeanne Apr 1, 2021
ce1fdb8
fix scale (#7449)
liupeng0518 Apr 7, 2021
383b2fc
remove-node roles: fix kubectl absolute path (#7469)
liupeng0518 Apr 8, 2021
7cf6f3f
add CI test for auto_renew_certificates (#7472)
LuckySB Apr 9, 2021
2100d33
Remove dead code from kubeadm-etcd (#7470)
floryut Apr 9, 2021
65fafae
format ansible output (#7482)
liupeng0518 Apr 11, 2021
6f9f450
Regenerate apiserver.crt on all control-plane nodes (#7463)
champtar Apr 12, 2021
e7fad82
Add auto_renew_certificates_systemd_calendar (#7490)
champtar Apr 12, 2021
9be0304
Check if python netaddr and recent enough jinja are installed (#7486)
champtar Apr 13, 2021
82e9009
Add missing proxy environment in crio_repo.yml (#7492)
krystianmlynek Apr 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Use imutable image tags rather than mutable tags (like ubuntu:18.04)
FROM ubuntu:bionic-20200807

ENV KUBE_VERSION=v1.19.8
ENV KUBE_VERSION=v1.19.10

RUN mkdir /kubespray
WORKDIR /kubespray
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,28 +108,28 @@ vagrant up
- **CentOS/RHEL** 7, 8 (experimental: see [centos 8 notes](docs/centos8.md))
- **Fedora** 32, 33
- **Fedora CoreOS** (experimental: see [fcos Note](docs/fcos.md))
- **openSUSE** Leap 42.3/Tumbleweed
- **openSUSE** Leap 15.x/Tumbleweed
- **Oracle Linux** 7, 8 (experimental: [centos 8 notes](docs/centos8.md) apply)

Note: Upstart/SysV init based OS types are not supported.

## Supported Components

- Core
- [kubernetes](https://github.com/kubernetes/kubernetes) v1.19.8
- [kubernetes](https://github.com/kubernetes/kubernetes) v1.19.10
- [etcd](https://github.com/coreos/etcd) v3.4.13
- [docker](https://www.docker.com/) v19.03 (see note)
- [containerd](https://containerd.io/) v1.3.9
- [cri-o](http://cri-o.io/) v1.19 (experimental: see [CRI-O Note](docs/cri-o.md). Only on fedora, ubuntu and centos based OS)
- Network Plugin
- [cni-plugins](https://github.com/containernetworking/plugins) v0.9.0
- [calico](https://github.com/projectcalico/calico) v3.16.6
- [calico](https://github.com/projectcalico/calico) v3.16.9
- [canal](https://github.com/projectcalico/canal) (given calico/flannel versions)
- [cilium](https://github.com/cilium/cilium) v1.8.6
- [cilium](https://github.com/cilium/cilium) v1.8.8
- [flanneld](https://github.com/coreos/flannel) v0.13.0
- [kube-ovn](https://github.com/alauda/kube-ovn) v1.5.2
- [kube-ovn](https://github.com/alauda/kube-ovn) v1.6.1
- [kube-router](https://github.com/cloudnativelabs/kube-router) v1.1.1
- [multus](https://github.com/intel/multus-cni) v3.6.0
- [multus](https://github.com/intel/multus-cni) v3.7.0
- [ovn4nfv](https://github.com/opnfv/ovn4nfv-k8s-plugin) v1.1.0
- [weave](https://github.com/weaveworks/weave) v2.7.0
- Application
Expand Down
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SUPPORTED_OS = {
"centos8-bento" => {box: "bento/centos-8", user: "vagrant"},
"fedora32" => {box: "fedora/32-cloud-base", user: "vagrant"},
"fedora33" => {box: "fedora/33-cloud-base", user: "vagrant"},
"opensuse" => {box: "bento/opensuse-leap-15.1", user: "vagrant"},
"opensuse" => {box: "bento/opensuse-leap-15.2", user: "vagrant"},
"opensuse-tumbleweed" => {box: "opensuse/Tumbleweed.x86_64", user: "vagrant"},
"oraclelinux" => {box: "generic/oracle7", user: "vagrant"},
"oraclelinux8" => {box: "generic/oracle8", user: "vagrant"},
Expand Down
15 changes: 15 additions & 0 deletions ansible_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,18 @@
- ansible_version.string is version(maximal_ansible_version, "<")
tags:
- check

- name: "Check that python netaddr is installed"
assert:
msg: "Python netaddr is not present"
that: "'127.0.0.1' | ipaddr"
tags:
- check

# CentOS 7 provides too old jinja version
- name: "Check that jinja is not too old (install via pip)"
assert:
msg: "Your Jinja version is too old, install via pip"
that: "{% set test %}It works{% endset %}{{ test == 'It works' }}"
tags:
- check
1 change: 0 additions & 1 deletion cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
environment: "{{ proxy_disable_env }}"
roles:
- { role: kubespray-defaults }
- { role: kubernetes-apps/rotate_tokens, tags: rotate_tokens, when: "secret_changed|default(false)" }
- { role: win_nodes/kubernetes_patch, tags: ["master", "win_nodes"] }

- hosts: kube-master
Expand Down
2 changes: 2 additions & 0 deletions docs/offline-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ cni_download_url: "{{ files_repo }}/kubernetes/cni/cni-plugins-linux-{{ image_ar
crictl_download_url: "{{ files_repo }}/kubernetes/cri-tools/crictl-{{ crictl_version }}-{{ ansible_system | lower }}-{{ image_arch }}.tar.gz"
# If using Calico
calicoctl_download_url: "{{ files_repo }}/kubernetes/calico/{{ calico_ctl_version }}/calicoctl-linux-{{ image_arch }}"
# If using Calico with kdd
calico_crds_download_url: "{{ files_repo }}/kubernetes/calico/{{ calico_version }}.tar.gz"

# CentOS/Redhat
## Docker / Containerd
Expand Down
2 changes: 1 addition & 1 deletion docs/opensuse.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# openSUSE Leap 15.0 and Tumbleweed
# openSUSE Leap 15.2 and Tumbleweed

openSUSE Leap installation Notes:

Expand Down
14 changes: 0 additions & 14 deletions docs/upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,20 +284,6 @@ follows:
* kube-apiserver, kube-scheduler, and kube-controller-manager
* Add-ons (such as KubeDNS)

## Upgrade considerations

Kubespray supports rotating certificates used for etcd and Kubernetes
components, but some manual steps may be required. If you have a pod that
requires use of a service token and is deployed in a namespace other than
`kube-system`, you will need to manually delete the affected pods after
rotating certificates. This is because all service account tokens are dependent
on the apiserver token that is used to generate them. When the certificate
rotates, all service account tokens must be rotated as well. During the
kubernetes-apps/rotate_tokens role, only pods in kube-system are destroyed and
recreated. All other invalidated service account tokens are cleaned up
automatically, but other pods are not deleted out of an abundance of caution
for impact to user deployed pods.

### Component-based upgrades

A deployer may want to upgrade specific components in order to minimize risk
Expand Down
1 change: 0 additions & 1 deletion inventory/local/hosts.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ node1
[k8s-cluster:children]
kube-node
kube-master
calico-rr
9 changes: 6 additions & 3 deletions inventory/sample/group_vars/k8s-cluster/k8s-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ kube_token_dir: "{{ kube_config_dir }}/tokens"
kube_api_anonymous_auth: true

## Change this to use another Kubernetes version, e.g. a current beta release
kube_version: v1.19.8
kube_version: v1.19.10

# Where the binaries will be downloaded.
# Note: ensure that you've enough disk space (about 1G)
Expand Down Expand Up @@ -310,5 +310,8 @@ persistent_volumes_enabled: false

## Amount of time to retain events. (default 1h0m0s)
event_ttl_duration: "1h0m0s"
## Force regeneration of kubernetes control plane certificates without the need of bumping the cluster version
force_certificate_regeneration: false

## Automatically renew K8S control plane certificates on first Monday of each month
auto_renew_certificates: false
# First Monday of each month
# auto_renew_certificates_systemd_calendar: "Mon *-*-1,2,3,4,5,6,7 03:{{ groups['kube-master'].index(inventory_hostname) }}0:00"
2 changes: 2 additions & 0 deletions inventory/sample/group_vars/k8s-cluster/offline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

# [Optional] Calico: If using Calico network plugin
# calicoctl_download_url: "{{ files_repo }}/kubernetes/calico/{{ calico_ctl_version }}/calicoctl-linux-{{ image_arch }}"
# [Optional] Calico with kdd: If using Calico network plugin with kdd datastore
# calico_crds_download_url: "{{ files_repo }}/kubernetes/calico/{{ calico_version }}.tar.gz"

## CentOS/Redhat
### For EL7, base and extras repo must be available, for EL8, baseos and appstream
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ansible==2.9.17
jinja2==2.11.1
ansible==2.9.18
cryptography==2.8
jinja2==2.11.3
netaddr==0.7.19
pbr==5.4.4
jmespath==0.9.5
Expand Down
3 changes: 2 additions & 1 deletion roles/bastion-ssh-config/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
- name: set bastion host IP
- name: set bastion host IP and port
set_fact:
bastion_ip: "{{ hostvars[groups['bastion'][0]]['ansible_host'] | d(hostvars[groups['bastion'][0]]['ansible_ssh_host']) }}"
bastion_port: "{{ hostvars[groups['bastion'][0]]['ansible_port'] | d(hostvars[groups['bastion'][0]]['ansible_ssh_port']) | d(22) }}"
delegate_to: localhost
connection: local

Expand Down
2 changes: 1 addition & 1 deletion roles/bastion-ssh-config/templates/ssh-bastion.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Host {{ bastion_ip }}
ControlPersist 5m

Host {{ vars['hosts'] }}
ProxyCommand ssh -F /dev/null -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -W %h:%p {{ real_user }}@{{ bastion_ip }} {% if ansible_ssh_private_key_file is defined %}-i {{ ansible_ssh_private_key_file }}{% endif %}
ProxyCommand ssh -F /dev/null -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -W %h:%p -p {{ bastion_port }} {{ real_user }}@{{ bastion_ip }} {% if ansible_ssh_private_key_file is defined %}-i {{ ansible_ssh_private_key_file }}{% endif %}
3 changes: 3 additions & 0 deletions roles/bootstrap-os/tasks/bootstrap-centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
- name: Check presence of fastestmirror.conf
stat:
path: /etc/yum/pluginconf.d/fastestmirror.conf
get_attributes: no
get_checksum: no
get_mime: no
register: fastestmirror

# the fastestmirror plugin can actually slow down Ansible deployments
Expand Down
3 changes: 3 additions & 0 deletions roles/bootstrap-os/tasks/bootstrap-opensuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
- name: Check that /etc/sysconfig/proxy file exists
stat:
path: /etc/sysconfig/proxy
get_attributes: no
get_checksum: no
get_mime: no
register: stat_result

- name: Create the /etc/sysconfig/proxy empty file
Expand Down
3 changes: 3 additions & 0 deletions roles/bootstrap-os/tasks/bootstrap-redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
- name: Check presence of fastestmirror.conf
stat:
path: /etc/yum/pluginconf.d/fastestmirror.conf
get_attributes: no
get_checksum: no
get_mime: no
register: fastestmirror

# the fastestmirror plugin can actually slow down Ansible deployments
Expand Down
1 change: 1 addition & 0 deletions roles/container-engine/containerd/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ containerd_default_runtime:
# type: io.containerd.kata.v2
# engine: ""
# root: ""
# privileged_without_host_devices: true
containerd_runtimes: []

containerd_untrusted_runtime_type: ''
Expand Down
3 changes: 3 additions & 0 deletions roles/container-engine/containerd/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
- name: check if fedora coreos
stat:
path: /run/ostree-booted
get_attributes: no
get_checksum: no
get_mime: no
register: ostree

- name: set is_ostree
Expand Down
2 changes: 2 additions & 0 deletions roles/container-engine/containerd/templates/config.toml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ disabled_plugins = ["restart"]
runtime_type = "{{ containerd_default_runtime.type }}"
runtime_engine = "{{ containerd_default_runtime.engine }}"
runtime_root = "{{ containerd_default_runtime.root }}"
privileged_without_host_devices = {{ containerd_default_runtime.privileged_without_host_devices|default(false)|lower }}

{% if kata_containers_enabled %}
[plugins.cri.containerd.runtimes.kata-qemu]
Expand All @@ -55,6 +56,7 @@ disabled_plugins = ["restart"]
runtime_type = "{{ runtime.type }}"
runtime_engine = "{{ runtime.engine }}"
runtime_root = "{{ runtime.root }}"
privileged_without_host_devices = {{ runtime.privileged_without_host_devices|default(false)|lower }}
{% endfor %}

[plugins.cri.containerd.untrusted_workload_runtime]
Expand Down
1 change: 1 addition & 0 deletions roles/container-engine/cri-o/tasks/crio_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
until: apt_key_download is succeeded
retries: 4
delay: "{{ retry_stagger | d(3) }}"
environment: "{{ proxy_env }}"

- name: Add CRI-O kubic apt repo
apt_repository:
Expand Down
6 changes: 6 additions & 0 deletions roles/container-engine/cri-o/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
- name: check if fedora coreos
stat:
path: /run/ostree-booted
get_attributes: no
get_checksum: no
get_mime: no
register: ostree

- name: set is_ostree
Expand Down Expand Up @@ -94,6 +97,9 @@
- name: Check if already installed
stat:
path: "/bin/crio"
get_attributes: no
get_checksum: no
get_mime: no
register: need_bootstrap_crio
when: is_ostree

Expand Down
1 change: 1 addition & 0 deletions roles/container-engine/cri-o/templates/crio.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ pinns_path = ""
runtime_path = "{{ runtime.path }}"
runtime_type = "{{ runtime.type }}"
runtime_root = "{{ runtime.root }}"
privileged_without_host_devices = {{ runtime.privileged_without_host_devices|default(false)|lower }}
{% endfor %}

# Kata Containers with the Firecracker VMM
Expand Down
3 changes: 3 additions & 0 deletions roles/container-engine/crun/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
- name: Check if binary exists
stat:
path: "{{ crun_bin_dir }}/crun"
get_attributes: no
get_checksum: no
get_mime: no
register: crun_stat

# TODO: use download_file.yml
Expand Down
3 changes: 3 additions & 0 deletions roles/container-engine/docker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
- name: check if fedora coreos
stat:
path: /run/ostree-booted
get_attributes: no
get_checksum: no
get_mime: no
register: ostree

- name: set is_ostree
Expand Down
Loading