Skip to content

Commit 55b0e56

Browse files
committed
kOps: Add support for Azure to the generator script
1 parent ece30e5 commit 55b0e56

File tree

5 files changed

+399
-5
lines changed

5 files changed

+399
-5
lines changed

config/jobs/kubernetes/kops/build_jobs.py

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ def build_test(cloud='aws',
117117
if build_cluster is None:
118118
build_cluster = 'k8s-infra-prow-build'
119119

120+
elif cloud == 'azure':
121+
kops_image = None
122+
kops_ssh_user = 'kops'
123+
kops_ssh_key_path = '/etc/ssh-key-secret/ssh-private'
124+
if build_cluster is None:
125+
build_cluster = 'k8s-infra-prow-build'
126+
120127
validation_wait = None
121128
if distro in ('flatcar', 'flatcararm64') or (distro in ('amzn2', 'rhel8') and kops_version in ('1.26', '1.27')):
122129
validation_wait = '20m'
@@ -305,6 +312,13 @@ def presubmit_test(branch='master',
305312
if build_cluster is None:
306313
build_cluster = 'k8s-infra-kops-prow-build'
307314

315+
elif cloud == 'azure':
316+
kops_image = None
317+
kops_ssh_user = 'kops'
318+
kops_ssh_key_path = '/etc/ssh-key-secret/ssh-private'
319+
if build_cluster is None:
320+
build_cluster = 'k8s-infra-prow-build'
321+
308322
elif cloud == 'gce':
309323
kops_image = None
310324
kops_ssh_user = 'prow'
@@ -1433,6 +1447,8 @@ def generate_presubmits_distros():
14331447
def generate_network_plugins():
14341448

14351449
plugins = ['amazon-vpc', 'calico', 'cilium', 'cilium-etcd', 'cilium-eni', 'flannel', 'kindnet', 'kopeio', 'kuberouter']
1450+
supports_gce = {'calico', 'cilium', 'kindnet'}
1451+
supports_azure = {'cilium'}
14361452
results = []
14371453
for plugin in plugins:
14381454
networking_arg = plugin.replace('amazon-vpc', 'amazonvpc').replace('kuberouter', 'kube-router')
@@ -1461,6 +1477,35 @@ def generate_network_plugins():
14611477
runs_per_day=3,
14621478
)
14631479
)
1480+
if plugin in supports_azure:
1481+
results.append(
1482+
build_test(
1483+
cloud="azure",
1484+
# distro="ubuntu2404",
1485+
k8s_version=k8s_version,
1486+
kops_channel='alpha',
1487+
feature_flags=['Azure'],
1488+
name_override=f"kops-azure-cni-{plugin}",
1489+
networking=networking_arg,
1490+
extra_dashboards=['kops-network-plugins'],
1491+
runs_per_day=8
1492+
)
1493+
)
1494+
if plugin in supports_gce:
1495+
results.append(
1496+
build_test(
1497+
cloud="gce",
1498+
# distro="ubuntu2404",
1499+
k8s_version=k8s_version,
1500+
kops_channel='alpha',
1501+
name_override=f"kops-gce-cni-{plugin}",
1502+
networking=networking_arg,
1503+
extra_flags=["--gce-service-account=default"],
1504+
extra_dashboards=['kops-network-plugins'],
1505+
runs_per_day=8,
1506+
)
1507+
)
1508+
14641509
return results
14651510

