From 2edb987c078533cbdf3bae865840f6bd315e91ad Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Thu, 25 May 2023 20:24:29 +0300 Subject: [PATCH] :zap: Template `REACT_APP_HUB_PORT` in the Helm chart --- cmd/helmChart.go | 14 ++++++++++++++ helm-chart/templates/06-front-pod.yaml | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/cmd/helmChart.go b/cmd/helmChart.go index 05ce50676..b51b3a601 100644 --- a/cmd/helmChart.go +++ b/cmd/helmChart.go @@ -162,6 +162,20 @@ var frontPodMappings = map[string]interface{}{ "metadata.namespace": "{{ .Values.tap.selfnamespace }}", "spec.containers[0].image": "{{ .Values.tap.docker.registry }}/front:{{ .Values.tap.docker.tag }}", "spec.containers[0].imagePullPolicy": "{{ .Values.tap.docker.imagepullpolicy }}", + "spec.containers[0].env": []map[string]interface{}{ + { + "name": "REACT_APP_DEFAULT_FILTER", + "value": " ", + }, + { + "name": "REACT_APP_HUB_HOST", + "value": " ", + }, + { + "name": "REACT_APP_HUB_PORT", + "value": "{{ .Values.tap.ingress.enabled | ternary \"80/api\" \"8898\" }}", + }, + }, } var frontServiceMappings = serviceAccountMappings var persistentVolumeMappings = map[string]interface{}{ diff --git a/helm-chart/templates/06-front-pod.yaml b/helm-chart/templates/06-front-pod.yaml index 02d1bdc3d..24c51bcc4 100644 --- a/helm-chart/templates/06-front-pod.yaml +++ b/helm-chart/templates/06-front-pod.yaml @@ -18,7 +18,7 @@ spec: - name: REACT_APP_HUB_HOST value: ' ' - name: REACT_APP_HUB_PORT - value: "8898" + value: '{{ .Values.tap.ingress.enabled | ternary "80/api" "8898" }}' image: '{{ .Values.tap.docker.registry }}/front:{{ .Values.tap.docker.tag }}' imagePullPolicy: '{{ .Values.tap.docker.imagepullpolicy }}' name: kubeshark-front