From af0ded6edf41291cff72314754cba4d3afdf2fc5 Mon Sep 17 00:00:00 2001 From: Fran Mulero Date: Thu, 2 Jun 2022 12:30:47 +0200 Subject: [PATCH] [bitnami/postgresql] Ldap postgresql (#10528) * Amend ldap.tls value Signed-off-by: Fran Mulero * Bump version Signed-off-by: Fran Mulero * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers * [bitnami/postgresql] Update components versions Signed-off-by: Bitnami Containers Co-authored-by: Bitnami Containers --- bitnami/postgresql/Chart.lock | 6 +++--- bitnami/postgresql/Chart.yaml | 2 +- bitnami/postgresql/README.md | 2 +- bitnami/postgresql/templates/_helpers.tpl | 11 +++++++++++ .../postgresql/templates/primary/statefulset.yaml | 2 +- bitnami/postgresql/values.yaml | 12 +++++++----- 6 files changed, 24 insertions(+), 11 deletions(-) diff --git a/bitnami/postgresql/Chart.lock b/bitnami/postgresql/Chart.lock index b9462743c..9a2ef7661 100644 --- a/bitnami/postgresql/Chart.lock +++ b/bitnami/postgresql/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: https://charts.bitnami.com/bitnami - version: 1.14.1 -digest: sha256:aeff42721b615c0387050b4bf03321c1a70b709501de3cd9b5a40c0ca47f81a9 -generated: "2022-05-21T18:02:22.807654275Z" + version: 1.15.1 +digest: sha256:ad35529dee1f9f6e56097268a3c4fe0f881284b41a70793cdd44d29a98bea1e9 +generated: "2022-06-02T08:47:19.624587864Z" diff --git a/bitnami/postgresql/Chart.yaml b/bitnami/postgresql/Chart.yaml index 34f3846d3..f853b5d5a 100644 --- a/bitnami/postgresql/Chart.yaml +++ b/bitnami/postgresql/Chart.yaml @@ -26,4 +26,4 @@ name: postgresql sources: - https://github.com/bitnami/bitnami-docker-postgresql - https://www.postgresql.org/ -version: 11.6.1 +version: 11.6.2 diff --git a/bitnami/postgresql/README.md b/bitnami/postgresql/README.md index 4329bc265..e53f20bb8 100644 --- a/bitnami/postgresql/README.md +++ b/bitnami/postgresql/README.md @@ -141,7 +141,7 @@ kubectl delete pvc -l release=my-release | `ldap.searchAttribute` | Attribute to match against the user name in the search | `""` | | `ldap.searchFilter` | The search filter to use when doing search+bind authentication | `""` | | `ldap.scheme` | Set to `ldaps` to use LDAPS | `""` | -| `ldap.tls` | Set to `1` to use TLS encryption | `""` | +| `ldap.tls.enabled` | Se to true to enable TLS encryption | `false` | | `ldap.uri` | LDAP URL beginning in the form `ldap[s]://host[:port]/basedn`. If provided, all the other LDAP parameters will be ignored. | `""` | | `postgresqlDataDir` | PostgreSQL data dir folder | `/bitnami/postgresql/data` | | `postgresqlSharedPreloadLibraries` | Shared preload libraries (comma-separated list) | `pgaudit` | diff --git a/bitnami/postgresql/templates/_helpers.tpl b/bitnami/postgresql/templates/_helpers.tpl index 255e3e971..df477b16d 100644 --- a/bitnami/postgresql/templates/_helpers.tpl +++ b/bitnami/postgresql/templates/_helpers.tpl @@ -252,6 +252,17 @@ Get the initialization scripts ConfigMap name. {{- end -}} {{- end -}} +{/* +Return true if TLS is enabled for LDAP connection +*/}} +{{- define "postgresql.ldap.tls.enabled" -}} +{{- if and (kindIs "string" .Values.ldap.tls) (not (empty .Values.ldap.tls)) }} + {{- true -}} +{{- else if and (kindIs "map" .Values.ldap.tls) .Values.ldap.tls.enabled }} + {{- true -}} +{{- end -}} +{{- end -}} + {{/* Get the readiness probe command */}} diff --git a/bitnami/postgresql/templates/primary/statefulset.yaml b/bitnami/postgresql/templates/primary/statefulset.yaml index 216f10613..a12688212 100644 --- a/bitnami/postgresql/templates/primary/statefulset.yaml +++ b/bitnami/postgresql/templates/primary/statefulset.yaml @@ -299,7 +299,7 @@ spec: value: {{ .Values.ldap.port | quote }} - name: POSTGRESQL_LDAP_SCHEME value: {{ .Values.ldap.scheme }} - {{- if .Values.ldap.tls }} + {{- if (include "postgresql.ldap.tls.enabled" .) }} - name: POSTGRESQL_LDAP_TLS value: "1" {{- end }} diff --git a/bitnami/postgresql/values.yaml b/bitnami/postgresql/values.yaml index d785888aa..5a15b2110 100644 --- a/bitnami/postgresql/values.yaml +++ b/bitnami/postgresql/values.yaml @@ -94,7 +94,7 @@ diagnosticMode: image: registry: docker.io repository: bitnami/postgresql - tag: 14.3.0-debian-10-r17 + tag: 14.3.0-debian-10-r20 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images @@ -210,7 +210,8 @@ audit: ## @param ldap.searchAttribute Attribute to match against the user name in the search ## @param ldap.searchFilter The search filter to use when doing search+bind authentication ## @param ldap.scheme Set to `ldaps` to use LDAPS -## @param ldap.tls Set to `1` to use TLS encryption +## DEPRECATED ldap.tls as string is deprecated,please use 'ldap.tls.enabled' instead +## @param ldap.tls.enabled Se to true to enable TLS encryption ## ldap: enabled: false @@ -224,7 +225,8 @@ ldap: searchAttribute: "" searchFilter: "" scheme: "" - tls: "" + tls: + enabled: false ## @param ldap.uri LDAP URL beginning in the form `ldap[s]://host[:port]/basedn`. If provided, all the other LDAP parameters will be ignored. ## Ref: https://www.postgresql.org/docs/current/auth-ldap.html uri: "" @@ -1094,7 +1096,7 @@ volumePermissions: image: registry: docker.io repository: bitnami/bitnami-shell - tag: 10-debian-10-r439 + tag: 10-debian-10-r442 pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. @@ -1179,7 +1181,7 @@ metrics: image: registry: docker.io repository: bitnami/postgres-exporter - tag: 0.10.1-debian-10-r126 + tag: 0.10.1-debian-10-r129 pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace.