|
| 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 |
0 commit comments