2025-12-17 21:52:11 +01:00

74 lines
2.7 KiB
YAML

{{- $root := . -}}
{{- $nodes := default (list) .Values.executors.nodes }}
{{- range $i, $node := $nodes }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "nomos-runner.fullname" $root }}-executor-{{ $i }}
labels:
{{- include "nomos-runner.executorLabels" (dict "root" $root "index" $i) | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "nomos-runner.executorLabels" (dict "root" $root "index" $i) | nindent 6 }}
template:
metadata:
labels:
{{- include "nomos-runner.executorLabels" (dict "root" $root "index" $i) | nindent 8 }}
spec:
containers:
- name: executor
image: {{ $root.Values.image }}
imagePullPolicy: {{ $root.Values.imagePullPolicy }}
command: ["/etc/nomos/scripts/run_nomos_executor.sh"]
ports:
- name: http
containerPort: {{ default 18080 $node.apiPort }}
- name: testing-http
containerPort: {{ default 18081 $node.testingHttpPort }}
env:
- name: CFG_SERVER_ADDR
value: http://{{ include "nomos-runner.fullname" $root }}-cfgsync:{{ $root.Values.cfgsync.port }}
- name: NOMOS_TIME_BACKEND
value: {{ $root.Values.timeBackend | default "monotonic" | quote }}
- name: NOMOS_KZGRS_PARAMS_PATH
value: '{{ if eq $root.Values.kzg.mode "inImage" }}{{ $root.Values.kzg.inImageParamsPath }}{{ else }}{{ $root.Values.kzg.hostPathParamsPath }}{{ end }}'
{{- range $key, $value := $node.env }}
- name: {{ $key }}
value: "{{ $value }}"
{{- end }}
volumeMounts:
- name: assets
mountPath: /etc/nomos
readOnly: true
{{- if eq $root.Values.kzg.mode "hostPath" }}
- name: kzg-params
mountPath: /kzgrs_test_params
readOnly: true
{{- end }}
volumes:
- name: assets
configMap:
name: {{ include "nomos-runner.fullname" $root }}-assets
defaultMode: 0755
items:
- key: cfgsync.yaml
path: cfgsync.yaml
- key: run_cfgsync.sh
path: scripts/run_cfgsync.sh
- key: run_nomos.sh
path: scripts/run_nomos.sh
- key: run_nomos_executor.sh
path: scripts/run_nomos_executor.sh
- key: run_nomos_node.sh
path: scripts/run_nomos_node.sh
{{- if eq $root.Values.kzg.mode "hostPath" }}
- name: kzg-params
persistentVolumeClaim:
claimName: {{ include "nomos-runner.fullname" $root }}-kzg
readOnly: true
{{- end }}
{{- end }}