Skip to content

Commit

Permalink
postgres chart dependency update
Browse files Browse the repository at this point in the history
  • Loading branch information
adityagajbhiye committed Mar 17, 2023
2 parents c9ae8fb + e48a6ae commit 9861e26
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.password | default ( randAlphaNum 32 | quote ) }}
postgres-password: {{ .Values.dftpostgresql.auth.secretKeys.password | 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 9861e26

Please sign in to comment.