Creating postgres config without postgresql.conf throws NPE
Summary
Creating a StackgresPostgresConfig without the property postgresql.conf throws a NullPointerException
In terms of usability, this is no good because it doesn't give any hint about what could be the issue.
And on the other side, since we have default values for posgresql.conf files, this field should no be required
Environment
-
StackGres version: 0.8
-
Kubernetes version (use
kubectl version
): 1.12.10 - 1.17.3 -
Cloud provider or hardware configuration: kind amd64
Steps to reproduce
Execute the following command:
cat << EOF | kubectl apply -f -
apiVersion: stackgres.io/v1alpha1
kind: StackGresPostgresConfig
metadata:
name: pgconfig
spec:
pgVersion: '11'
EOF
Relevant logs and/or screenshots
Error from server (InternalError): error when creating "STDIN": Internal error occurred: admission webhook "sgpgconfig.stackgres-operator.stackgres" denied the request: null
Edited by Matteo Melli