fix: use variable to determine postgresql service name
This commit is contained in:
parent
abe220ff40
commit
9e73054781
|
@ -19,6 +19,16 @@ secretGenerator:
|
||||||
- username=hydra
|
- username=hydra
|
||||||
- password=NotSoSecret
|
- password=NotSoSecret
|
||||||
|
|
||||||
|
|
||||||
|
vars:
|
||||||
|
- name: HYDRA_DATABASE_SERVICE_NAME
|
||||||
|
objref:
|
||||||
|
name: hydra-postgres
|
||||||
|
kind: Cluster
|
||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
fieldref:
|
||||||
|
fieldpath: metadata.name
|
||||||
|
|
||||||
patchesJson6902:
|
patchesJson6902:
|
||||||
- target:
|
- target:
|
||||||
group: apps
|
group: apps
|
||||||
|
|
|
@ -18,4 +18,4 @@
|
||||||
path: "/spec/template/spec/containers/0/env/-"
|
path: "/spec/template/spec/containers/0/env/-"
|
||||||
value:
|
value:
|
||||||
name: DSN
|
name: DSN
|
||||||
value: "postgres://$(HYDRA_DATABASE_USER):$(HYDRA_DATABASE_PASSWORD)@hydra-postgres-rw:5432/hydra?sslmode=disable"
|
value: "postgres://$(HYDRA_DATABASE_USER):$(HYDRA_DATABASE_PASSWORD)@$(HYDRA_DATABASE_SERVICE_NAME)-rw:5432/hydra?sslmode=disable"
|
|
@ -18,4 +18,4 @@
|
||||||
path: "/spec/template/spec/containers/0/env/-"
|
path: "/spec/template/spec/containers/0/env/-"
|
||||||
value:
|
value:
|
||||||
name: DSN
|
name: DSN
|
||||||
value: "postgres://$(HYDRA_DATABASE_USER):$(HYDRA_DATABASE_PASSWORD)@hydra-postgres-rw:5432/hydra?sslmode=disable"
|
value: "postgres://$(HYDRA_DATABASE_USER):$(HYDRA_DATABASE_PASSWORD)@$(HYDRA_DATABASE_SERVICE_NAME)-rw:5432/hydra?sslmode=disable"
|
|
@ -25,6 +25,13 @@ configMapGenerator:
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
- name: HYDRA_MIGRATE_JOB_NAME
|
- name: HYDRA_MIGRATE_JOB_NAME
|
||||||
|
objref:
|
||||||
|
name: hydra-migrate
|
||||||
|
kind: Job
|
||||||
|
apiVersion: batch/v1
|
||||||
|
fieldref:
|
||||||
|
fieldpath: metadata.name
|
||||||
|
- name: HYDRA_POSTGRES_SERVICE_NAME
|
||||||
objref:
|
objref:
|
||||||
name: hydra-migrate
|
name: hydra-migrate
|
||||||
kind: Job
|
kind: Job
|
||||||
|
|
Loading…
Reference in New Issue