1- {{- $cc := .Files.Get "config/pg14-config-effect-scope.yaml" | fromYaml }}
2- apiVersion : apps .kubeblocks.io/v1beta1
3- kind : ConfigConstraint
1+ {{- $pd := .Files.Get "config/pg14-config-effect-scope.yaml" | fromYaml }}
2+ apiVersion : parameters .kubeblocks.io/v1alpha1
3+ kind : ParametersDefinition
44metadata :
5- name : {{ include "apecloud-postgresql-14.configConstraint " . }}
5+ name : {{ include "apecloud-postgresql-14.pdName " . }}
66 labels :
77 {{- include "apecloud-postgresql.labels" . | nindent 4 }}
88 annotations :
99 {{- include "apecloud-postgresql.annotations" . | nindent 4 }}
1010spec :
11+ fileName : postgresql.conf
1112 reloadAction :
1213 shellTrigger :
1314 sync : true
@@ -34,24 +35,21 @@ spec:
3435 # example: ../../pkg/configuration/testdata/mysql_openapi.json
3536 cue : |-
3637 {{- .Files.Get "config/pg14-config-constraint.cue" | nindent 6 }}
37- # configuration file format
38- fileFormatConfig :
39- format : properties
4038
4139 # # require db instance restart
4240 # # staticParameters
43- {{- if hasKey $cc "staticParameters" }}
41+ {{- if hasKey $pd "staticParameters" }}
4442 staticParameters :
45- {{- $params := get $cc "staticParameters" }}
43+ {{- $params := get $pd "staticParameters" }}
4644 {{- range $params }}
4745 - {{ . }}
4846 {{- end }}
4947 {{- end}}
5048
5149 # # define immutable parameter list, this feature is not currently supported.
52- {{- if hasKey $cc "immutableParameters" }}
50+ {{- if hasKey $pd "immutableParameters" }}
5351 immutableParameters :
54- {{- $params := get $cc "immutableParameters" }}
52+ {{- $params := get $pd "immutableParameters" }}
5553 {{- range $params }}
5654 - {{ . }}
5755 {{- end }}
0 commit comments