This commit is contained in:
Stavros kois
2024-09-13 00:29:33 +03:00
parent 5893f991d5
commit 553f550898

View File

@@ -53,14 +53,14 @@
{{/* Postgres UID and GID */}}
{{- $validTypes := (list "int" "int64" "float64") -}}
{{- if $objectData.cluster.postgresUID -}}
{{- if not mustHas (kindOf $objectData.cluster.postgresUID) $validTypes -}}
{{- if not (mustHas (kindOf $objectData.cluster.postgresUID) $validTypes) -}}
{{- fail (printf "CNPG Cluster - Expected [cluster.postgresUID] to be an integer, but got [%s]" (kindOf $objectData.cluster.postgresUID)) -}}
{{- end -}}
{{- $pgUID = $objectData.cluster.postgresUID -}}
{{- end -}}
{{- if $objectData.cluster.postgresGID -}}
{{- if not mustHas (kindOf $objectData.cluster.postgresGID) $validTypes -}}
{{- if not (mustHas (kindOf $objectData.cluster.postgresGID) $validTypes) -}}
{{- fail (printf "CNPG Cluster - Expected [cluster.postgresGID] to be an integer, but got [%s]" (kindOf $objectData.cluster.postgresGID)) -}}
{{- end -}}
{{- $pgGID = $objectData.cluster.postgresGID -}}