vmware-tanzu / servicebinding

Service Bindings for Kubernetes
Other
32 stars 20 forks source link

Service Resources with non-obvious pluralization fails #190

Open Samze opened 2 years ago

Samze commented 2 years ago

The service-binding controller uses this unsafe method to determine the GVR from the GVK to setup a watch dynamically. This method attempts to guess the GVR with some string checks and a lot of assumptions.

Unfortunately this Postgres Operator this fails inference of the pluralization. The plural is postgreses but just postgres.

This blocks this operator from being used with the binding operator. The only workaround is to use a direct secret reference.

cc @jpatel-pivotal


Note: Plural resource name for Postgres is postgres rather than the incorrect inferred postgreses

rashedkvm commented 2 years ago

New dynamic rest mapper a possible way to resolve this https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/client/apiutil#NewDynamicRESTMapper. Will test it out ASAP!

scothis commented 2 years ago

@rashedkvm any update on your testing?

rashedkvm commented 2 years ago

Not yet @scothis. It is on the priority list now 😀

scothis commented 2 years ago

We should still fix this for real

rashedkvm commented 2 years ago

We will replace the tactical fix with a real fix and target for Service Bindings v0.7.2+