Creation of cluster for pg 11 with default configuration fail
When creating a cluster without specifying the configuration will fail if postgres major version selected is 11:
curl -k 'https://ongres.mooo.com:8371/stackgres/sgcluster/' \
-H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Accept-Language: en-US,en;q=0.5' \
--compressed \
-H 'Authorization: Basic YWRtaW46c3Q0Y2tncjNz' \
-H 'Content-Type: application/json;charset=utf-8' \
-H 'Origin: https://ongres.mooo.com:8371' \
-H 'Connection: keep-alive' \
-H 'Referer: https://ongres.mooo.com:8371/stackgres/index.html' \
-H 'Cookie: sgToken=YWRtaW46c3Q0Y2tncjNz' \
--data '
{
"metadata": {
"name": "test",
"namespace": "void"
},
"spec": {
"postgresVersion": "11",
"instances": "1",
"pods": {
"persistentVolume": {
"size": "1Gi"
},
"disableConnectionPooling": false,
"disableMetricsExporter": false,
"disablePostgresUtil": false
},
"configurations": {}
}
}
'
{
"type":"https://stackgres.io/doc/0.9-SNAPSHOT/07-developer-documentation/01-error-types#postgres-major-version-mismatch",
"title":"Postgres versions doesn't match",
"detail":"admission webhook \"sgcluster.stackgres-operator.stackgres\" denied the request: Invalid pgVersion, must be 12 to use pgConfig generated-from-default-1585820996130",
"status":400,
"fields":[]
}