Initialization scripts from configmaps or secrets are not set when creating a cluster from the web console
Summary
When creating a cluster from the web console, if there are any initialization scripts set to be read from config-maps or secret keys, the final POST request sent to the backend does not include any information about the scripts.
{
"metadata":{
"name":"script-secret",
"namespace":"default"
},
"spec":{
"instances":1,
"pods":{
"persistentVolume":{
"size":"1Gi"
}
},
"initialData":{
"scripts":[
]
},
"replication":{
"role":"ha-read",
"mode":"async"
},
"postgresServices":{
"primary":{
"enabled":true,
"type":"ClusterIP"
},
"replicas":{
"enabled":true,
"type":"ClusterIP"
}
},
"postgres":{
"version":"latest",
"flavor":"vanilla"
}
}
}
OTOH if the script information is set explicitly with a raw script, the request does contain the script info.
Steps to reproduce
- Enter the web console
- Click on the Create Cluster button
- On the "Initialization" step, set the info for any secret or configmap script
- Click on "Create Cluster"
The cluster will be created with no scripts info attached
Expected Behaviour
The creation should include the scripts info no matter its source
Environment
- StackGres version:
1.1.0