From e75527f8197d38d5d18ce176d1d63bf5dfdc03fe Mon Sep 17 00:00:00 2001 From: Avi Moondra Date: Wed, 28 Feb 2024 16:12:41 -0500 Subject: [PATCH] add configurable port names for istio compatibility --- .../templates/deployment_code_executor.yaml | 15 ++++++++------- charts/retool/templates/deployment_workflows.yaml | 9 +++++++++ .../templates/deployment_workflows_worker.yaml | 14 +++++++++++--- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/charts/retool/templates/deployment_code_executor.yaml b/charts/retool/templates/deployment_code_executor.yaml index 340cb9f..08dba51 100644 --- a/charts/retool/templates/deployment_code_executor.yaml +++ b/charts/retool/templates/deployment_code_executor.yaml @@ -83,10 +83,11 @@ spec: {{- end }} ports: - containerPort: 3004 + {{ if .Values.codeExecutor.portName }} + name: {{ .Values.codeExecutor.portName }} + {{ else }} name: {{ template "retool.name" . }} - protocol: TCP - - containerPort: 9090 - name: metrics + {{ end }} protocol: TCP {{- if .Values.livenessProbe.enabled }} livenessProbe: @@ -137,9 +138,9 @@ spec: - protocol: TCP port: 80 targetPort: 3004 + {{ if .Values.codeExecutor.portName }} + name: {{ .Values.codeExecutor.portName }} + {{ else }} name: {{ template "retool.name" . }} - - protocol: TCP - port: 9090 - targetPort: metrics - name: metrics + {{ end }} {{- end }} diff --git a/charts/retool/templates/deployment_workflows.yaml b/charts/retool/templates/deployment_workflows.yaml index fae6243..b6cf6c4 100644 --- a/charts/retool/templates/deployment_workflows.yaml +++ b/charts/retool/templates/deployment_workflows.yaml @@ -217,7 +217,11 @@ spec: {{- end }} ports: - containerPort: {{ .Values.service.internalPort }} + {{ if .Values.workflows.backend.portName }} + name: {{ .Values.workflows.backend.portName }} + {{ else }} name: {{ template "retool.name" . }} + {{ end }} protocol: TCP {{- if .Values.livenessProbe.enabled }} livenessProbe: @@ -314,4 +318,9 @@ spec: - protocol: TCP port: 80 targetPort: {{ .Values.service.internalPort }} + {{ if .Values.workflows.backend.portName }} + name: {{ .Values.workflows.backend.portName }} + {{ else }} + name: {{ template "retool.name" . }} + {{ end }} {{- end }} diff --git a/charts/retool/templates/deployment_workflows_worker.yaml b/charts/retool/templates/deployment_workflows_worker.yaml index cafe370..867fc28 100644 --- a/charts/retool/templates/deployment_workflows_worker.yaml +++ b/charts/retool/templates/deployment_workflows_worker.yaml @@ -236,10 +236,14 @@ spec: {{- end }} ports: - containerPort: 3005 + {{ if .Values.workflows.worker.portName }} + name: {{ .Values.workflows.worker.portName }} + {{ else }} name: {{ template "retool.name" . }} + {{ end }} protocol: TCP - containerPort: 9090 - name: metrics + name: {{ .Values.workflows.worker.metricsPortName | default "metrics" }} protocol: TCP {{- if .Values.livenessProbe.enabled }} @@ -336,9 +340,13 @@ spec: - protocol: TCP port: 3005 targetPort: 3005 + {{ if .Values.workflows.worker.portName }} + name: {{ .Values.workflows.worker.portName }} + {{ else }} name: {{ template "retool.name" . }} + {{ end }} - protocol: TCP port: 9090 - targetPort: metrics - name: metrics + targetPort: {{ .Values.workflows.worker.metricsPortName | default "metrics" }} + name: {{ .Values.workflows.worker.metricsPortName | default "metrics" }} {{- end }}