Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] add configurable port names for istio compatibility #154

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/retool/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: retool
description: A Helm chart for Kubernetes
type: application
version: 6.0.17
version: 6.0.18
maintainers:
- name: Retool Engineering
email: [email protected]
Expand Down
15 changes: 8 additions & 7 deletions charts/retool/templates/deployment_code_executor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Comment on lines +82 to +86

This comment was marked as resolved.

protocol: TCP
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
Expand Down Expand Up @@ -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
Comment on lines -141 to -144
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused, no need to expose this.

{{ end }}
Comment on lines +137 to +141

This comment was marked as resolved.

{{- end }}
9 changes: 9 additions & 0 deletions charts/retool/templates/deployment_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}
14 changes: 11 additions & 3 deletions charts/retool/templates/deployment_workflows_worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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" . }}
Comment on lines +345 to 346

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 346 is the fallback if .Values.workflows.worker.portName is not set, so we should be good here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean like you do above - the conditional L343-L347 becomes one line

name: {{ .Values.workflows.worker.portName | default (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 }}
Loading