diff --git a/testing-framework/runners/k8s/helm/nomos-runner/templates/_helpers.tpl b/testing-framework/runners/k8s/helm/nomos-runner/templates/_helpers.tpl index 1665098..a8d3245 100644 --- a/testing-framework/runners/k8s/helm/nomos-runner/templates/_helpers.tpl +++ b/testing-framework/runners/k8s/helm/nomos-runner/templates/_helpers.tpl @@ -39,3 +39,12 @@ app.kubernetes.io/name: {{ include "nomos-runner.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} nomos/logical-role: prometheus {{- end -}} + +{{- define "nomos-runner.cfgsyncPort" -}} +{{- $env := env "NOMOS_CFGSYNC_PORT" -}} +{{- if $env -}} +{{ $env | int }} +{{- else -}} +{{ .Values.cfgsync.port | int }} +{{- end -}} +{{- end -}} diff --git a/testing-framework/runners/k8s/helm/nomos-runner/templates/cfgsync-deployment.yaml b/testing-framework/runners/k8s/helm/nomos-runner/templates/cfgsync-deployment.yaml index bc497dd..1058072 100644 --- a/testing-framework/runners/k8s/helm/nomos-runner/templates/cfgsync-deployment.yaml +++ b/testing-framework/runners/k8s/helm/nomos-runner/templates/cfgsync-deployment.yaml @@ -23,7 +23,7 @@ spec: command: ["/etc/nomos/scripts/run_cfgsync.sh"] ports: - name: http - containerPort: {{ .Values.cfgsync.port }} + containerPort: {{ include "nomos-runner.cfgsyncPort" . }} env: - name: RUST_LOG value: debug diff --git a/testing-framework/runners/k8s/helm/nomos-runner/templates/cfgsync-service.yaml b/testing-framework/runners/k8s/helm/nomos-runner/templates/cfgsync-service.yaml index db09c16..c9199a2 100644 --- a/testing-framework/runners/k8s/helm/nomos-runner/templates/cfgsync-service.yaml +++ b/testing-framework/runners/k8s/helm/nomos-runner/templates/cfgsync-service.yaml @@ -11,5 +11,5 @@ spec: nomos/component: cfgsync ports: - name: http - port: {{ .Values.cfgsync.port }} + port: {{ include "nomos-runner.cfgsyncPort" . }} targetPort: http diff --git a/testing-framework/runners/k8s/helm/nomos-runner/values.yaml b/testing-framework/runners/k8s/helm/nomos-runner/values.yaml index 8c66c56..9f9f561 100644 --- a/testing-framework/runners/k8s/helm/nomos-runner/values.yaml +++ b/testing-framework/runners/k8s/helm/nomos-runner/values.yaml @@ -2,7 +2,7 @@ image: "nomos-testnet:local" imagePullPolicy: IfNotPresent cfgsync: - port: {{ default 4400 (env "NOMOS_CFGSYNC_PORT") | int }} + port: 4400 config: "" scripts: