SAP / sap-btp-service-operator

SAP BTP service operator enables developers to connect Kubernetes clusters to SAP BTP accounts and to consume SAP BTP services within the clusters by using Kubernetes native tools.
Apache License 2.0
126 stars 52 forks source link

Refresh Service binding when service instance is updated. #404

Closed k-brady-sap closed 8 months ago

k-brady-sap commented 9 months ago

Requirement When a Service instance is updated - e.g. BTP message queue is updated to remove connection protocol. Can the linked service binding be updated at the same time?

The credentialsRotationPolicy can only run on a set time and is also limited by the control loop of the cluster so there is no guarentee when the service binding is updated.

Is there any best practice on how to update service bindings when a service instance is updated?

kerenlahav commented 9 months ago

Hi @k-brady-sap binding does not support "update" operation, if an instance is updated you need to create a new binding.

k-brady-sap commented 9 months ago

ok - so as part of a service-instance update, the update script would need to explicitly delete the existing service-binding, then update the service instance, and finally create a service-binding?

kerenlahav commented 9 months ago

it depends on the broker, old bindings can be valid even if the instance is updated, and if this is the case you don't have to delete the binding before the instance is updated. if you want to keep the same name then yes, you have to delete the old one before creating a new one.