Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

After removing a ServiceClass from a broker, the service-catalog doesn't reflect this #1096

Closed
david-martin opened this issue Aug 3, 2017 · 2 comments

Comments

@david-martin
Copy link

For reproducing this, I'm using an example with the template-service-broker in OpenShift.

I can add a new template to the openshift namespace for the template-server-broker to pick up

oc create -f https://raw.githubusercontent.com/feedhenry/fh-sync-server/master/fh-sync-server-DEVELOPMENT.yaml -n openshift

Calling directly to the broker responds with our SerivceClass included

oc exec controller-manager-119773966-w9zwd -- curl -k -H 'X-Broker-Api-Version:2.7' https://kubernetes.default.svc:443/brokers/template.openshift.io/v2/catalog | grep fh-sync-server
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 70361    0 70361    0     0   909k      0 --:--:-- --:--:-- --:--:--  916k
    "name": "fh-sync-server",
     "documentationUrl": "https://github.com/feedhenry/fh-sync-server",
     "supportUrl": "https://github.com/feedhenry/fh-sync-server/issues"

After some time (<5m), the serviceclass appears in openshift too

oc get serviceclass | grep fh-sync-server
fh-sync-server             ServiceClass.v1alpha1.servicecatalog.k8s.io

This is expected.

If I remove the template, the template-service-broker picks up on this.
Calling directly to the broker no longer includes a ServiceClass.

oc delete template fh-sync-server -n openshift
oc exec controller-manager-119773966-w9zwd -- curl -k -H 'X-Broker-Api-Version:2.7' https://kubernetes.default.svc:443/brokers/template.openshift.io/v2/catalog | grep fh-sync-server
(no result)

This is also expected.

However, the ServiceClass is not removed from the service-catalog.
This command will always list the ServiceClass.

oc get serviceclass | grep fh-sync-server
fh-sync-server             ServiceClass.v1alpha1.servicecatalog.k8s.io

Is this expected behavior?
I can work around this by manually deleting the ServiceClass, and then the catalog no longer includes it. e.g. oc delete serviceclass fh-sync-server
But this seems like an unnecessary step. Should the service catalog keep up to date with new and removed ServiceClasses that each broker has?

@pmorie
Copy link
Contributor

pmorie commented Aug 3, 2017

@david-martin This is related to the broker refresh interval, which we are working on now: #1086

Currently there is a single refresh interval for all brokers, which is a property of the controller-manager binary. You would eventually see the desired change, but not immediately upon updating the broker's services. The API described in #1086 will allow configuration of this interval on a per-broker period, and allow the user to trigger relisting the broker manually.

Does that make sense?

@david-martin
Copy link
Author

@pmorie That makes sense.
Given the thought and discussion going into #1086, I'm happy to close this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants