diff --git a/charts/coleman-management/Chart.yaml b/charts/coleman-management/Chart.yaml index 559f914..4dd5b07 100644 --- a/charts/coleman-management/Chart.yaml +++ b/charts/coleman-management/Chart.yaml @@ -9,5 +9,5 @@ dependencies: repository: https://charts.bitnami.com/bitnami type: application -version: 0.6.0 +version: 0.6.1 appVersion: "1.16.0" diff --git a/charts/coleman-management/templates/api/deployment.yaml b/charts/coleman-management/templates/api/deployment.yaml index f6bec7a..b0d7d9b 100644 --- a/charts/coleman-management/templates/api/deployment.yaml +++ b/charts/coleman-management/templates/api/deployment.yaml @@ -33,18 +33,18 @@ spec: image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.api.image.pullPolicy }} {{- if .Values.postgresql.enabled }} - {{ $host := include "postgresql.fullname" . }} - {{ $port := include "postgresql.service.port" . }} - {{ $database := include "postgresql.database" . }} + {{ $host := include "postgresql.primary.fullname" . }} + {{ $port := .Values.postgresql.global.postgresql.service.ports.postgresql }} + {{ $database := .Values.postgresql.auth.database }} {{ $databaseUrl := printf "jdbc:postgresql://%s:%.0f/%s" $host $port $database }} env: - name: SPRING_DATASOURCE_PASSWORD valueFrom: secretKeyRef: - name: {{ include "coleman-management.postgresql.fullname" .}} + name: {{ include "coleman-management.postgresql.fullname" . }} key: password - name: SPRING_DATASOURCE_URL - value: {{$databaseUrl}} + value: {{ $databaseUrl | quote }} - name: SPRING_DATASOURCE_USERNAME value: {{ .Values.postgresql.auth.username | quote}} {{- end }} diff --git a/charts/coleman-management/values.yaml b/charts/coleman-management/values.yaml index 5212196..9fe48d4 100644 --- a/charts/coleman-management/values.yaml +++ b/charts/coleman-management/values.yaml @@ -89,7 +89,7 @@ ui: env: {} api: - enabled: false + enabled: true replicaCount: 1 image: @@ -198,7 +198,12 @@ api: jobLabel: "" postgresql: - enabled: false + enabled: true + global: + postgresql: + service: + ports: + postgresql: 5432 fullnameOverride: "" nameOverride: "" auth: