Skip to content

Commit 17ed076

Browse files
committed
add template for xspress-control
1 parent b4bf83e commit 17ed076

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{{- $enabled := eq .Values.global.enabled false | ternary false true -}}
2+
kind: StatefulSet
3+
apiVersion: apps/v1
4+
metadata:
5+
name: {{ .Values.detectorName }}-xspress-control
6+
labels:
7+
enabled: {{ $enabled | quote }}
8+
spec:
9+
replicas: {{ $enabled | ternary 1 0 }}
10+
selector:
11+
matchLabels:
12+
app: {{ .Values.detectorName }}-xspress-control
13+
template:
14+
metadata:
15+
labels:
16+
app: {{ .Values.detectorName }}-xspress-control
17+
spec:
18+
{{- with .Values.affinity }}
19+
affinity:
20+
{{- toYaml . | nindent 8 }}
21+
{{- end }}
22+
{{- with .Values.tolerations }}
23+
tolerations:
24+
{{- toYaml . | nindent 8 }}
25+
{{- end }}
26+
{{- with .Values.nodeSelector }}
27+
nodeSelector:
28+
{{- toYaml . | nindent 8 }}
29+
{{- end }}
30+
volumes:
31+
- name: {{ .Values.detectorName }}-odin-config-volume
32+
configMap:
33+
name: {{ .Values.detectorName }}-odin-config
34+
defaultMode: 0755
35+
{{- with .Values.configVolume }}
36+
- name: {{ $.Values.detectorName }}-config
37+
hostPath:
38+
path: {{ .hostPath }}
39+
type: Directory
40+
{{- end }}
41+
containers:
42+
- name: {{ .Values.detectorName }}-xspress-control
43+
image: {{ .Values.image }}
44+
command:
45+
- /odin/deployment/xspress-control.sh
46+
ports:
47+
- containerPort: 12000
48+
volumeMounts:
49+
- name: {{ .Values.detectorName }}-odin-config-volume
50+
mountPath: /odin/deployment
51+
{{- with .configVolume }}
52+
- name: {{ $.Values.detectorName }}-config
53+
mountPath: {{ .hostPath }}
54+
mountPropagation: HostToContainer
55+
{{- end }}
56+
{{- with .Values.xspressControlResources }}
57+
resources:
58+
{{- toYaml . | nindent 12 }}
59+
{{- end }}
60+
{{- with $.Values.securityContext }}
61+
securityContext:
62+
{{- toYaml . | nindent 12 }}
63+
{{- end }}
64+
---
65+
kind: Service
66+
apiVersion: v1
67+
metadata:
68+
name: {{ .Values.detectorName }}-xspress-control
69+
spec:
70+
selector:
71+
app: {{ .Values.detectorName }}-xspress-control
72+
ports:
73+
- name: {{ .Values.detectorName }}-xspress-control-ctrl
74+
protocol: TCP
75+
port: 12000

Charts/odin-xspress/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,17 @@ sharedMemorySize:
3939
numChannels: 8
4040
numCards: 2
4141
settingsPath: /example/settings
42+
configVolume: /example
4243
simulation: 0
4344

45+
xspressControlResources:
46+
limits:
47+
cpu: 1000m
48+
memory: 256Mi
49+
requests:
50+
cpu: 1000m
51+
memory: 256Mi
52+
4453
odinServerResources:
4554
limits:
4655
cpu: 1000m

0 commit comments

Comments
 (0)