Azure / open-service-broker-azure

The Open Service Broker API Server for Azure Services
https://osba.sh
MIT License
248 stars 100 forks source link

Reapplying ServiceInstance yaml fails #726

Open 4x0v7 opened 5 years ago

4x0v7 commented 5 years ago

I have the following postgresql-instance.yaml which I applied, along with a ServiceBinding and OSBA successfully deployed a DB for me.

apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceInstance
metadata:
  name: postgres-9-6-azure-instance
  namespace: default
spec:
  clusterServiceClassExternalName: azure-postgresql-9-6
  clusterServicePlanExternalName: basic
  parameters:
    location: eastus
    resourceGroup: RgApplication
    sslEnforcement: disabled
    firewallRules:
      - startIPAddress: "0.0.0.0"
        endIPAddress: "255.255.255.255"
        name: "AllowAll"

I decided to enable SSL so changed the one line sslEnforcement: enabled and did kubectl apply -f postgresql-instance.yaml

apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceInstance
metadata:
  name: postgres-9-6-azure-instance
  namespace: default
spec:
  clusterServiceClassExternalName: azure-postgresql-9-6
  clusterServicePlanExternalName: basic
  parameters:
    location: eastus
    resourceGroup: RgApplication
--- sslEnforcement: disabled
+++ sslEnforcement: enabled
    firewallRules:
      - startIPAddress: "0.0.0.0"
        endIPAddress: "255.255.255.255"
        name: "AllowAll"

After that my Instance is now in a failed state. I see the following from the catalog-controller-manager logs:

I1007 11:13:30.531218       1 controller_instance.go:1748] ServiceInstance "default/postgres-9-6-azure-instance" v660: Update request for ServiceInstance in-flight to Broker                                                                                                                                              │
│ I1007 11:13:30.737184       1 client.go:221] handling failure responses                                                                                                                                                                                                                                                    │
│ I1007 11:13:30.737440       1 controller_instance.go:1748] ServiceInstance "default/postgres-9-6-azure-instance" v661: ServiceBroker returned a failure for update call; update will not be retried: Status: 400; ErrorMessage: ValidationError; Description: The value provided for resourceGroup is invalid: unrecognize │
│ d field; ResponseError: <nil>                                                                                                                                                                                                                                                                                              │
│ I1007 11:13:30.737465       1 controller_instance.go:1748] ServiceInstance "default/postgres-9-6-azure-instance" v661: ServiceBroker returned a failure for update call; update will not be retried: Status: 400; ErrorMessage: ValidationError; Description: The value provided for resourceGroup is invalid: unrecognize │
│ d field; ResponseError: <nil>                                                                                                                                                                                                                                                                                              │
│ I1007 11:13:30.737793       1 event.go:209] Event(v1.ObjectReference{Kind:"ServiceInstance", Namespace:"default", Name:"postgres-9-6-azure-instance", UID:"ecd02ffb-e87e-11e9-9f5e-a6ea559b8f6e", APIVersion:"servicecatalog.k8s.io/v1beta1", ResourceVersion:"661", FieldPath:""}): type: 'Warning' reason: 'UpdateInstan │
│ ceCallFailed' ServiceBroker returned a failure for update call; update will not be retried: Status: 400; ErrorMessage: ValidationError; Description: The value provided for resourceGroup is invalid: unrecognized field; ResponseError: <nil> 

From svcat

$ svcat describe instance postgres-9-6-azure-instance
  Name:        postgres-9-6-azure-instance                                                                                                                                                                                                                                                
  Namespace:   default                                                                                                                                                                                                                                                                    
  Status:      Failed - ServiceBroker returned a failure for update call; update will not be retried: Status: 400; ErrorMessage: ValidationError; Description: The value provided for resourceGroup is invalid: unrecognized field; ResponseError: <nil> @ 2019-10-07 11:13:30 +0000 UTC  
  Class:       azure-postgresql-9-6                                                                                                                                                                                                                                                       
  Plan:        basic                                                                                                                                                                                                                                                                      

Parameters:
  firewallRules:
  - endIPAddress: 255.255.255.255
    name: AllowAll
    startIPAddress: 0.0.0.0
  location: eastus
  resourceGroup: RgApplication
  sslEnforcement: enabled

Bindings:
             NAME              STATUS  
+----------------------------+--------+
  postgres-9-6-azure-binding   Ready   
4x0v7 commented 5 years ago

I should add:

$ helm ls
NAME    REVISION    UPDATED                     STATUS      CHART                           APP VERSION NAMESPACE
catalog 1           Sun Oct  6 01:55:06 2019    DEPLOYED    catalog-0.2.1                               catalog  
osba    1           Sun Oct  6 01:56:20 2019    DEPLOYED    open-service-broker-azure-1.8.3 1.8.3       osba     
eadasiak commented 4 years ago

I'm seeing this as well for other resources (storage and mysql). Basically the provisioning step works great, but any updates (even though the changed parameter is allowed per the update schema) result in a failure due to other "unrecognized" parameters. It seems that all the provisioning parameters are getting injected into the update call. I'm still trying to track down the source of this, but am glad to know others are seeing this behavior as well and I'm not crazy :)

lavanyamylsamy commented 4 years ago

Any update on this issue?