-
Notifications
You must be signed in to change notification settings - Fork 1
/
kubemarks-pkb-cronjob.yaml
70 lines (70 loc) · 2.31 KB
/
kubemarks-pkb-cronjob.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: kubemarks-pkb
spec:
concurrencyPolicy: Allow
jobTemplate:
spec:
template:
spec:
restartPolicy: Never
containers:
- args:
- /bin/sh
- -c
- scripts/pkb/start.sh $BENCHMARKS_TO_RUN; /bin/sh
env:
- name: PUSHGATEWAY
valueFrom:
configMapKeyRef:
name: kubemarks-conf
key: pushgateway
- name: BENCHMARKS_TO_RUN
valueFrom:
configMapKeyRef:
name: kubemarks-conf
key: benchmarks
image: marcomicera/kubemarks-cronjob:latest
name: kubemarks-pkb
resources: {}
volumeMounts:
- name: kubemarks-root
mountPath: /home/root
- mountPath: /home/root/kubemarks/kubemarks-num-pods.yaml
name: kubemarks-num-pods
readOnly: true
subPath: kubemarks-num-pods.yaml
initContainers:
- name: git-sync
image: k8s.gcr.io/git-sync:v3.1.5
env:
- name: GIT_SYNC_REPO
value: https://github.com/marcomicera/kubemarks.git
- name: GIT_SYNC_ROOT
value: /home/root
- name: GIT_SYNC_DEST
value: kubemarks
- name: GIT_SYNC_BRANCH
value: master
- name: GIT_SYNC_ONE_TIME # exit after the initial checkout
value: "1"
volumeMounts:
- name: kubemarks-root
mountPath: /home/root
securityContext:
runAsUser: 65533 # git-sync user
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["all"]
imagePullPolicy: Always
serviceAccountName: kubemarks
volumes:
- name: kubemarks-root
emptyDir: {}
- name: kubemarks-num-pods
configMap:
name: kubemarks-num-pods
schedule: '0 * * * *'
status: {}