Closed sechmann closed 4 years ago
Hi @VegarM, thanks for bringing this up! I was able to reproduce it and we will try to fix this within the next few weeks.
Sorry for the delay in addressing this issue. We have investigated and reproduced this case:
It turns out that users on a PostgreSQL SQL instance do not support a host value. The underlying API seems to accept the insert request but then silently drop the host value, which causes a conflict between what you set in your config ("%"
) and what the underlying API has (""
).
To get back on the happy path, you can delete your existing users and create new SQLUser
config without spec.host
set.
Thank you, tested and it works 👍
@kibbles-n-bytes I know this is now closed but in case you're listening... You guys probably want to remove the reference to host
in the SQLUser CRD at
spec:
validation:
openAPIV3Schema:
properties:
spec:
properties:
host:
~~and update the sample SQLUser yaml here: https://cloud.google.com/config-connector/docs/reference/resources#sqluser~~
Ignore the above. As @VegarM points out below, that stuff may still apply when using MySQL.
@marcoderama The CRD is also used for MySQL users where the host
field probably works as intended.
We're adding a warning to our documentation in the next release to protect against this case. As you said, the host field is used by MySQL; only PostgreSQL has this bizarre behavior.
The warning is now added to our docs: https://cloud.google.com/config-connector/docs/reference/resources#sqluser
After applying the config in the bottom of the post everything seems fine for about 10 minutes, then we start seeing the following error message in the cnrm-controller logs. No changes were made to the sqluser.
and these when describing the user:
Warning UpdateFailed 11m (x3 over 45m) sqluser-controller Update call failed: error planning resource change: cannot update immutable field(s)
Everything seems to work just fine.