GoogleCloudPlatform / gcp-service-broker

Open Service Broker for Google Cloud Platform
Apache License 2.0
142 stars 59 forks source link

Compatibility with kubernetes-sig-catalog #165

Closed dhananjaysathe closed 6 years ago

dhananjaysathe commented 7 years ago

Making this compatible with the kubernetes sig-catalog initiative would add a lot of value to both ecosystems making it a lot easier to consume google cloud services more natively inside k8s. Broadly the following steps would be necessary for sig-catalog on k8s/openshift

/tag feature

automaticserver commented 6 years ago

I would really love to see service-catalog support. Since it already provides OSB API, there's a good chance the inital steps may be easy. The "native" integration in k8s using CustomRessource is a good bonus.

See here how far we could go without changing source code and service description: https://github.com/automaticserver/gcp-service-broker-as-k8s-service-catalog-broker

I have now a broker in our k8s service catalog only failing with:

      message: 'Error syncing catalog from ServiceBroker. Error reconciling ClusterServicePlan
        (K8S: "75cda114-af06-496e-a89a-e64c82ba8102" ExternalName: "reduced_availability"):
        ClusterServicePlan.servicecatalog.k8s.io "75cda114-af06-496e-a89a-e64c82ba8102"
        is invalid: spec.externalName: Invalid value: "reduced_availability": [-a-z0-9]+
        (regex used for validation is ''plan-name-40d-0983-1b89'')'
      reason: ErrorSyncingCatalog

Where this can easily be changed as long you're not migrating. We'll see how far it goes now, but until then feel free to use my demo there as a start.

Update: once you change reduced_availability with reduced-availability the fetch is successful!

    - lastTransitionTime: 2017-12-13T18:03:10Z
      message: Successfully fetched catalog entries from broker.
      reason: FetchedCatalog
      status: "True"
      type: Ready
$ kubectl get clusterserviceclasses -o=custom-columns=NAME:.metadata.name,EXTERNAL\ NAME:.spec.externalName
NAME                                   EXTERNAL NAME
5ad2dce0-51f7-4ede-8b46-293d6df1e8d4   google-ml-apis
628629e3-79f5-4255-b981-d14c6c7856be   google-pubsub
76d4abb2-fee7-4c8f-aee1-bcea2837f02b   google-datastore
83837945-1547-41e0-b661-ea31d76eed11   google-stackdriver-debugger
b9e4332e-b42b-4680-bda5-ea1506797474   google-storage
c5ddfe15-24d9-47f8-8ffe-f6b7daa9cf4a   google-stackdriver-trace
f80c0a3e-bd4d-4809-a900-b4e33a6450f1   google-bigquery