Skip to content

Commit 77159e3

Browse files
committed
add qemu statefulset
1 parent afc2ced commit 77159e3

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
apiVersion: apps/v1
2+
kind: StatefulSet
3+
metadata:
4+
name: qemu-exporter
5+
spec:
6+
serviceName: qemu-exporter
7+
replicas: 5
8+
selector:
9+
matchLabels:
10+
exporter-mock: qemu
11+
template:
12+
metadata:
13+
labels:
14+
exporter-mock: qemu
15+
annotations:
16+
openshift.io/required-scc: privileged
17+
spec:
18+
restartPolicy: Always
19+
20+
containers:
21+
- name: jumpstarter-exporter
22+
image: quay.io/mangelajo/jumpstarter:rel6-qemu
23+
securityContext:
24+
privileged: true
25+
imagePullPolicy: Always
26+
resources:
27+
limits:
28+
cpu: 2.0
29+
memory: "2G"
30+
requests:
31+
cpu: 0.1
32+
memory: "1G"
33+
env:
34+
- name: JUMPSTARTER_GRPC_INSECURE
35+
value: "1"
36+
# note for some reason jmp-exporter run $(cat /etc/hostname) won't find the config, neither does list
37+
command: ["/bin/sh", "-c", "echo running exporter $(cat /etc/hostname); jmp run --exporter-config /etc/jumpstarter/exporters/$(cat /etc/hostname).yaml"]
38+
# map the exporter-configs ConfigMap to /etc/jumpstarter/exporters
39+
volumeMounts:
40+
- name: exporter-configs
41+
mountPath: /etc/jumpstarter/exporters
42+
- mountPath: /shared
43+
name: shared
44+
- mountPath: /dev/kvm
45+
name: dev-kvm
46+
- mountPath: /dev/vhost-vsock
47+
name: dev-vhost-vsock
48+
49+
volumes:
50+
- name: exporter-configs
51+
configMap:
52+
name: exporter-configs
53+
- name: shared
54+
emptyDir: {}
55+
- name: dev-kvm
56+
hostPath:
57+
path: /dev/kvm
58+
type: CharDevice
59+
- name: dev-vhost-vsock
60+
hostPath:
61+
path: /dev/vhost-vsock
62+
type: CharDevice

0 commit comments

Comments
 (0)