ovh / public-cloud-databases-operator

This operator allow you to automaticaly authorize your Kubernetes cluster IP on your OVHcloud cloud databases service.
Apache License 2.0
6 stars 2 forks source link

[BUG] 🐛 The operator delete existing whitelisted IP #6

Open philippart-s opened 1 year ago

philippart-s commented 1 year ago

Hi,

I think there is a small bug when IPs in the whitelist are already defined before using the operator. For example if I manually add to a PostgreSQL managed DB an IP in the whitelist with the admin console it's deleted when I create the Custom Resource to whitelist the MKS' IP thanks to the operator.

In my opinion using the operator should not delete existing whitelist IP in the database configuration.

Regards

Stef

Kearsan commented 10 months ago

+1 that's pretty annoying, we've to put back every manually whitelisted IPs each time the operator updates the list. It's a huge problem when you work on your db from a client.

apinter commented 8 months ago

Take the following with a big pinch of salt as I'm not super great with Go, but I think that the issue lies in this PUT method, and that the operator is not supporting multi-tenancy. Frankly not sure how I would implement it with PUT. Maybe by constructing a list of both the internal - or external cluster addresses, depending on the MKS config, and combine those with the already existing ones. The operator configured list from MKS is prefixed so all it would need to do is ignore everything that is not matching the prefix, but present, append that into the list and make the PUT.
Could be really wrong here... @BellionBastien any thoughts? ^-^

TheBlusky commented 3 days ago

Is it still a bug, or is it fixed ?