diff --git a/charts/kong/CHANGELOG.md b/charts/kong/CHANGELOG.md index 5bf068276..55e110fe1 100644 --- a/charts/kong/CHANGELOG.md +++ b/charts/kong/CHANGELOG.md @@ -2,9 +2,13 @@ ## Unreleased + +## 2.15.3 + ### Fixed * Changed `ingressController.readinessProbe` to use `/readyz` to prevent pods from becoming ready and serving 404s prior to the `ingress-controller` first syncing config to the `proxy` [#716](https://github.com/Kong/charts/pull/716). +* Fixed incorrect `if` block order in volume mount templates. ## 2.15.2 diff --git a/charts/kong/Chart.yaml b/charts/kong/Chart.yaml index cb89b5317..8b9181220 100644 --- a/charts/kong/Chart.yaml +++ b/charts/kong/Chart.yaml @@ -11,7 +11,7 @@ maintainers: name: kong sources: - https://github.com/Kong/charts/tree/main/charts/kong -version: 2.15.2 +version: 2.15.3 appVersion: "3.1" dependencies: - name: postgresql diff --git a/charts/kong/templates/_helpers.tpl b/charts/kong/templates/_helpers.tpl index ea52b110f..14bc1a524 100644 --- a/charts/kong/templates/_helpers.tpl +++ b/charts/kong/templates/_helpers.tpl @@ -477,22 +477,23 @@ The name of the service used for the ingress controller's validation webhook {{- end }} {{- if (and (not .Values.ingressController.enabled) (eq .Values.env.database "off")) }} -{{- $dblessSourceCount := (add (.Values.dblessConfig.configMap | len | min 1) (.Values.dblessConfig.secret | len | min 1) (.Values.dblessConfig.config | len | min 1)) -}} -{{- if gt $dblessSourceCount 1 -}} - {{- fail "Ambiguous configuration: only one of of .Values.dblessConfig.configMap, .Values.dblessConfig.secret, and .Values.dblessConfig.config can be set." -}} + {{- $dblessSourceCount := (add (.Values.dblessConfig.configMap | len | min 1) (.Values.dblessConfig.secret | len | min 1) (.Values.dblessConfig.config | len | min 1)) -}} + {{- if gt $dblessSourceCount 1 -}} + {{- fail "Ambiguous configuration: only one of of .Values.dblessConfig.configMap, .Values.dblessConfig.secret, and .Values.dblessConfig.config can be set." -}} - name: kong-custom-dbless-config-volume - {{- if .Values.dblessConfig.configMap }} + {{- if .Values.dblessConfig.configMap }} configMap: name: {{ .Values.dblessConfig.configMap }} - {{- else if .Values.dblessConfig.secret }} + {{- else if .Values.dblessConfig.secret }} secret: secretName: {{ .Values.dblessConfig.secret }} - {{- else }} + {{- else }} configMap: name: {{ template "kong.dblessConfig.fullname" . }} + {{- end }} {{- end }} {{- end }} -{{- end }} + {{- if .Values.ingressController.admissionWebhook.enabled }} - name: webhook-cert secret: @@ -551,16 +552,16 @@ The name of the service used for the ingress controller's validation webhook {{- end }} {{- end }} {{- $dblessSourceCount := (add (.Values.dblessConfig.configMap | len | min 1) (.Values.dblessConfig.secret | len | min 1) (.Values.dblessConfig.config | len | min 1)) -}} -{{- if gt $dblessSourceCount 1 -}} -{{- if (and (not .Values.ingressController.enabled) (eq .Values.env.database "off")) }} + {{- if gt $dblessSourceCount 1 -}} + {{- if (and (not .Values.ingressController.enabled) (eq .Values.env.database "off")) }} - name: kong-custom-dbless-config-volume mountPath: /kong_dbless/ -{{- end }} + {{- end }} + {{- end }} {{- range .Values.secretVolumes }} - name: {{ . }} mountPath: /etc/secrets/{{ . }} {{- end }} -{{- end }} {{- range .Values.plugins.configMaps }} {{- $mountPath := printf "/opt/kong/plugins/%s" .pluginName }} - name: kong-plugin-{{ .pluginName }}