[BUG] : support for K8S svcat service instance updates is not possible without the plan_id
Description
We are trying to update the service instance using the cloud-service-broker from kubernetes and it appears that the client does not sent the plan_id during the request as it's not mandatory. Please refer to : https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#route-5
Expected Behavior
As define in the spec, If this field plan_id is not present in the request message, then the Service Broker MUST NOT change the Service Plan of the Service Instance as a result of this request and perform the update request.
Actual Behavior
Here the request received from the k8s server showinf that during the patch, no plan_id is available:
{
"service_id": "af9f36a0-ebf3-4c60-8ec1-53a414b50a29",
"parameters": {
"dstdomains": [
"*.monip.org"
]
},
"context": {
"clusterid": "81b4ed82-5129-4c4e-8076-0b5226200651",
"instance_name": "my-instance",
"namespace": "staging",
"platform": "kubernetes"
},
"previous_values": {
"service_id": "af9f36a0-ebf3-4c60-8ec1-53a414b50a29"
}
}
Therefore, as coded in https://github.com/cloudfoundry-incubator/cloud-service-broker/blob/06dc07d789777a30ec135d0f43fff2650ac1b8d7/pkg/broker/service_definition.go#L233 we got the following error as the plan_id is mandatory :
3m37s Warning UpdateInstanceCallFailed serviceinstance/dev-fpcv2-service-instance-2 ServiceBroker returned a failure for update call; update will be retried: Status: 500; ErrorMessage: <nil>; Description: Plan ID "" could not be found; ResponseError: <nil>
48m Warning RetryBackoff serviceinstance/dev-fpcv2-service-instance-2 Delaying update retry, next attempt will be after 2021-03-02 12:32:16.360533744 +0000 UTC m=+1650870.900920883
28m Warning RetryBackoff serviceinstance/dev-fpcv2-service-instance-2 Delaying update retry, next attempt will be after 2021-03-02 12:52:16.461320417 +0000 UTC m=+1652071.001707560
8m4s Warning RetryBackoff serviceinstance/dev-fpcv2-service-instance-2 Delaying update retry, next attempt will be after 2021-03-02 13:12:16.54898496 +0000 UTC m=+1653271.089372095
Steps to Reproduce
- create a service instance via kubernetes
- update the service instances via kubernetes and apply the modification
Context
We try to use the cloud-service-broker and terraform to provide services on demand for kubernetes platforms.
Your Environment
- Version used: 0.2.3
- Operating System and version (desktop): Ubuntu 20.0 , kubctl 1.20.4, k8S server version 1.18.6
- Platform (Azure/AWS/GCP): Private cloud base on vmware
- Applicable Services: N/A
We have created an issue in Pivotal Tracker to manage this:
https://www.pivotaltracker.com/story/show/182271502
The labels on this github issue will be updated when the story is started.
We'll look into this one with the aim to provide OSBAPI compatibility. However seems very low priority now that svcat has been archived in k8s sig.
@wdesplas we don't think we'll get to this anytime soon. If you want to submit a PR we are happy to review.
Closing per lack of activity