Skip to content

Commit 52f0d23

Browse files
authored
chore: Add CUBEJS_PG_SQL_PORT to cubejs helm chart env (#5598) Thanks @Barsoomx!
* Add CUBEJS_PG_SQL_PORT to cubejs helm chart env * remove default value
1 parent 5f72d8f commit 52f0d23

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

examples/helm-charts/cubejs/templates/common-env.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
- name: CUBEJS_SQL_PORT
1010
value: {{ .Values.config.sqlPort | quote }}
1111
{{- end }}
12+
{{- if .Values.config.pgSqlPort }}
13+
- name: CUBEJS_PG_SQL_PORT
14+
value: {{ .Values.config.pgSqlPort | quote }}
15+
{{- end }}
1216
{{- if .Values.config.sqlUser }}
1317
- name: CUBEJS_SQL_USER
1418
value: {{ .Values.config.sqlUser | quote }}

examples/helm-charts/cubejs/templates/master/deployment.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ spec:
4848
containerPort: {{ .Values.config.sqlPort }}
4949
protocol: TCP
5050
{{- end }}
51+
{{- if .Values.config.pgSqlPort }}
52+
- name: pgsql
53+
containerPort: {{ .Values.config.pgSqlPort }}
54+
protocol: TCP
55+
{{- end }}
5156
env:
5257
{{- include "cubejs.common-env" . | nindent 12 }}
5358
{{- if .Values.master.livenessProbe.enabled }}

examples/helm-charts/cubejs/templates/master/service.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ spec:
2222
port: {{ .Values.config.sqlPort }}
2323
targetPort: sql
2424
{{- end}}
25+
{{- if .Values.config.pgSqlPort }}
26+
- name: pgsql
27+
port: {{ .Values.config.pgSqlPort }}
28+
targetPort: pgsql
29+
{{- end}}
2530
selector:
2631
app.kubernetes.io/component: master
2732
{{- include "cubejs.selectorLabels" . | nindent 4 }}

examples/helm-charts/cubejs/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ config:
4242
##
4343
sqlPort:
4444

45+
## The port for a Cube.js deployment to listen to Postgres SQL connections on
46+
##
47+
pgSqlPort:
48+
4549
## The username to access the SQL api
4650
##
4751
sqlUser:

0 commit comments

Comments
 (0)