Skip to content

Commit

Permalink
Align internal and external postgres features while enabling overrides.
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneeseguin committed Aug 16, 2022
1 parent 56612b2 commit d635fc3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
10 changes: 0 additions & 10 deletions manifests/external-postgres.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
---
meta:
pg:
scheme: (( params.pg.scheme || "postgres" ))
username: (( params.pg.username || vault.path "external_db:username" || "postgres" ))
password: (( params.pg.password || vault.path "external_db:password" ))
hostname: (( params.pg.hostname || vault.path "external_db:hostname" ))
port: (( params.pg.port || 5432 ))
sslmode: (( params.pg.sslmode || "disable" ))
database: (( params.pg.database || "scheduler" ))

instance_groups:
- name: scheduler
jobs:
Expand Down
20 changes: 12 additions & 8 deletions manifests/scheduler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ meta:
default:
azs: [z1]
pg:
host: "127.0.0.1"
port: "5432"
user: "scheduler-admin"
pass: (( vault meta.vault "/role:password" ))
# Enable overrides env file > vault > defaults.
scheme: (( params.pg.scheme || vault.path "db:scheme" || "postgres" ))
username: (( params.pg.username || vault.path "db:username" || "ocf-scheduler" ))
password: (( params.pg.password || vault.path "db:password" || "ocf-scheduler" ))
hostname: (( params.pg.hostname || vault.path "db:hostname" || "127.0.0.1" ))
port: (( params.pg.port || vault.path "db:port" || 5432 ))
sslmode: (( params.pg.sslmode || vault.path "db:sslmode" || "disable" ))
database: (( params.pg.database || vault.path "db:database" || "ocf-scheduler" ))
cf:
exodus: (( concat $GENESIS_EXODUS_MOUNT params.cf.deployment_env "/" params.cf.deployment_type ))
deployment_name: (( concat params.cf.deployment_env "-" params.cf.deployment_type ))
Expand Down Expand Up @@ -63,11 +67,11 @@ instance_groups:
properties:
databases:
roles:
- name: (( grab params.pg.user))
password: (( grab params.pg.pass))
- name: (( grab meta.pg.username ))
password: (( grab meta.pg.password ))
databases:
- name: (( grab params.pg.database ))
port: (( grab params.pg.port ))
- name: (( grab meta.pg.database ))
port: (( grab meta.pg.port ))
provides:
postgres:
as: scheduler-postgres
Expand Down

0 comments on commit d635fc3

Please sign in to comment.