|
39 | 39 | script_dir, |
40 | 40 | ) |
41 | 41 |
|
42 | | -# These are job tab names of unsupported grid combinations |
43 | | -skip_jobs = [ |
44 | | -] |
45 | | - |
46 | | -image = "gcr.io/k8s-staging-test-infra/kubekins-e2e:v20250815-171060767f-master" |
| 42 | +from build_vars import ( # pylint: disable=import-error, no-name-in-module |
| 43 | + skip_jobs, |
| 44 | + image, |
| 45 | + networking_options, |
| 46 | + distro_options, |
| 47 | + k8s_versions, |
| 48 | + kops_versions, |
| 49 | + distros, |
| 50 | + network_plugins_periodics, |
| 51 | + network_plugins_presubmits, |
| 52 | + upgrade_versions_list, |
| 53 | + kops29, |
| 54 | +) |
47 | 55 |
|
48 | 56 | loader = jinja2.FileSystemLoader(searchpath=os.path.join(script_dir, "templates")) |
49 | 57 |
|
@@ -446,41 +454,7 @@ def presubmit_test(branch='master', |
446 | 454 | output += f" {line}\n" |
447 | 455 | return output |
448 | 456 |
|
449 | | -#################### |
450 | | -# Grid Definitions # |
451 | | -#################### |
452 | | - |
453 | | -networking_options = [ |
454 | | - 'kubenet', |
455 | | - 'calico', |
456 | | - 'cilium', |
457 | | - 'cilium-etcd', |
458 | | - 'cilium-eni', |
459 | | - 'kopeio', |
460 | | -] |
461 | | - |
462 | | -distro_options = [ |
463 | | - 'al2023', |
464 | | - 'deb12', |
465 | | - 'deb13', |
466 | | - 'flatcar', |
467 | | - 'rhel8', |
468 | | - 'u2204', |
469 | | - 'u2404', |
470 | | -] |
471 | | - |
472 | | -k8s_versions = [ |
473 | | - "1.31", |
474 | | - "1.32", |
475 | | - "1.33", |
476 | | - "1.34", |
477 | | -] |
478 | | - |
479 | | -kops_versions = [ |
480 | | - None, # maps to latest |
481 | | - "1.30", |
482 | | - "1.31", |
483 | | -] |
| 457 | + |
484 | 458 |
|
485 | 459 |
|
486 | 460 | ############################ |
@@ -1407,12 +1381,6 @@ def generate_conformance(): |
1407 | 1381 | ############################### |
1408 | 1382 | # kops-periodics-distros.yaml # |
1409 | 1383 | ############################### |
1410 | | -distros = ['debian11', 'debian12', 'debian13', |
1411 | | - 'ubuntu2204', 'ubuntu2204arm64', |
1412 | | - 'ubuntu2404', 'ubuntu2404arm64', |
1413 | | - 'amazonlinux2', 'al2023', |
1414 | | - 'rhel8', 'rhel9', 'rocky9', |
1415 | | - 'flatcar'] |
1416 | 1384 | def generate_distros(): |
1417 | 1385 | results = [] |
1418 | 1386 | for distro in distros: |
@@ -1479,10 +1447,9 @@ def generate_presubmits_distros(): |
1479 | 1447 | # kops-periodics-network-plugins.yaml # |
1480 | 1448 | ####################################### |
1481 | 1449 | def generate_network_plugins(): |
1482 | | - |
1483 | | - plugins = ['amazon-vpc', 'calico', 'cilium', 'cilium-etcd', 'cilium-eni', 'flannel', 'kindnet', 'kopeio', 'kuberouter'] |
1484 | | - supports_gce = {'calico', 'cilium', 'kindnet'} |
1485 | | - supports_azure = {'cilium'} |
| 1450 | + plugins = network_plugins_periodics['plugins'] |
| 1451 | + supports_gce = network_plugins_periodics['supports_gce'] |
| 1452 | + supports_azure = network_plugins_periodics['supports_azure'] |
1486 | 1453 | results = [] |
1487 | 1454 | for plugin in plugins: |
1488 | 1455 | networking_arg = plugin.replace('amazon-vpc', 'amazonvpc').replace('kuberouter', 'kube-router') |
@@ -1546,51 +1513,12 @@ def generate_network_plugins(): |
1546 | 1513 | # kops-periodics-upgrades.yaml # |
1547 | 1514 | ################################ |
1548 | 1515 | def generate_upgrades(): |
1549 | | - |
1550 | | - kops29 = 'v1.29.2' |
1551 | | - kops30 = 'v1.30.3' |
1552 | | - kops31 = 'v1.31.0' |
1553 | | - |
1554 | | - versions_list = [ |
1555 | | - # kops k8s kops k8s |
1556 | | - # 1.29 release branch |
1557 | | - ((kops29, 'v1.29.8'), ('1.29', 'v1.29.9')), |
1558 | | - # 1.30 release branch |
1559 | | - ((kops29, 'v1.29.9'), ('1.30', 'v1.30.5')), |
1560 | | - ((kops30, 'v1.30.4'), ('1.30', 'v1.30.5')), |
1561 | | - # kOps 1.29 upgrade to latest |
1562 | | - ((kops29, 'v1.26.0'), ('latest', 'v1.27.0')), |
1563 | | - ((kops29, 'v1.27.0'), ('latest', 'v1.28.0')), |
1564 | | - ((kops29, 'v1.28.0'), ('latest', 'v1.29.0')), |
1565 | | - ((kops29, 'v1.29.0'), ('latest', 'v1.30.0')), |
1566 | | - # kOps 1.30 upgrade to latest |
1567 | | - ((kops30, 'v1.26.0'), ('latest', 'v1.27.0')), |
1568 | | - ((kops30, 'v1.27.0'), ('latest', 'v1.28.0')), |
1569 | | - ((kops30, 'v1.28.0'), ('latest', 'v1.29.0')), |
1570 | | - ((kops30, 'v1.29.0'), ('latest', 'v1.30.0')), |
1571 | | - # kOps 1.31 upgrade to latest |
1572 | | - ((kops31, 'v1.28.0'), ('latest', 'v1.29.0')), |
1573 | | - ((kops31, 'v1.29.0'), ('latest', 'v1.30.0')), |
1574 | | - ((kops31, 'v1.30.0'), ('latest', 'v1.31.0')), |
1575 | | - ((kops31, 'v1.31.0'), ('latest', 'v1.32.0')), |
1576 | | - # we should have an upgrade test for every supported K8s version |
1577 | | - (('latest', 'v1.32.0'), ('latest', 'latest')), |
1578 | | - (('latest', 'v1.31.0'), ('latest', 'v1.32.0')), |
1579 | | - (('latest', 'v1.30.0'), ('latest', 'v1.31.0')), |
1580 | | - (('latest', 'v1.29.0'), ('latest', 'v1.30.0')), |
1581 | | - (('latest', 'v1.28.0'), ('latest', 'v1.29.0')), |
1582 | | - (('latest', 'v1.27.0'), ('latest', 'v1.28.0')), |
1583 | | - (('latest', 'v1.26.0'), ('latest', 'v1.27.0')), |
1584 | | - # kOps latest should always be able to upgrade from stable to latest and stable to ci |
1585 | | - (('latest', 'stable'), ('latest', 'latest')), |
1586 | | - (('latest', 'stable'), ('latest', 'ci')), |
1587 | | - ] |
1588 | 1516 | def shorten(version): |
1589 | 1517 | version = re.sub(r'^v', '', version) |
1590 | 1518 | version = re.sub(r'^(\d+\.\d+)\.\d+$', r'\g<1>', version) |
1591 | 1519 | return version.replace('.', '') |
1592 | 1520 | results = [] |
1593 | | - for versions in versions_list: |
| 1521 | + for versions in upgrade_versions_list: |
1594 | 1522 | kops_a = versions[0][0] |
1595 | 1523 | k8s_a = versions[0][1] |
1596 | 1524 | kops_b = versions[1][0] |
@@ -1891,19 +1819,10 @@ def generate_pipeline(): |
1891 | 1819 | # kops-presubmits-network-plugins.yaml # |
1892 | 1820 | ######################################## |
1893 | 1821 | def generate_presubmits_network_plugins(): |
1894 | | - plugins = { |
1895 | | - 'amazonvpc': r'^(upup\/models\/cloudup\/resources\/addons\/networking\.amazon-vpc-routed-eni\/|pkg\/model\/(firewall|components\/containerd|components\/kubeproxy|iam\/iam_builder)\.go|nodeup\/pkg\/model\/kubelet\.go)', |
1896 | | - 'calico': r'^(upup\/models\/cloudup\/resources\/addons\/networking\.projectcalico\.org\/|pkg\/model\/(components\/containerd|firewall|pki|iam\/iam_builder)\.go|nodeup\/pkg\/model\/networking\/calico\.go)', |
1897 | | - 'cilium': r'^(upup\/models\/cloudup\/resources\/addons\/networking\.cilium\.io\/|pkg\/model\/(components\/containerd|firewall|components\/cilium|iam\/iam_builder)\.go|nodeup\/pkg\/model\/(context|networking\/cilium)\.go)', |
1898 | | - 'cilium-etcd': r'^(upup\/models\/cloudup\/resources\/addons\/networking\.cilium\.io\/|pkg\/model\/(components\/containerd|firewall|components\/cilium|iam\/iam_builder)\.go|nodeup\/pkg\/model\/(context|networking\/cilium)\.go)', |
1899 | | - 'cilium-eni': r'^(upup\/models\/cloudup\/resources\/addons\/networking\.cilium\.io\/|pkg\/model\/(components\/containerd|firewall|components\/cilium|iam\/iam_builder)\.go|nodeup\/pkg\/model\/(context|networking\/cilium)\.go)', |
1900 | | - 'flannel': r'^(upup\/models\/cloudup\/resources\/addons\/networking\.flannel\/)', |
1901 | | - 'kuberouter': r'^(upup\/models\/cloudup\/resources\/addons\/networking\.kuberouter\/|pkg\/model\/components\/containerd\.go)', |
1902 | | - 'kindnet': r'^(upup\/models\/cloudup\/resources\/addons\/networking\.kindnet)', |
1903 | | - } |
1904 | | - supports_ipv6 = {'amazonvpc', 'calico', 'cilium', 'kindnet'} |
1905 | | - supports_gce = {'calico', 'cilium', 'kindnet'} |
1906 | | - supports_azure = {'cilium'} |
| 1822 | + plugins = network_plugins_presubmits['plugins'] |
| 1823 | + supports_ipv6 = network_plugins_presubmits['supports_ipv6'] |
| 1824 | + supports_gce = network_plugins_presubmits['supports_gce'] |
| 1825 | + supports_azure = network_plugins_presubmits['supports_azure'] |
1907 | 1826 | results = [] |
1908 | 1827 | for plugin, run_if_changed in plugins.items(): |
1909 | 1828 | k8s_version = 'stable' |
|
0 commit comments