[bitnami/kong] feat!: ⬆️ Bump PostgreSQL subchart (#9122)

* [bitnami/kong] feat!: ⬆️ Bump PostgreSQL subchart

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

* Fix password ref

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

* Change readme

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

* [bitnami/kong] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

Co-authored-by: Bitnami Containers <containers@bitnami.com>
This commit is contained in:
Javier J. Salmerón-García
2022-02-24 10:33:59 +01:00
committed by GitHub
parent 15fb1a3424
commit d3a8ca7621
9 changed files with 104 additions and 51 deletions

View File

@@ -96,13 +96,7 @@ In order to replicate the container startup scripts execute this command:
{{- $passwordValidationErrors := list }}
If you want to upgrade the installation you will need to re-set the database credentials. Execute the following command
{{- if eq .Values.database "postgresql" }}
{{- $dbSecretName := include "kong.postgresql.secretName" . -}}
{{- $dbPasswordValidationErrors := include "common.validations.values.postgresql.passwords" (dict "secret" $dbSecretName "subchart" true "context" $) -}}
{{- $passwordValidationErrors = append $passwordValidationErrors $dbPasswordValidationErrors -}}
kubectl get secret --namespace {{ .Release.Namespace }} {{ include "kong.postgresql.secretName" . }} -o jsonpath="{.data.postgresql-password}" | base64 --decode
{{- else }}
{{- if ne .Values.database "postgresql" }}
{{- $dbSecretName := include "kong.cassandra.secretName" . -}}
{{- $dbPasswordValidationErrors := include "common.validations.values.cassandra.passwords" (dict "secret" $dbSecretName "subchart" true "context" $) -}}
{{- $passwordValidationErrors = append $passwordValidationErrors $dbPasswordValidationErrors -}}

View File

@@ -91,7 +91,7 @@ Get PostgreSQL user
*/}}
{{- define "kong.postgresql.user" -}}
{{- if .Values.postgresql.enabled -}}
{{- .Values.postgresql.postgresqlUsername -}}
{{- .Values.postgresql.auth.username -}}
{{- else -}}
{{ .Values.postgresql.external.user }}
{{- end -}}
@@ -101,7 +101,7 @@ Get PostgreSQL user
Get Cassandra user
*/}}
{{- define "kong.cassandra.user" -}}
{{- if .Values.postgresql.enabled -}}
{{- if .Values.cassandra.enabled -}}
{{- .Values.cassandra.dbUser.user -}}
{{- else -}}
{{ .Values.cassandra.external.user }}
@@ -125,8 +125,8 @@ Get Cassandra secret
Get PostgreSQL secret
*/}}
{{- define "kong.postgresql.secretName" -}}
{{- if .Values.postgresql.existingSecret -}}
{{- .Values.postgresql.existingSecret -}}
{{- if .Values.postgresql.auth.existingSecret -}}
{{- .Values.postgresql.auth.existingSecret -}}
{{- else if .Values.postgresql.enabled }}
{{- template "kong.postgresql.fullname" . -}}
{{- else -}}
@@ -145,7 +145,7 @@ Return the proper Docker Image Registry Secret Names
Return true if a secret for a external database should be created
*/}}
{{- define "kong.createExternalDBSecret" -}}
{{- if and (not .Values.postgresql.enabled) (not .Values.cassandra.enabled) (not .Values.cassandra.existingSecret) (not .Values.postgresql.existingSecret) -}}
{{- if and (not .Values.postgresql.enabled) (not .Values.cassandra.enabled) (not .Values.cassandra.existingSecret) (not .Values.postgresql.auth.existingSecret) -}}
{{- true -}}
{{- end -}}
{{- end -}}

View File

@@ -105,15 +105,15 @@ spec:
{{- if (eq .Values.database "postgresql") }}
- name: KONG_DATABASE
value: "postgres"
{{- if .Values.postgresql.usePasswordFile }}
{{- if .Values.postgresql.auth.usePasswordFiles }}
- name: KONG_POSTGRESQL_PASSWORD_FILE
value: "/bitnami/kong/secrets/postgresql-password"
value: "/bitnami/kong/secrets/password"
{{- else }}
- name: KONG_PG_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "kong.postgresql.secretName" . }}
key: postgresql-password
key: password
{{- end }}
- name: KONG_PG_HOST
value: {{ include "kong.postgresql.host" . }}

View File

@@ -18,6 +18,6 @@ data:
cassandra-password: {{ .Values.cassandra.external.password | b64enc | quote }}
{{- end }}
{{- if .Values.postgresql.external.password }}
postgresql-password: {{ .Values.postgresql.external.password | b64enc | quote }}
password: {{ .Values.postgresql.external.password | b64enc | quote }}
{{- end }}
{{- end }}

View File

@@ -53,15 +53,15 @@ spec:
{{- if (eq .Values.database "postgresql") }}
- name: KONG_DATABASE
value: "postgres"
{{- if .Values.postgresql.usePasswordFile }}
{{- if .Values.postgresql.auth.usePasswordFiles }}
- name: KONG_POSTGRESQL_PASSWORD_FILE
value: "/bitnami/kong/secrets/postgresql-password"
value: "/bitnami/kong/secrets/password"
{{- else }}
- name: KONG_PG_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "kong.postgresql.secretName" . }}
key: postgresql-password
key: password
{{- end }}
- name: KONG_PG_HOST
value: {{ include "kong.postgresql.host" . }}