Skip to content

Commit 248a51d

Browse files
committed
migrate label sync job to k8s infra
1 parent 236f005 commit 248a51d

File tree

3 files changed

+43
-44
lines changed

3 files changed

+43
-44
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
periodics:
2+
- cron: "17 * * * *" # Every hour at 17 minutes past the hour
3+
name: ci-test-infra-label-sync
4+
cluster: k8s-infra-prow-build-trusted
5+
labels:
6+
app: label-sync
7+
decorate: true
8+
spec:
9+
containers:
10+
- name: label-sync
11+
image: gcr.io/k8s-prow/label_sync:v20240513-a9bd71bf01
12+
command:
13+
- label_sync
14+
args:
15+
- --config=/etc/config/labels.yaml
16+
- --confirm=true
17+
- --orgs=kubernetes,kubernetes-client,kubernetes-csi,kubernetes-sigs
18+
- --token=/etc/github/token
19+
- --endpoint=http://ghproxy.default.svc.cluster.local
20+
- --endpoint=https://api.github.com
21+
- --debug
22+
volumeMounts:
23+
- name: github
24+
mountPath: /etc/github
25+
readOnly: true
26+
- name: config
27+
mountPath: /etc/config
28+
readOnly: true
29+
volumes:
30+
- name: github
31+
secret:
32+
secretName: k8s-github-robot-github-token
33+
- name: config
34+
configMap:
35+
name: label-config
36+
annotations:
37+
testgrid-num-failures-to-alert: '6'
38+
testgrid-alert-stale-results-hours: '12'
39+
testgrid-dashboards: sig-testing-misc
40+
testgrid-tab-name: label_sync
41+
testgrid-alert-email: [email protected], [email protected]
42+
description: Runs label_sync to synchronize GitHub repo labels with the label config defined in label_sync/labels.yaml.

config/jobs/kubernetes/test-infra/test-infra-trusted.yaml

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -480,47 +480,6 @@ periodics:
480480
testgrid-tab-name: branchprotector
481481
testgrid-alert-email: [email protected], [email protected]
482482
description: Runs Prow's branchprotector to apply configured GitHub status context requirements and merge policies.
483-
- cron: "17 * * * *" # Every hour at 17 minutes past the hour
484-
name: ci-test-infra-label-sync
485-
cluster: test-infra-trusted
486-
labels:
487-
app: label-sync
488-
decorate: true
489-
spec:
490-
containers:
491-
- name: label-sync
492-
image: gcr.io/k8s-prow/label_sync:v20240513-a9bd71bf01
493-
command:
494-
- label_sync
495-
args:
496-
- --config=/etc/config/labels.yaml
497-
- --confirm=true
498-
- --orgs=kubernetes,kubernetes-client,kubernetes-csi,kubernetes-sigs
499-
- --token=/etc/github/oauth
500-
- --endpoint=http://ghproxy.default.svc.cluster.local
501-
- --endpoint=https://api.github.com
502-
- --debug
503-
volumeMounts:
504-
- name: oauth
505-
mountPath: /etc/github
506-
readOnly: true
507-
- name: config
508-
mountPath: /etc/config
509-
readOnly: true
510-
volumes:
511-
- name: oauth
512-
secret:
513-
secretName: oauth-token
514-
- name: config
515-
configMap:
516-
name: label-config
517-
annotations:
518-
testgrid-num-failures-to-alert: '6'
519-
testgrid-alert-stale-results-hours: '12'
520-
testgrid-dashboards: sig-testing-misc
521-
testgrid-tab-name: label_sync
522-
testgrid-alert-email: [email protected], [email protected]
523-
description: Runs label_sync to synchronize GitHub repo labels with the label config defined in label_sync/labels.yaml.
524483
- cron: "17 */6 * * *" # Every 6 hours at 17 minutes past the hour
525484
name: ci-test-infra-gencred-refresh-kubeconfig
526485
cluster: test-infra-trusted

label_sync/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ go run ./label_sync \
7070

7171
## Our Deployment
7272

73-
We run this as a [`Periodic
74-
job`](https://prow.k8s.io?job=ci-test-infra-label-sync) as configured at
75-
[test-infra-trusted.yaml](https://github.com/kubernetes/test-infra/blob/0aa0d7b9cee8832e9eca748952131baaa809351c/config/jobs/kubernetes/test-infra/test-infra-trusted.yaml#L702).
73+
We run this as a [`Periodic job`](https://prow.k8s.io?job=ci-test-infra-label-sync) `ci-test-infra-label-sync` configured under `config/jobs`.
7674

7775
This job read [`labels.yaml`](./labels.yaml) from a ConfigMap that is updated by
7876
the [prow updateconfig plugin](/prow/plugins/updateconfig).

0 commit comments

Comments
 (0)