Skip to content

Commit 3ea6f54

Browse files
authored
Add k8s branch 1.35 to tests (#1220)
* Add k8s 1.35 clusters * Test k8s branches sequentially to avoid hitting (very legitimate) quotas * Allow aliases for autoVars/noris to reduce confusion * Apply autovars scaleup (alias for noris) Signed-off-by: Matthias Büchse <matthias.buechse@alasca.cloud>
1 parent 21a01f7 commit 3ea6f54

6 files changed

Lines changed: 134 additions & 19 deletions

File tree

.zuul.d/config.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
periodic-daily:
77
jobs:
88
- scs-check-iaas
9-
- scs-check-kaas
9+
- scs-check-kaas1
10+
- scs-check-kaas2
11+
- scs-check-kaas3
1012
periodic-hourly:
1113
jobs:
1214
- scs-check-scs2-main
@@ -59,17 +61,27 @@
5961
vars:
6062
preset: iaas
6163
- job:
62-
name: scs-check-kaas
64+
name: scs-check-kaas1
6365
parent: scs-check-scs2-main
6466
# timeout:
6567
# a) these tests take a lot of time, I'm afraid, particularly Sonobuoy
6668
# b) keep in mind that this job covers ALL test subjects (at most 4 in parallel)
6769
timeout: 21600 # 6 hrs -- 5 hrs was almost sufficient (reports came through sometimes)
6870
attempts: 1 # this job is heavy, and retries aren't very promising
6971
vars:
70-
preset: kaas
72+
preset: kaas1
7173
iaas: false
7274
kaas: true
7375
section: '.auto' # only do 'heavy' tests on Saturdays
7476
do_provision: true
7577
do_cleanup: false
78+
- job:
79+
name: scs-check-kaas2
80+
parent: scs-check-kaas1
81+
vars:
82+
preset: kaas2
83+
- job:
84+
name: scs-check-kaas3
85+
parent: scs-check-kaas1
86+
vars:
87+
preset: kaas3

Tests/config.toml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,51 @@ scopes = [
4040
"scs-compatible-kaas",
4141
]
4242
subjects = [
43+
"noris-1.33",
4344
"noris-1.34",
45+
"noris-1.35",
4446
"scaleup-1.33",
4547
"scaleup-1.34",
48+
"scaleup-1.35",
4649
"syself-1.33",
4750
"syself-1.34",
51+
"syself-1.35",
52+
]
53+
workers = 16
54+
55+
56+
[presets.kaas1]
57+
scopes = [
58+
"scs-compatible-kaas",
59+
]
60+
subjects = [
61+
"noris-1.33",
62+
"scaleup-1.33",
63+
"syself-1.33",
64+
]
65+
workers = 4
66+
67+
68+
[presets.kaas2]
69+
scopes = [
70+
"scs-compatible-kaas",
71+
]
72+
subjects = [
73+
"noris-1.34",
74+
"scaleup-1.34",
75+
"syself-1.34",
76+
]
77+
workers = 4
78+
79+
80+
[presets.kaas3]
81+
scopes = [
82+
"scs-compatible-kaas",
83+
]
84+
subjects = [
85+
"noris-1.35",
86+
"scaleup-1.35",
87+
"syself-1.35",
4888
]
4989
workers = 4
5090

Tests/kaas/plugin/plugin_gardener.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,10 @@ def __init__(self, plugin_config, basepath='.', cwd='.', name=None):
164164
def _render_template(self, key):
165165
return self.template_map[key].render(**self.vars, **self.secrets)
166166

167-
def _auto_vars_noris(self, api_instance: _gh.CustomObjectsApi):
168-
logging.debug('using autoVars/noris')
167+
def _auto_vars_noris(self, api_instance: _gh.CustomObjectsApi, alias: str):
168+
# this was introduced for use with noris Sovereign Cloud, but it works for others as well,
169+
# and to reduce potential for confusion, allow aliases (such as autoVars/scaleup)
170+
logging.debug(f'using autoVars/{alias}')
169171
cloud_profile = _gh.get_cloudprofile(api_instance, self.namespace, self.vars['cloud_profile_name'])
170172
version_items = cloud_profile['spec']['kubernetes']['versions']
171173
# filter by kubernetesVersion and classification==supported
@@ -178,7 +180,7 @@ def _auto_vars_noris(self, api_instance: _gh.CustomObjectsApi):
178180
]
179181
logging.debug(f'matching k8s versions: {versions}')
180182
if not versions:
181-
raise RuntimeError(f'autoVars/noris failed: no versions found for v{version_prefix}x')
183+
raise RuntimeError(f'autoVars/{alias} failed: no versions found for v{version_prefix}x')
182184
# select latest patch version (assume patch part is numeric)
183185
selected_version = max(versions, key=lambda ver: int(ver.rsplit('.', 1)[-1]))
184186
return {'kubernetes_version': selected_version}
@@ -189,8 +191,8 @@ def _auto_vars(self, auto_vars_kind, co_api: _gh.CustomObjectsApi):
189191
# now on to specifics
190192
if not auto_vars_kind:
191193
return
192-
if auto_vars_kind == 'noris':
193-
auto_vars = self._auto_vars_noris(co_api)
194+
if auto_vars_kind in ('noris', 'scaleup'):
195+
auto_vars = self._auto_vars_noris(co_api, alias=auto_vars_kind)
194196
else:
195197
raise RuntimeError(f'unknown kind of autoVars: {auto_vars_kind}')
196198
logger.debug(f'applying autoVars/{auto_vars_kind}: {auto_vars}')

