[etcd] ensure etcd is properly upgraded when managed by kubeadm (#8722)

* [etcd] ensure etcd is properly upgraded when managed by kubeadm

* [CI] add periodic job to test upgrade of etcd managed by kubeadm
pull/8723/head
Cristian Calin 2022-04-17 20:32:41 +03:00 committed by GitHub
parent c98a0a448f
commit 3261d26181
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 2 deletions

View File

@ -263,6 +263,13 @@ packet_centos7-docker-weave-upgrade-ha:
variables: variables:
UPGRADE_TEST: basic UPGRADE_TEST: basic
packet_ubuntu20-calico-etcd-kubeadm-upgrade-ha:
stage: deploy-part3
extends: .packet_periodic
when: on_success
variables:
UPGRADE_TEST: basic
# Calico HA Wireguard # Calico HA Wireguard
packet_ubuntu20-calico-ha-wireguard: packet_ubuntu20-calico-ha-wireguard:
stage: deploy-part2 stage: deploy-part2

View File

@ -18,7 +18,7 @@
--config={{ kube_config_dir }}/kubeadm-config.yaml --config={{ kube_config_dir }}/kubeadm-config.yaml
--ignore-preflight-errors=all --ignore-preflight-errors=all
--allow-experimental-upgrades --allow-experimental-upgrades
--etcd-upgrade={{ etcd_deployment_type == "kubeadm" | bool | lower }} --etcd-upgrade={{ (etcd_deployment_type == "kubeadm") | bool | lower }}
--force --force
register: kubeadm_upgrade register: kubeadm_upgrade
# Retry is because upload config sometimes fails # Retry is because upload config sometimes fails
@ -39,7 +39,7 @@
--config={{ kube_config_dir }}/kubeadm-config.yaml --config={{ kube_config_dir }}/kubeadm-config.yaml
--ignore-preflight-errors=all --ignore-preflight-errors=all
--allow-experimental-upgrades --allow-experimental-upgrades
--etcd-upgrade={{ etcd_deployment_type == "kubeadm" | bool | lower }} --etcd-upgrade={{ (etcd_deployment_type == "kubeadm") | bool | lower }}
--force --force
register: kubeadm_upgrade register: kubeadm_upgrade
when: inventory_hostname != first_kube_control_plane when: inventory_hostname != first_kube_control_plane

View File

@ -0,0 +1,13 @@
---
# Instance settings
cloud_image: ubuntu-2004
mode: ha
# use the legacy setting to test the upgrade
etcd_kubeadm_enabled: true
upgrade_cluster_setup: true
# Currently ipvs not available on KVM: https://packages.ubuntu.com/search?suite=focal&arch=amd64&mode=exactfilename&searchon=contents&keywords=ip_vs_sh.ko
kube_proxy_mode: iptables
enable_nodelocaldns: False