Skip to content

Commit

Permalink
test-fix-1
Browse files Browse the repository at this point in the history
  • Loading branch information
niam0522 committed Nov 26, 2024
1 parent 097ea73 commit e21d041
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 48 deletions.
29 changes: 0 additions & 29 deletions documentation/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5995,35 +5995,6 @@ If the task is skipped, then it is not able to schedule the cumulative point. Fo

The tables below shows the correspondence of versions that are supported and is used during the installation:

## Default Dependent Components Versions for Kubernetes Versions v1.26.11
| Type | Name | Versions | | | | | | | Note |
|----------|----------------------------------------------------------------|------------------|------------------------------|--------------|--------------|-------------------|-----------|-----------|------------------------------------------------------------------------------------------------------------|
| | | CentOS RHEL 7.5+ | CentOS RHEL Oracle Linux 8.4 | Ubuntu 20.04,22.04 | Ubuntu 24.04 | Oracle Linux 7.5+ | RHEL 8.6+ | RockyLinux 8.6+ | |
| binaries | kubeadm | v1.26.11 | v1.26.11 | v1.26.11 | unsupported | v1.26.11 | v1.26.11 | v1.26.11 | SHA1: 3d634ce0bf8db1ab5a9ea723443e7bce042c865b |
| | kubelet | v1.26.11 | v1.26.11 | v1.26.11 | unsupported | v1.26.11 | v1.26.11 | v1.26.11 | SHA1: 497d7785658f4b247404580a821c22958f7a4b93 |
| | kubectl | v1.26.11 | v1.26.11 | v1.26.11 | unsupported | v1.26.11 | v1.26.11 | v1.26.11 | SHA1: df1fa17ce624c2a3e6a05b26157f93719b640bfa |
| | calicoctl | v3.26.4 | v3.26.4 | v3.26.4 | unsupported | v3.26.4 | v3.26.4 | v3.26.4 | SHA1: 46875b3d28318553fe382db0766a0916f2556217 Required only if calico is installed. |
| | crictl | v1.28.0 | v1.28.0 | v1.28.0 | unsupported | v1.28.0 | v1.28.0 | v1.28.0 | SHA1: 1199411456ab5a1e0dd9524724f15e92aa3f9da7 |
| rpms | containerd.io | 1.6.* | 1.6.* | 1.6.* | unsupported | 1.6.* | 1.6.* | 1.6.* | |
| | haproxy/rh-haproxy | 1.8 | 1.8 | 2.* | unsupported | 1.8 | 1.8 | 1.8 | Required only if balancers are presented in the deployment scheme. |
| | keepalived | 1.3 | 2.1 | 2.* | unsupported | 1.3 | 2.1 | 2.1 | Required only if VRRP is presented in the deployment scheme. |
| images | registry.k8s.io/kube-apiserver | v1.26.11 | v1.26.11 | v1.26.11 | unsupported | v1.26.11 | v1.26.11 | v1.26.11 | |
| | registry.k8s.io/kube-controller-manager | v1.26.11 | v1.26.11 | v1.26.11 | unsupported | v1.26.11 | v1.26.11 | v1.26.11 | |
| | registry.k8s.io/kube-proxy | v1.26.11 | v1.26.11 | v1.26.11 | unsupported | v1.26.11 | v1.26.11 | v1.26.11 | |
| | registry.k8s.io/kube-scheduler | v1.26.11 | v1.26.11 | v1.26.11 | unsupported | v1.26.11 | v1.26.11 | v1.26.11 | |
| | registry.k8s.io/coredns | v1.9.3 | v1.9.3 | v1.9.3 | unsupported | v1.9.3 | v1.9.3 | v1.9.3 | |
| | registry.k8s.io/pause | 3.9 | 3.9 | 3.9 | unsupported | 3.9 | 3.9 | 3.9 | |
| | registry.k8s.io/etcd | 3.5.9-0 | 3.5.9-0 | 3.5.9-0 | unsupported | 3.5.9-0 | 3.5.9-0 | 3.5.9-0 | |
| | calico/typha | v3.26.4 | v3.26.4 | v3.26.4 | unsupported | v3.26.4 | v3.26.4 | v3.26.4 | Required only if Typha is enabled in Calico config. |
| | calico/cni | v3.26.4 | v3.26.4 | v3.26.4 | unsupported | v3.26.4 | v3.26.4 | v3.26.4 | |
| | calico/node | v3.26.4 | v3.26.4 | v3.26.4 | unsupported | v3.26.4 | v3.26.4 | v3.26.4 | |
| | calico/kube-controllers | v3.26.4 | v3.26.4 | v3.26.4 | unsupported | v3.26.4 | v3.26.4 | v3.26.4 | |
| | calico/apiserver | v3.26.4 | v3.26.4 | v3.26.4 | unsupported | v3.26.4 | v3.26.4 | v3.26.4 | Required only if API server is enabled in Calico config. |
| | registry.k8s.io/ingress-nginx/controller | v1.8.4 | v1.8.4 | v1.8.4 | unsupported | v1.8.4 | v1.8.4 | v1.8.4 | |
| | registry.k8s.io/kube-webhook-certgen | v20231011-8b53cabe0 | v20231011-8b53cabe0 | v20231011-8b53cabe0 | unsupported | v20231011-8b53cabe0 | v20231011-8b53cabe0 | v20231011-8b53cabe0 | |
| | kubernetesui/dashboard | v2.7.0 | v2.7.0 | v2.7.0 | unsupported | v2.7.0 | v2.7.0 | v2.7.0 | Required only if Kubernetes Dashboard plugin is set to be installed. |
| | kubernetesui/metrics-scraper | v1.0.8 | v1.0.8 | v1.0.8 | unsupported | v1.0.8 | v1.0.8 | v1.0.8 | Required only if Kubernetes Dashboard plugin is set to be installed. |
| | rancher/local-path-provisioner | v0.0.25 | v0.0.25 | v0.0.25 | unsupported | v0.0.25 | v0.0.25 | v0.0.25 | Required only if local-path provisioner plugin is set to be installed. |

