Skip to content

Commit 355369d

Browse files
badal773Badal Kumar Prusty
andauthored
misc: exposed the postgres endpoint in migrator and app-sync (#6570)
* exposed the postgres endpoint * renamed the parameter --------- Co-authored-by: Badal Kumar Prusty <[email protected]>
1 parent aae0629 commit 355369d

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

charts/devtron/templates/app-sync-job.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ spec:
3232
image: {{ include "common.image" (dict "component" $.Values.components.chartSync "global" $.Values.global ) }}
3333
{{- include "common.containerSecurityContext" (dict "containerSecurityContext" $.Values.components.chartSync.containerSecurityContext "global" $.Values.global) | indent 8 }}
3434
env:
35-
- name: PG_ADDR
36-
value: postgresql-postgresql.devtroncd
3735
- name: PG_DATABASE
3836
value: orchestrator
3937
- name: PG_USER
4038
value: postgres
4139
envFrom:
40+
- configMapRef:
41+
name: app-sync-cm
4242
- secretRef:
4343
name: devtron-secret
4444
- configMapRef:
@@ -80,8 +80,6 @@ spec:
8080
image: {{ include "common.image" (dict "component" $.Values.components.chartSync "global" $.Values.global ) }}
8181
{{- include "common.containerSecurityContext" (dict "containerSecurityContext" $.Values.components.chartSync.containerSecurityContext "global" $.Values.global) | indent 12 }}
8282
env:
83-
- name: PG_ADDR
84-
value: postgresql-postgresql.devtroncd
8583
- name: PG_DATABASE
8684
value: orchestrator
8785
- name: PG_USER

charts/devtron/templates/migrator.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ spec:
2727
- name: PG_USER
2828
value: postgres
2929
- name: PG_ADDR
30-
value: postgresql-postgresql.devtroncd
30+
value: {{ .configs.PG_ADDR | default "postgresql-postgresql.devtroncd" }}
3131
- name: DB_PORT
3232
value: "5432"
3333
- name: PG_DATABASE
@@ -80,7 +80,7 @@ spec:
8080
- name: DB_USER_NAME
8181
value: postgres
8282
- name: DB_HOST
83-
value: postgresql-postgresql.devtroncd
83+
value: {{ .configs.PG_ADDR | default "postgresql-postgresql.devtroncd" }}
8484
- name: DB_PORT
8585
value: "5432"
8686
- name: DB_NAME
@@ -186,7 +186,7 @@ spec:
186186
- name: DB_USER_NAME
187187
value: postgres
188188
- name: DB_HOST
189-
value: postgresql-postgresql.devtroncd
189+
value: {{ .configs.PG_ADDR | default "postgresql-postgresql.devtroncd" }}
190190
- name: DB_PORT
191191
value: "5432"
192192
- name: DB_NAME
@@ -273,7 +273,7 @@ spec:
273273
- name: DB_USER_NAME
274274
value: postgres
275275
- name: DB_HOST
276-
value: postgresql-postgresql.devtroncd
276+
value: {{ .configs.PG_ADDR | default "postgresql-postgresql.devtroncd" }}
277277
- name: DB_PORT
278278
value: "5432"
279279
- name: DB_NAME
@@ -355,7 +355,7 @@ spec:
355355
- name: DB_USER_NAME
356356
value: postgres
357357
- name: DB_HOST
358-
value: postgresql-postgresql.devtroncd
358+
value: {{ .configs.PG_ADDR | default "postgresql-postgresql.devtroncd" }}
359359
- name: DB_PORT
360360
value: "5432"
361361
- name: DB_NAME
@@ -430,7 +430,7 @@ spec:
430430
- name: DB_USER_NAME
431431
value: postgres
432432
- name: DB_HOST
433-
value: postgresql-postgresql.devtroncd
433+
value: {{ .configs.PG_ADDR | default "postgresql-postgresql.devtroncd" }}
434434
- name: DB_PORT
435435
value: "5432"
436436
- name: DB_NAME

charts/devtron/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ components:
246246
kubectlImage: "kubectl:latest"
247247
duplicateChartImage: devtron-utils:dup-chart-repo-v1.1.0
248248
entMigratorImage: "devtron-utils:geni-v1.1.4"
249+
configs:
250+
PG_ADDR: postgresql-postgresql.devtroncd
249251
envVars:
250252
devtron:
251253
DB_NAME: "orchestrator"
@@ -259,7 +261,8 @@ components:
259261
registry: ""
260262
image: chart-sync:c49b4aa5-836-32103
261263
schedule: "0 19 * * *"
262-
extraConfigs: {}
264+
extraConfigs:
265+
PG_ADDR: postgresql-postgresql.devtroncd
263266
podSecurityContext:
264267
fsGroup: 1001
265268
runAsGroup: 1001

0 commit comments

Comments
 (0)