compliance-monitor/bootstrap.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ accounts:
100100
group: noris
101101
delegates:
102102
- zuul_ci
103+
- subject: noris-1.35
104+
group: noris
105+
delegates:
106+
- zuul_ci
103107
- subject: scaleup-1.33
104108
group: scaleup
105109
delegates:
@@ -108,6 +112,10 @@ accounts:
108112
group: scaleup
109113
delegates:
110114
- zuul_ci
115+
- subject: scaleup-1.35
116+
group: scaleup
117+
delegates:
118+
- zuul_ci
111119
- subject: syself-1.33
112120
group: syself
113121
delegates:
@@ -116,3 +124,7 @@ accounts:
116124
group: syself
117125
delegates:
118126
- zuul_ci
127+
- subject: syself-1.35
128+
group: syself
129+
delegates:
130+
- zuul_ci

playbooks/.config/scs/shoot.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ spec:
4141
credentialsBindingName: {{ credentials_binding_name }}
4242
purpose: evaluation
4343
region: {{ region }}
44-
addons:
45-
kubernetesDashboard:
46-
enabled: false
47-
nginxIngress:
48-
enabled: false
4944
maintenance:
5045
autoUpdate:
5146
kubernetesVersion: true

playbooks/clusters.yaml.j2

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,39 @@ clusters:
5656
garden_api_server: "{{ clouds_conf.noris_api_server }}"
5757
garden_ca_data: "{{ clouds_conf.noris_ca_data }}"
5858
garden_token: "{{ clouds_conf.noris_token }}"
59+
noris-1.35:
60+
kind: gardener
61+
config:
62+
name: 'noris-1-35' # explicit name because dot in name not permissible
63+
kubernetesVersion: '1.35'
64+
autoVars: noris # determine vars.kubernetes_version automatically using kubernetesVersion
65+
templates:
66+
shoot: shoot.yaml
67+
kubeconfig: garden-kubeconfig.yaml
68+
vars:
69+
num_worker_nodes: 3
70+
worker_cidr: "10.250.0.0/16"
71+
machine_type: "SCS-1V-16-50"
72+
machine_image_name: "flatcar"
73+
machine_image_version: "4081.3.6"
74+
networking_type: cilium
75+
region: "nsc-nbg"
76+
zone: "nbg1"
77+
floating_pool_name: "external"
78+
load_balancer_provider: "ovn"
79+
cloud_profile_name: "openstack"
80+
credentials_binding_name: "default-openstack-secret"
81+
garden_namespace: "garden-nkhv1db5ym"
82+
secrets:
83+
garden_api_server: "{{ clouds_conf.noris_api_server }}"
84+
garden_ca_data: "{{ clouds_conf.noris_ca_data }}"
85+
garden_token: "{{ clouds_conf.noris_token }}"
5986
scaleup-1.33:
6087
kind: gardener
6188
config:
6289
name: 'scaleup-1-33' # explicit name because dot in name not permissible
6390
kubernetesVersion: '1.33'
64-
autoVars: noris # determine vars.kubernetes_version automatically using kubernetesVersion; noris works well for us
91+
autoVars: scaleup # determine vars.kubernetes_version automatically using kubernetesVersion
6592
templates:
6693
shoot: shoot.yaml
6794
kubeconfig: garden-kubeconfig.yaml
@@ -88,7 +115,34 @@ clusters:
88115
config:
89116
name: 'scaleup-1-34' # explicit name because dot in name not permissible
90117
kubernetesVersion: '1.34'
91-
autoVars: noris # determine vars.kubernetes_version automatically using kubernetesVersion; noris works well for us
118+
autoVars: scaleup # determine vars.kubernetes_version automatically using kubernetesVersion
119+
templates:
120+
shoot: shoot.yaml
121+
kubeconfig: garden-kubeconfig.yaml
122+
vars:
123+
num_worker_nodes: 3
124+
worker_cidr: "10.250.0.0/16"
125+
machine_type: "SCS-2V-4-40p"
126+
machine_image_name: "gardenlinux"
127+
machine_image_version: "1877.17.0"
128+
networking_type: calico
129+
region: "RegionOne"
130+
zone: "az1"
131+
floating_pool_name: "external"
132+
load_balancer_provider: "ovn"
133+
cloud_profile_name: "occ2"
134+
credentials_binding_name: "c70012-14"
135+
garden_namespace: "garden-c70012-14"
136+
secrets:
137+
garden_api_server: "{{ clouds_conf.scaleup_api_server }}"
138+
garden_ca_data: "{{ clouds_conf.scaleup_ca_data }}"
139+
garden_token: "{{ clouds_conf.scaleup_token }}"
140+
scaleup-1.35:
141+
kind: gardener
142+
config:
143+
name: 'scaleup-1-35' # explicit name because dot in name not permissible
144+
kubernetesVersion: '1.35'
145+
autoVars: scaleup # determine vars.kubernetes_version automatically using kubernetesVersion
92146
templates:
93147
shoot: shoot.yaml
94148
kubeconfig: garden-kubeconfig.yaml
@@ -110,18 +164,18 @@ clusters:
110164
garden_api_server: "{{ clouds_conf.scaleup_api_server }}"
111165
garden_ca_data: "{{ clouds_conf.scaleup_ca_data }}"
112166
garden_token: "{{ clouds_conf.scaleup_token }}"
113-
syself-1.32:
167+
syself-1.35:
114168
kind: clusterstacks
115169
config:
116-
kubernetesVersion: '1.32'
117-
name: 'syself-1-32' # explicit name because dot in name not permissible
170+
kubernetesVersion: '1.35'
171+
name: 'syself-1-35' # explicit name because dot in name not permissible
118172
autoVars: syself # determine cs_class_name and cs_version automatically using kubernetesVersion
119173
templates:
120174
cluster: syself-cluster.yaml
121175
clusterstack: syself-clusterstack.yaml
122176
kubeconfig: syself-kubeconfig.yaml
123177
vars:
124-
cs_name: hetzner-apalla-1-32
178+
cs_name: hetzner-apalla-1-35
125179
num_control_nodes: 3
126180
num_worker_nodes: 3
127181
secrets:

0 commit comments

Comments
 (0)