github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/postgresql/config/patroni-reload.tpl (about) 1 {{- $bootstrap := $.Files.Get "bootstrap.yaml" | fromYamlArray }} 2 {{- $command := "reload" }} 3 {{- $trimParams := dict }} 4 {{- range $pk, $val := $.arg0 }} 5 {{- /* trim single quotes for value in the pg config file */}} 6 {{- set $trimParams $pk ( $val | trimAll "'" ) }} 7 {{- if has $pk $bootstrap }} 8 {{- $command = "restart" }} 9 {{- end }} 10 {{- end }} 11 {{ $params := dict "parameters" $trimParams }} 12 {{- $err := execSql ( dict "postgresql" $params | toJson ) "config" }} 13 {{- if $err }} 14 {{- failed $err }} 15 {{- end }} 16 {{- $err := execSql "" $command }} 17 {{- if $err }} 18 {{- failed $err }} 19 {{- end }}