cloudfoundry / cloud-service-broker

OSBAPI service broker that uses Terraform to provision and bind services. Derived from https://github.com/GoogleCloudPlatform/gcp-service-broker
Apache License 2.0
80 stars 37 forks source link

[BUG] : support for K8S svcat service instance updates is not possible without the plan_id #196

Closed wdesplas closed 2 months ago

wdesplas commented 3 years ago

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

  1. create a service instance via kubernetes
  2. 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

cf-gitbot commented 2 years ago

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.

pivotal-marcela-campo commented 2 years ago

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.

pivotal-marcela-campo commented 2 years ago

@wdesplas we don't think we'll get to this anytime soon. If you want to submit a PR we are happy to review.

pivotal-marcela-campo commented 2 months ago

Closing per lack of activity