## Default Dependent Components Versions for Kubernetes Versions v1.27.13
| Type | Name | Versions | | | | | | | Note |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"properties": {
"kubernetesVersion": {
"type": "string",
"default": "v1.26.11",
"default": "v1.27.13",
"description": "Specify the version to install and maintain. This version applies into all the dependent parameters - images, binaries, rpms, configurations."
},
"imageRepository": {
Expand Down
12 changes: 6 additions & 6 deletions test/unit/core/test_run_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def failed_task(_: demo.FakeKubernetesCluster):

@test_utils.temporary_directory
def test_upgrade_templates_two_versions(self):
before, through, after = 'v1.26.11', 'v1.27.13', 'v1.28.12'
before, through, after = 'v1.27.13', 'v1.28.12', 'v1.29.7'
self.inventory['values'] = {
'before': before, 'through': through, 'after': after,
}
Expand Down Expand Up @@ -249,7 +249,7 @@ def test_upgrade_templates_two_versions(self):

@test_utils.temporary_directory
def test_upgrade_templates_second_version_failed_task(self):
before, through, after = 'v1.26.11', 'v1.27.13', 'v1.28.12'
before, through, after = 'v1.27.13', 'v1.28.12', 'v1.29.7'
self.inventory['values'] = {
'before': before, 'through': through, 'after': after,
}
Expand Down Expand Up @@ -286,7 +286,7 @@ def failed_task(_: demo.FakeKubernetesCluster):
@test_utils.temporary_directory
def test_upgrade_failed_enrichment(self):
self.inventory['services']['kubeadm'] = {
'kubernetesVersion': 'v1.26.11'
'kubernetesVersion': 'v1.27.13'
}
self.procedure_inventory = demo.generate_procedure_inventory('upgrade')
self.procedure_inventory['upgrade_plan'] = ['v1.27.13']
Expand All @@ -303,7 +303,7 @@ def test_upgrade_templates_failed_enrichment(self):
with self.subTest(f"version verified: {verified}"), test_utils.temporary_directory(self):
self.inventory = demo.generate_inventory(**demo.ALLINONE)
self.inventory['values'] = {
'before': 'v1.26.11', 'after': 'v1.27.13'
'before': 'v1.27.13', 'after': 'v1.28.12'
}
self.inventory['services']['kubeadm'] = {
'kubernetesVersion': '{{ values.before }}'
Expand Down Expand Up @@ -341,7 +341,7 @@ def enrichment_failed(_: KubernetesCluster) -> None:
@test_utils.temporary_directory
def test_upgrade_formatted_procedure_inventory(self):
self.inventory['services']['kubeadm'] = {
'kubernetesVersion': 'v1.26.11'
'kubernetesVersion': 'v1.27.13'
}
procedure_inventory_text = dedent("""\
upgrade_plan:
Expand Down Expand Up @@ -552,7 +552,7 @@ def test_procedure_enrich_inventory_dump_cluster_state(self):
self.inventory = demo.generate_inventory(**demo.ALLINONE)
self.inventory['values'] = {'k': 'v1'}
self.inventory['services']['kubeadm'] = {
'kubernetesVersion': 'v1.26.11'
'kubernetesVersion': 'v1.27.13'
}
self.procedure_inventory = demo.generate_procedure_inventory('upgrade')
self.procedure_inventory['upgrade_plan'] = ['v1.27.13']
Expand Down
24 changes: 12 additions & 12 deletions test/unit/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def test_dont_require_package_redefinition_does_not_support_upgrade(self):
self.new_cluster()

def test_require_package_redefinition_version_templates(self):
before, through1, through2, after = 'v1.27.1', 'v1.27.4', 'v1.27.13', 'v1.28.12'
before, through1, through2, after = 'v1.27.1', 'v1.27.13', 'v1.28.12', 'v1.29.7'
for template in (False, True):
with self.subTest(f"template: {template}"), \
utils.assert_raises_kme(
Expand All @@ -353,7 +353,7 @@ def test_require_package_redefinition_version_templates(self):
self.run_actions()

def test_require_package_redefinition_first_step(self):
self.setUpVersions('v1.27.1', ['v1.27.4', 'v1.27.13'])
self.setUpVersions('v1.27.1', ['v1.27.13', 'v1.28.12'])
self.inventory['services']['packages']['associations']['containerd']['package_name'] = 'containerd-redefined'
self.upgrade[self.upgrade_plan[0]]['packages']['associations']['containerd']['package_name'] = 'containerd-upgrade1'

Expand Down Expand Up @@ -551,7 +551,7 @@ def test_require_version_redefinition(self):
self.new_cluster()

def test_require_image_redefinition_version_templates(self):
before, through1, through2, after = 'v1.27.1', 'v1.27.4', 'v1.27.13', 'v1.28.12'
before, through1, through2, after = 'v1.27.1', 'v1.27.13', 'v1.28.12', 'v1.29.7'
for template in (False, True):
with self.subTest(f"template: {template}"), \
utils.assert_raises_kme(
Expand All @@ -578,7 +578,7 @@ def test_require_image_redefinition_version_templates(self):
self.run_actions()

def test_require_image_redefinition_first_step(self):
self.setUpVersions('v1.27.1', ['v1.27.4', 'v1.27.13'])
self.setUpVersions('v1.27.1', ['v1.27.13', 'v1.28.12'])
self.inventory['plugins'].setdefault('kubernetes-dashboard', {})\
.setdefault('dashboard', {})['image'] = 'dashboard-redefined'
self.upgrade[self.upgrade_plan[0]]['plugins'].setdefault('kubernetes-dashboard', {})\
Expand Down Expand Up @@ -824,7 +824,7 @@ def test_dont_require_redefinition_source_templates(self):
self.new_cluster()

def test_dont_require_redefinition_source_template_defaults_changed_second_step(self):
self.setUpVersions('v1.27.1', ['v1.27.4', 'v1.27.13'])
self.setUpVersions('v1.27.1', ['v1.27.13', 'v1.28.12'])
self.inventory['services']['thirdparties']['/usr/bin/crictl.tar.gz'] \
= 'crictl-{{ globals.compatibility_map.software.crictl[services.kubeadm.kubernetesVersion].version }}'

Expand Down Expand Up @@ -865,7 +865,7 @@ def test_require_sha1_change_if_source_changed(self):
self.new_cluster()

def test_require_source_redefinition_version_templates(self):
before, through1, through2, after = 'v1.27.1', 'v1.27.4', 'v1.27.13', 'v1.28.12'
before, through1, through2, after = 'v1.27.1', 'v1.27.13', 'v1.28.12', 'v1.29.7'
for template in (False, True):
with self.subTest(f"template: {template}"), \
utils.assert_raises_kme(
Expand Down Expand Up @@ -940,7 +940,7 @@ def test_require_sandbox_image_redefinition(self):
self.new_cluster()

def test_require_sandbox_image_redefinition_version_templates(self):
before, through1, through2, after = 'v1.27.1', 'v1.27.4', 'v1.27.13', 'v1.28.12'
before, through1, through2, after = 'v1.27.1', 'v1.27.13', 'v1.28.12', 'v1.29.7'
for template in (False, True):
with self.subTest(f"template: {template}"), \
utils.assert_raises_kme(
Expand All @@ -962,7 +962,7 @@ def test_require_sandbox_image_redefinition_version_templates(self):
self.run_actions()

def test_require_sandbox_image_redefinition_first_step(self):
self.setUpVersions('v1.27.1', ['v1.27.4', 'v1.27.13'])
self.setUpVersions('v1.27.1', ['v1.27.13', 'v1.28.12'])
self._grpc_cri(self.inventory['services'])['sandbox_image'] = 'pause-redefined'
self._grpc_cri(self.upgrade[self.upgrade_plan[0]])['sandbox_image'] = 'pause-upgrade1'

Expand Down Expand Up @@ -1125,9 +1125,9 @@ def _first_control_plane(self) -> dict:

def test_kubernetes_preconfigure_apiserver_feature_gates_if_necessary(self):
for old, new, expected_called in (
('v1.26.11', 'v1.27.13', False),
('v1.27.13', 'v1.28.12', True),
('v1.28.3', 'v1.28.12', False),
('v1.27.13', 'v1.28.12', False),
('v1.28.12', 'v1.29.7', True),
('v1.29.4', 'v1.29.7', False),
):
with self.subTest(f"old: {old}, new: {new}"), \
utils.mock_call(kubernetes.components.reconfigure_components) as run:
Expand Down Expand Up @@ -1232,4 +1232,4 @@ def test_kubernetes_preconfigure_kube_proxy_conntrack_min_edit_func(self):


if __name__ == '__main__':
unittest.main()
unittest.main()

0 comments on commit e21d041

Please sign in to comment.