Skip to content

Commit eb7dc75

Browse files
authoredMar 19, 2025··
Merge pull request #93 from xrstf/add-branchprotector
add branchprotector cronjob
2 parents 6bfffa0 + 83e423d commit eb7dc75

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
apiVersion: batch/v1
2+
kind: CronJob
3+
metadata:
4+
name: branchprotector
5+
namespace: "__PROW_NAMESPACE__"
6+
spec:
7+
schedule: "54 */6 * * *" # Every 6 hours at 54 minutes past the hour
8+
concurrencyPolicy: Forbid
9+
jobTemplate:
10+
metadata:
11+
labels:
12+
app: branchprotector
13+
spec:
14+
template:
15+
spec:
16+
containers:
17+
- name: branchprotector
18+
image: us-docker.pkg.dev/k8s-infra-prow/images/branchprotector:v20250219-e8fa16f56
19+
args:
20+
- -config-path=/etc/config/config.yaml
21+
- -job-config-path=/etc/job-config
22+
- -github-token-path=/etc/github/token
23+
- -confirm
24+
- -github-endpoint=http://ghproxy
25+
- -github-endpoint=https://api.github.com
26+
volumeMounts:
27+
- name: github
28+
mountPath: /etc/github
29+
readOnly: true
30+
- name: config
31+
mountPath: /etc/config
32+
readOnly: true
33+
- name: job-config
34+
mountPath: /etc/job-config
35+
readOnly: true
36+
restartPolicy: Never
37+
volumes:
38+
- name: github
39+
secret:
40+
secretName: github-token
41+
- name: config
42+
configMap:
43+
name: config
44+
- name: job-config
45+
configMap:
46+
name: job-config

0 commit comments

Comments
 (0)
Please sign in to comment.