Skip to content

Commit

Permalink
Merge pull request #16 from catenax-ng/main
Browse files Browse the repository at this point in the history
[dft-backend] postgres dependency updated charts.
  • Loading branch information
Siegfriedk authored Mar 20, 2023
2 parents 0bf1987 + ea620c1 commit 27abc2a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
10 changes: 2 additions & 8 deletions charts/dftbackend/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,9 @@ spec:
- containerPort: {{ .Values.portContainer }}
env:
- name: SPRING_DATASOURCE_URL
valueFrom:
secretKeyRef:
name: dft-postgresql-secrets
key: dbUrl
value: "jdbc:postgresql://{{ .Values.dftpostgresql.fullnameOverride }}:{{ .Values.dftpostgresql.auth.port }}/{{ .Values.dftpostgresql.auth.database }}"
- name: SPRING_DATASOURCE_USERNAME
valueFrom:
secretKeyRef:
name: dft-postgresql-secrets
key: username
value: {{ .Values.dftpostgresql.auth.username }}
- name: SPRING_DATASOURCE_PASSWORD
valueFrom:
secretKeyRef:
Expand Down
7 changes: 2 additions & 5 deletions charts/dftbackend/templates/postgresql-secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ metadata:
name: dft-postgresql-secrets
type: Opaque
stringData:
dbUrl: "<path:dft/data/postgres#DB_URL>"
username: "<path:dft/data/postgres#DB_USER>"
password: "<path:dft/data/postgres#DB_PASSWORD>"
postgres-password: "<path:dft/data/postgres#DB_POSTGRESPASSWORD>"
database: "<path:dft/data/postgres#DB_NAME>"
password: {{ .Values.dftpostgresql.auth.secretKeys.adminPasswordKey | default ( randAlphaNum 32 | quote ) }}
postgres-password: {{ .Values.dftpostgresql.auth.secretKeys.userPasswordKey | default ( randAlphaNum 32 | quote ) }}
18 changes: 11 additions & 7 deletions charts/dftbackend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,19 @@ tolerations: []

affinity: {}

dftpostgresql:
dftpostgresql:
# -- PostgreSQL chart configuration
# Switch to enable or disable the PostgreSQL helm chart
enabled: true
fullnameOverride: "product-dft-backend-postgres"
auth:
username: "dftUser"
database: "dftdb"
existingSecret: dft-postgresql-secrets
secretKeys:
adminPasswordKey: "postgres-password"
userPasswordKey: "password"
username: "dftuser"
port: 5432
database: "dftdb"
existingSecret: "dft-postgresql-secrets"
secretKeys:
adminPasswordKey: "postgres-password"
userPasswordKey: "password"

configuration:
properties: |-
Expand Down

0 comments on commit 27abc2a

Please sign in to comment.