diff --git a/charts/pro-api/README.md b/charts/pro-api/README.md index e3fe656d..fd4aab82 100644 --- a/charts/pro-api/README.md +++ b/charts/pro-api/README.md @@ -184,7 +184,7 @@ | `postgres.api.rw.name` | PostgreSQL database name. **Required** | `""` | | `postgres.api.rw.username` | PostgreSQL username. **Required** | `""` | | `postgres.api.rw.password` | PostgreSQL password. **Required** | `""` | -| `postgres.api.ro` | Settings for the read-only access. | `nil` | +| `postgres.api.ro` | Settings for the read-only access. | `[]` | ### Kafka settings (supported version 2.7) diff --git a/charts/pro-api/templates/_helpers.tpl b/charts/pro-api/templates/_helpers.tpl index 86195025..3f88cccf 100644 --- a/charts/pro-api/templates/_helpers.tpl +++ b/charts/pro-api/templates/_helpers.tpl @@ -134,6 +134,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} {{- define "pro-tasks.connectionString" -}} +{{- if .Values.tasks.settings.enabled -}} {{- printf "Server=%s;Port=%d;Database=%s;UID=%s;Pooling=True;Minimum Pool Size=%d;Maximum Pool Size=%d;Timeout=%d;Connection Idle Lifetime=30;KeepAlive=5;" (.Values.postgres.tasks.rw.host | required "A valid .Values.postgres.tasks.rw.host entry required!") (.Values.postgres.tasks.rw.port | required "A valid .Values.postgres.tasks.rw.port entry required!" | int) @@ -143,4 +144,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} ((.Values.postgres.tasks.rw.poolSize).max | int | default 5) (.Values.postgres.tasks.rw.timeout | int | default 15) -}} +{{- else -}} +{{ print "" }} +{{- end -}} {{- end -}} diff --git a/charts/pro-api/templates/secrets.yaml b/charts/pro-api/templates/secrets.yaml index 542f3c19..302a59e2 100644 --- a/charts/pro-api/templates/secrets.yaml +++ b/charts/pro-api/templates/secrets.yaml @@ -7,7 +7,9 @@ data: catalogApi2gisKey: {{ required "Valid .Values.catalog.key required!" .Values.catalog.key | b64enc }} routingApi2gisKey: {{ required "Valid .Values.navi.key required!" .Values.navi.key | b64enc }} dbConnectionPwd: {{ required "Valid .Values.postgres.api.rw.password required!" .Values.postgres.api.rw.password | b64enc }} + {{ if .Values.tasks.settings.enabled }} tasksDbConnectionPwd: {{ required "Valid .Values.postgres.tasks.rw.password required!" .Values.postgres.tasks.rw.password | b64enc }} + {{ end }} s3AccessKey: {{ required "Valid .Values.dgctlStorage.accessKey required!" .Values.dgctlStorage.accessKey | b64enc }} s3SecretKey: {{ required "Valid .Values.dgctlStorage.secretKey required!" .Values.dgctlStorage.secretKey | b64enc }} {{ if .Values.digger.password }} diff --git a/charts/pro-api/values.yaml b/charts/pro-api/values.yaml index dd8cd909..aedf89ff 100644 --- a/charts/pro-api/values.yaml +++ b/charts/pro-api/values.yaml @@ -500,7 +500,7 @@ postgres: name: '' username: '' password: '' - ro: null + ro: [] # @skip postgres.tasks tasks: @@ -514,7 +514,7 @@ postgres: name: '' username: '' password: '' - ro: null + ro: [] # @section Kafka settings (supported version 2.7)