Compare commits

...

1 Commits

Author SHA1 Message Date
e79af169b9 calculate length of array separately 2024-04-18 01:35:19 -06:00
2 changed files with 3 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: v2 apiVersion: v2
name: postgres-cluster name: postgres-cluster
version: 2.3.2 version: 2.3.3
description: Chart for cloudnative-pg cluster description: Chart for cloudnative-pg cluster
keywords: keywords:
- database - database

View File

@@ -26,7 +26,8 @@ bootstrap:
import: import:
type: {{ .Values.replica.importType }} type: {{ .Values.replica.importType }}
databases: databases:
{{- if and ((len .Values.replica.importDatabases) gt 1) (.Values.replica.importType eq "microservice") }} {{ $length := len .Values.replica.importDatabases | int }}
{{- if and ($length gt 1) (.Values.replica.importType eq "microservice") }}
{{ fail "Too many databases in import type of microservice!" }} {{ fail "Too many databases in import type of microservice!" }}
{{- else}} {{- else}}
{{- with .Values.replica.importDatabases }} {{- with .Values.replica.importDatabases }}