diff --git a/Makefile b/Makefile index f44cee14..f8135d32 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -TAG = 1.0.3 +TAG = 1.0.4 DOCKERORG = quay.io/integreatly BROKER_IMAGE_NAME = managed-service-broker diff --git a/README.md b/README.md index b8c6f40c..182bb953 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ $ oc process -f templates/broker.template.yaml \ -p CHE_DASHBOARD_URL= \ -p LAUNCHER_DASHBOARD_URL= \ -p THREESCALE_DASHBOARD_URL=<3scaleDashBoardUrl> \ + -p APICURIO_DASHBOARD_URL= \ | oc create -f - # Verify that the broker has been registered correctly and STATUS is 'Ready' @@ -52,7 +53,8 @@ $ svcat get brokers $ oc describe clusterservicebroker managed-service-broker ``` -__NOTE:__ Che and Launcher do not need to be deployed to deploy the managed-service-broker, `CHE_DASHBOARD_URL` and `LAUNCHER_DASHBOARD_URL` just need to be set to a non-empty value. +__NOTE:__ The services requiring `X_DASHBOARD_URL` parameters do not need to be installed to run the broker, the parameters just need to be set to a non-empty value to deploy the template. + #### Add syndesis-crd: ``` diff --git a/pkg/deploys/apicurio/deployer.go b/pkg/deploys/apicurio/deployer.go index ec9c93ef..914e91ab 100644 --- a/pkg/deploys/apicurio/deployer.go +++ b/pkg/deploys/apicurio/deployer.go @@ -4,24 +4,16 @@ import ( "net/http" "os" - "k8s.io/api/authentication/v1" - brokerapi "github.com/integr8ly/managed-service-broker/pkg/broker" - "github.com/integr8ly/managed-service-broker/pkg/clients/openshift" glog "github.com/sirupsen/logrus" - "k8s.io/client-go/kubernetes" ) type ApiCurioDeployer struct { id string } -func NewDeployer(id string) *ApiCurioDeployer { - return &ApiCurioDeployer{id: id} -} - -func (ac *ApiCurioDeployer) IsForService(serviceID string) bool { - return serviceID == "apicurio-service-id" +func NewDeployer() *ApiCurioDeployer { + return &ApiCurioDeployer{} } func (ac *ApiCurioDeployer) GetCatalogEntries() []*brokerapi.Service { @@ -33,23 +25,23 @@ func (ac *ApiCurioDeployer) GetID() string { return ac.id } -func (ac *ApiCurioDeployer) Deploy(instanceID, brokerNamespace string, contextProfile brokerapi.ContextProfile, parameters map[string]interface{}, userInfo v1.UserInfo, k8sclient kubernetes.Interface, osClientFactory *openshift.ClientFactory) (*brokerapi.CreateServiceInstanceResponse, error) { - glog.Infof("Deploying apicurio from deployer, id: %s", instanceID) +func (ac *ApiCurioDeployer) Deploy(req *brokerapi.ProvisionRequest, async bool) (*brokerapi.ProvisionResponse, error) { + glog.Infof("Deploying apicurio from deployer, id: %s", req.InstanceId) dashboardUrl := os.Getenv("APICURIO_DASHBOARD_URL") - return &brokerapi.CreateServiceInstanceResponse{ + return &brokerapi.ProvisionResponse{ Code: http.StatusAccepted, DashboardURL: dashboardUrl, }, nil } -func (ac *ApiCurioDeployer) RemoveDeploy(serviceInstanceId string, namespace string, k8sclient kubernetes.Interface) error { - return nil +func (ac *ApiCurioDeployer) RemoveDeploy(req *brokerapi.DeprovisionRequest, async bool) (*brokerapi.DeprovisionResponse, error) { + return &brokerapi.DeprovisionResponse{Operation: "remove"}, nil } -func (ac *ApiCurioDeployer) LastOperation(instanceID string, k8sclient kubernetes.Interface, osclient *openshift.ClientFactory, operation string) (*brokerapi.LastOperationResponse, error) { - glog.Infof("Getting last operation for %s", instanceID) +func (ac *ApiCurioDeployer) ServiceInstanceLastOperation(req *brokerapi.LastOperationRequest) (*brokerapi.LastOperationResponse, error) { + glog.Infof("Getting last operation for %s", req.InstanceId) return &brokerapi.LastOperationResponse{ State: brokerapi.StateSucceeded, diff --git a/templates/broker.template.yaml b/templates/broker.template.yaml index 292897e9..dcc215e7 100644 --- a/templates/broker.template.yaml +++ b/templates/broker.template.yaml @@ -203,7 +203,7 @@ parameters: - name: IMAGE_TAG description: Tag of the broker image - value: "1.0.2" + value: "1.0.4" - name: IMAGE_PULL_POLICY value: "Always" diff --git a/tests/managedServicesBroker_test.go b/tests/managedServicesBroker_test.go index f8855cbe..e6e0000d 100644 --- a/tests/managedServicesBroker_test.go +++ b/tests/managedServicesBroker_test.go @@ -34,6 +34,7 @@ const ( var ( envBrokerURL = os.Getenv(BROKER_URL) envToken = os.Getenv(KUBERNETES_API_TOKEN) + numServices = 5 ) var ( @@ -77,8 +78,8 @@ func TestManagedBroker(t *testing.T) { } t.Fatal(fmt.Sprintf("Error getting Catalog: %s", message)) } - if len(sc.Services) != 4 { - t.Fatal("There should be 4 managed services") + if len(sc.Services) != numServices { + t.Fatalf("There should be %d managed services", numServices) } // Generic broker tests