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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add custom labels handling to instance and binding

kaedwen opened this issue · comments

Hey,

we are using the btp-service-operator in our environment and we need to create hana-shared aka. hana tenants. During this to also be consumable via CAP there must be a label for tenant_id and service_plan_id because CAP searches for it.

To be able to provide that from a kubernetes environment the solution would be to allow adding custom labels to the CRD's.

Hi @kaedwen
Do you mean Service-Manager labels or kubernetes labels?
The PR you created is adding BTP labels, how does CAP uses it?
Thanks

if CAP is used by its own, it is using service-manager credentials and the service-manager api to created the instances/bindings. These bindings do have _tenant_id and the other to identify the tenant later to provide the right credentials. But we do not want to use exclusively CAP, we also want to connect from golang microservices we create and therefore it would be the better way to create the instances/bindings via the btp-service-operator. But to not disrupt the CAP access we need to set the BTP labels there.

This will not work since the instances created by CAP are created in a dedicated container that belongs to CAP.
CAP will not be able to fetch instances outside of this container even if they have the label.

In our setup the provisioning of tenants is done with golang in our k8s cluster. There we create the HanaTenant ServiceInstance. We have already verified that the tenantId label is sufficient for CAP being satisfied that this HanaTenant is there (using the same Service Manager as the operator in our cluster). We do not use CAP to do the provisioning. So for us it would be great to use the sap-btp-service-operator for creating the Instance. Currently we use the sm api directly where we are able to inject the needed BTP Label.

We need to take it with the PO, please ping me in teams and i'll send you the feature request link