14661511
################################
@@ -1824,6 +1869,7 @@ def generate_presubmits_network_plugins():
18241869
}
18251870
supports_ipv6 = {'amazonvpc', 'calico', 'cilium', 'kindnet'}
18261871
supports_gce = {'calico', 'cilium', 'kindnet'}
1872+
supports_azure = {'cilium'}
18271873
results = []
18281874
for plugin, run_if_changed in plugins.items():
18291875
k8s_version = 'stable'
@@ -1859,13 +1905,30 @@ def generate_presubmits_network_plugins():
18591905
optional=optional,
18601906
)
18611907
)
1908+
if plugin in supports_azure:
1909+
results.append(
1910+
presubmit_test(
1911+
cloud='azure',
1912+
# distro='ubuntu2404',
1913+
feature_flags=['Azure'],
1914+
k8s_version=k8s_version,
1915+
kops_channel='alpha',
1916+
name=f"pull-kops-e2e-azure-cni-{plugin}",
1917+
tab_name=f"e2e-azure-cni-{plugin}",
1918+
networking=networking_arg,
1919+
run_if_changed=run_if_changed,
1920+
optional=True,
1921+
)
1922+
)
18621923
if plugin in supports_gce:
18631924
results.append(
18641925
presubmit_test(
18651926
cloud='gce',
1927+
# distro='ubuntu2404',
18661928
k8s_version=k8s_version,
18671929
kops_channel='alpha',
18681930
name=f"pull-kops-e2e-gce-cni-{plugin}",
1931+
tab_name=f"e2e-gce-cni-{plugin}",
18691932
networking=networking_arg,
18701933
extra_flags=[
18711934
f"--gce-service-account=default" # Workaround for test-infra#24747

config/jobs/kubernetes/kops/kops-periodics-network-plugins.yaml

Lines changed: 254 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Test jobs generated by build_jobs.py (do not manually edit)
2-
# 9 jobs, total of 189 runs per week
2+
# 13 jobs, total of 413 runs per week
33
periodics:
44

55
# {"cloud": "aws", "distro": "u2404", "extra_flags": "--node-size=t3.large --set=cluster.spec.networking.amazonVPC.env=ENABLE_PREFIX_DELEGATION=true --set=cluster.spec.networking.amazonVPC.env=MINIMUM_IP_TARGET=80 --set=cluster.spec.networking.amazonVPC.env=WARM_IP_TARGET=10 --discovery-store=s3://k8s-kops-prow/discovery", "k8s_version": "stable", "kops_channel": "alpha", "kops_version": "latest", "networking": "amazonvpc"}
@@ -130,6 +130,70 @@ periodics:
130130
testgrid-days-of-results: '90'
131131
testgrid-tab-name: kops-aws-cni-calico
132132

133+
# {"cloud": "gce", "distro": "u2404", "extra_flags": "--gce-service-account=default", "k8s_version": "stable", "kops_channel": "alpha", "kops_version": "latest", "networking": "calico"}
134+
- name: e2e-kops-gce-cni-calico
135+
cron: '26 1-23/3 * * *'
136+
labels:
137+
preset-k8s-ssh: "true"
138+
cluster: k8s-infra-prow-build
139+
decorate: true
140+
decoration_config:
141+
timeout: 90m
142+
extra_refs:
143+
- org: kubernetes
144+
repo: kops
145+
base_ref: master
146+
workdir: true
147+
path_alias: k8s.io/kops
148+
spec:
149+
serviceAccountName: k8s-kops-test
150+
containers:
151+
- command:
152+
- runner.sh
153+
args:
154+
- bash
155+
- -c
156+
- |
157+
make test-e2e-install
158+
kubetest2 kops \
159+
-v 2 \
160+
--up --down \
161+
--cloud-provider=gce \
162+
--admin-access=0.0.0.0/0 \
163+
--create-args="--channel=alpha --networking=calico --gce-service-account=default" \
164+
--kops-version-marker=https://storage.googleapis.com/k8s-staging-kops/kops/releases/markers/master/latest-ci-updown-green.txt \
165+
--kubernetes-version=https://dl.k8s.io/release/stable.txt \
166+
--test=kops \
167+
-- \
168+
--test-args="-test.timeout=60m" \
169+
--test-package-marker=stable.txt \
170+
--parallel=25
171+
env:
172+
- name: KUBE_SSH_KEY_PATH
173+
value: /etc/ssh-key-secret/ssh-private
174+
- name: KUBE_SSH_USER
175+
value: prow
176+
image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20250717-57d1ca3de9-master
177+
imagePullPolicy: Always
178+
resources:
179+
limits:
180+
cpu: "4"
181+
memory: 6Gi
182+
requests:
183+
cpu: "4"
184+
memory: 6Gi
185+
annotations:
186+
test.kops.k8s.io/cloud: gce
187+
test.kops.k8s.io/distro: u2404
188+
test.kops.k8s.io/extra_flags: --gce-service-account=default
189+
test.kops.k8s.io/k8s_version: stable
190+
test.kops.k8s.io/kops_channel: alpha
191+
test.kops.k8s.io/kops_version: latest
192+
test.kops.k8s.io/networking: calico
193+
testgrid-dashboards: kops-distro-u2404, kops-gce, kops-k8s-stable, kops-latest, kops-network-plugins, sig-cluster-lifecycle-kops
194+
testgrid-days-of-results: '35'
195+
testgrid-tab-name: kops-gce-cni-calico
196+
133197
# {"cloud": "aws", "distro": "u2404", "extra_flags": "--node-size=t3.large --discovery-store=s3://k8s-kops-prow/discovery", "k8s_version": "stable", "kops_channel": "alpha", "kops_version": "latest", "networking": "cilium"}
134198
- name: e2e-kops-aws-cni-cilium
135199
cron: '58 5-23/8 * * *'
@@ -194,6 +258,131 @@ periodics:
194258
testgrid-days-of-results: '90'
195259
testgrid-tab-name: kops-aws-cni-cilium
196260

261+
# {"cloud": "azure", "distro": "u2404", "feature_flags": "Azure", "k8s_version": "stable", "kops_channel": "alpha", "kops_version": "latest", "networking": "cilium"}
262+
- name: e2e-kops-azure-cni-cilium
263+
cron: '53 0-23/3 * * *'
264+
labels:
265+
preset-service-account: "true"
266+
preset-kops-azure-cred-wi: "true"
267+
cluster: k8s-infra-prow-build
268+
decorate: true
269+
decoration_config:
270+
timeout: 90m
271+
extra_refs:
272+
- org: kubernetes
273+
repo: kops
274+
base_ref: master
275+
workdir: true
276+
path_alias: k8s.io/kops
277+
spec:
278+
serviceAccountName: azure
279+
containers:
280+
- command:
281+
- runner.sh
282+
args:
283+
- bash
284+
- -c
285+
- |
286+
make test-e2e-install
287+
kubetest2 kops \
288+
-v 2 \
289+
--up --down \
290+
--cloud-provider=azure \
291+
--create-args="--channel=alpha --networking=cilium" \
292+
--env=KOPS_FEATURE_FLAGS=Azure \
293+
--kops-version-marker=https://storage.googleapis.com/k8s-staging-kops/kops/releases/markers/master/latest-ci-updown-green.txt \
294+
--kubernetes-version=https://dl.k8s.io/release/stable.txt \
295+
--test=kops \
296+
-- \
297+
--test-args="-test.timeout=60m" \
298+
--test-package-marker=stable.txt \
299+
--parallel=25
300+
env:
301+
image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20250717-57d1ca3de9-master
302+
imagePullPolicy: Always
303+
resources:
304+
limits:
305+
cpu: "4"
306+
memory: 6Gi
307+
requests:
308+
cpu: "4"
309+
memory: 6Gi
310+
annotations:
311+
test.kops.k8s.io/cloud: azure
312+
test.kops.k8s.io/distro: u2404
313+
test.kops.k8s.io/feature_flags: Azure
314+
test.kops.k8s.io/k8s_version: stable
315+
test.kops.k8s.io/kops_channel: alpha
316+
test.kops.k8s.io/kops_version: latest
317+
test.kops.k8s.io/networking: cilium
318+
testgrid-dashboards: kops-distro-u2404, kops-k8s-stable, kops-latest, kops-network-plugins, sig-cluster-lifecycle-kops
319+
testgrid-days-of-results: '35'
320+
testgrid-tab-name: kops-azure-cni-cilium
321+
322+
# {"cloud": "gce", "distro": "u2404", "extra_flags": "--gce-service-account=default", "k8s_version": "stable", "kops_channel": "alpha", "kops_version": "latest", "networking": "cilium"}
323+
- name: e2e-kops-gce-cni-cilium
324+
cron: '16 1-23/3 * * *'
325+
labels:
326+
preset-k8s-ssh: "true"
327+
cluster: k8s-infra-prow-build
328+
decorate: true
329+
decoration_config:
330+
timeout: 90m
331+
extra_refs:
332+
- org: kubernetes
333+
repo: kops
334+
base_ref: master
335+
workdir: true
336+
path_alias: k8s.io/kops
337+
spec:
338+
serviceAccountName: k8s-kops-test
339+
containers:
340+
- command:
341+
- runner.sh
342+
args:
343+
- bash
344+
- -c
345+
- |
346+
make test-e2e-install
347+
kubetest2 kops \
348+
-v 2 \
349+
--up --down \
350+
--cloud-provider=gce \
351+
--admin-access=0.0.0.0/0 \
352+
--create-args="--channel=alpha --networking=cilium --gce-service-account=default" \
353+
--kops-version-marker=https://storage.googleapis.com/k8s-staging-kops/kops/releases/markers/master/latest-ci-updown-green.txt \
354+
--kubernetes-version=https://dl.k8s.io/release/stable.txt \
355+
--test=kops \
356+
-- \
357+
--test-args="-test.timeout=60m" \
358+
--test-package-marker=stable.txt \
359+
--parallel=25
360+
env:
361+
- name: KUBE_SSH_KEY_PATH
362+
value: /etc/ssh-key-secret/ssh-private
363+
- name: KUBE_SSH_USER
364+
value: prow
365+
image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20250717-57d1ca3de9-master
366+
imagePullPolicy: Always
367+
resources:
368+
limits:
369+
cpu: "4"
370+
memory: 6Gi
371+
requests:
372+
cpu: "4"
373+
memory: 6Gi
374+
annotations:
375+
test.kops.k8s.io/cloud: gce
376+
test.kops.k8s.io/distro: u2404
377+
test.kops.k8s.io/extra_flags: --gce-service-account=default
378+
test.kops.k8s.io/k8s_version: stable
379+
test.kops.k8s.io/kops_channel: alpha
380+
test.kops.k8s.io/kops_version: latest
381+
test.kops.k8s.io/networking: cilium
382+
testgrid-dashboards: kops-distro-u2404, kops-gce, kops-k8s-stable, kops-latest, kops-network-plugins, sig-cluster-lifecycle-kops
383+
testgrid-days-of-results: '35'
384+
testgrid-tab-name: kops-gce-cni-cilium
385+
197386
# {"cloud": "aws", "distro": "u2404", "extra_flags": "--node-size=t3.large --discovery-store=s3://k8s-kops-prow/discovery", "k8s_version": "stable", "kops_channel": "alpha", "kops_version": "latest", "networking": "cilium-etcd"}
198387
- name: e2e-kops-aws-cni-cilium-etcd
199388
cron: '54 3-23/8 * * *'
@@ -450,6 +639,70 @@ periodics:
450639
testgrid-days-of-results: '90'
451640
testgrid-tab-name: kops-aws-cni-kindnet
452641

642+
# {"cloud": "gce", "distro": "u2404", "extra_flags": "--gce-service-account=default", "k8s_version": "stable", "kops_channel": "alpha", "kops_version": "latest", "networking": "kindnet"}
643+
- name: e2e-kops-gce-cni-kindnet
644+
cron: '39 2-23/3 * * *'
645+
labels:
646+
preset-k8s-ssh: "true"
647+
cluster: k8s-infra-prow-build
648+
decorate: true
649+
decoration_config:
650+
timeout: 90m
651+
extra_refs:
652+
- org: kubernetes
653+
repo: kops
654+
base_ref: master
655+
workdir: true
656+
path_alias: k8s.io/kops
657+
spec:
658+
serviceAccountName: k8s-kops-test
659+
containers:
660+
- command:
661+
- runner.sh
662+
args:
663+
- bash
664+
- -c
665+
- |
666+
make test-e2e-install
667+
kubetest2 kops \
668+
-v 2 \
669+
--up --down \
670+
--cloud-provider=gce \
671+
--admin-access=0.0.0.0/0 \
672+
--create-args="--channel=alpha --networking=kindnet --gce-service-account=default" \
673+
--kops-version-marker=https://storage.googleapis.com/k8s-staging-kops/kops/releases/markers/master/latest-ci-updown-green.txt \
674+
--kubernetes-version=https://dl.k8s.io/release/stable.txt \
675+
--test=kops \
676+
-- \
677+
--test-args="-test.timeout=60m" \
678+
--test-package-marker=stable.txt \
679+
--parallel=25
680+
env:
681+
- name: KUBE_SSH_KEY_PATH
682+
value: /etc/ssh-key-secret/ssh-private
683+
- name: KUBE_SSH_USER
684+
value: prow
685+
image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20250717-57d1ca3de9-master
686+
imagePullPolicy: Always
687+
resources:
688+
limits:
689+
cpu: "4"
690+
memory: 6Gi
691+
requests:
692+
cpu: "4"
693+
memory: 6Gi
694+
annotations:
695+
test.kops.k8s.io/cloud: gce
696+
test.kops.k8s.io/distro: u2404
697+
test.kops.k8s.io/extra_flags: --gce-service-account=default
698+
test.kops.k8s.io/k8s_version: stable
699+
test.kops.k8s.io/kops_channel: alpha
700+
test.kops.k8s.io/kops_version: latest
701+
test.kops.k8s.io/networking: kindnet
702+
testgrid-dashboards: kops-distro-u2404, kops-gce, kops-k8s-stable, kops-latest, kops-network-plugins, sig-cluster-lifecycle-kops
703+
testgrid-days-of-results: '35'
704+
testgrid-tab-name: kops-gce-cni-kindnet
705+
453706
# {"cloud": "aws", "distro": "u2404", "extra_flags": "--node-size=t3.large --discovery-store=s3://k8s-kops-prow/discovery", "k8s_version": "stable", "kops_channel": "alpha", "kops_version": "latest", "networking": "kopeio"}
454707
- name: e2e-kops-aws-cni-kopeio
455708
cron: '13 2-23/8 * * *'

0 commit comments

Comments
 (0)