Description:
I'm trying to deploy the pattern 3 with an external postgres database but helm is failing to build control plane config maps.
According to the docs to change the data source to postgresql, the file deployment.toml needs to be updated with new DB credentials.
I've been trying to update this file by using the key wso2.deployment.am.cp.config, however I keep getting error converting YAML to JSON when trying to use a multiple config.
Error:
Error: UPGRADE FAILED: YAML parse error on am-pattern-3/templates/am/control-plane/instance-1/wso2am-pattern-3-am-control-plane-conf.yaml: error converting YAML to JSON: yaml: line 23: did not find expected key
helm.go:88: [debug] error converting YAML to JSON: yaml: line 23: did not find expected key
Also, I wouldn't like to have the credentials on my values.yaml file but instead have them as environment variables.
According to docs, environment variables can be used on the deployment.toml file by using the syntax password="$env{<environment_variable_name>}", however, on the current chart is not possible adding extra environment variables to the control plane deployment.
Affected Product Version:
4.0.0-1
OS, DB, other environment details and versions:
OS: ubuntu 21.10
Helm: v3.7.1
K8s: 1.20
Replacing this loop with the tpl function over the whole key wso2.deployment.am.cp.config, will allow using the option --set-file to define this value.
Related to the environment variables for the control plane deployment, maybe you could have and extra value such wso2.deployment.am.cp.envFrom
{{- range .Values.wso2.deployment.am.cp.envFrom }}
- {{ .ref }}Ref:
name: {{ .name }}
{{- end }}
This would allow to install the chart in this way :
I can submit a PR with these changes if needed.
Please let me know what do you think about this suggestion or if there is other way to achieve changing the DB credentials :)
Description: I'm trying to deploy the pattern 3 with an external postgres database but helm is failing to build control plane config maps.
According to the docs to change the data source to postgresql, the file
deployment.toml
needs to be updated with new DB credentials.I've been trying to update this file by using the key
wso2.deployment.am.cp.config
, however I keep gettingerror converting YAML to JSON
when trying to use a multiple config.Error:
Also, I wouldn't like to have the credentials on my
values.yaml
file but instead have them as environment variables. According to docs, environment variables can be used on thedeployment.toml
file by using the syntaxpassword="$env{<environment_variable_name>}"
, however, on the current chart is not possible adding extra environment variables to the control plane deployment.Affected Product Version: 4.0.0-1
OS, DB, other environment details and versions:
OS: ubuntu 21.10 Helm: v3.7.1 K8s: 1.20
Steps to reproduce:
Install the chart
Suggested solution: To solve the parsing issues, you could expand the whole config instead of looping over the key
wso2.deployment.am.cp.config
Replacing this loop with the
tpl
function over the whole keywso2.deployment.am.cp.config
, will allow using the option--set-file
to define this value.Related to the environment variables for the control plane deployment, maybe you could have and extra value such
wso2.deployment.am.cp.envFrom
This would allow to install the chart in this way :
I can submit a PR with these changes if needed. Please let me know what do you think about this suggestion or if there is other way to achieve changing the DB credentials :)
Thank you!!