openshift / ansible-service-broker

Ansible Service Broker
Apache License 2.0
226 stars 84 forks source link

run_latest_build.sh crashes with v3.6.0 #518

Closed slaskawi closed 7 years ago

slaskawi commented 7 years ago

What happened:

When I tried to run the latest version of run_latest_build.sh with OpenShift Origin v3.6.0 I received the following error:

Error from server (BadRequest): Broker in version "v1beta1" cannot be handled as a Broker: no kind "Broker" is registered for version "servicecatalog.k8s.io/v1beta1"

How to reproduce it:

$ ORIGIN_VERSION=v3.6.0 ./run_latest_build.sh 

Starting OpenShift using docker.io/openshift/origin:v3.6.0 ...
Pulling image docker.io/openshift/origin:v3.6.0
Image pull complete
OpenShift server started.

The server is accessible via web console at:
    https://172.17.0.1.nip.io:8443

You are logged in as:
    User:     developer
    Password: <any value>

To login as administrator:
    oc login -u system:admin

In order to enable access to the Template Service Broker for use with the Service Catalog, you must first grant unauthenticated access to the template service broker api.

WARNING: Enabling this access allows anyone who can see your cluster api server to provision templates within your cluster, impersonating any user in the cluster (including administrators).  This can be used to gain full administrative access to your cluster.  Do not allow this access unless you fully understand the implications.  To enable unauthenticated access to the template service broker api, run the following command as cluster admin:

oc adm policy add-cluster-role-to-group system:openshift:templateservicebroker-client system:unauthenticated system:authenticated

WARNING: Running the above command allows unauthenticated users to access and potentially exploit your cluster.

Logged into "https://127.0.0.1:8443" as "system:admin" using existing credentials.

You have access to the following projects and can switch between them with 'oc project <projectname>':

    default
    kube-public
    kube-system
  * myproject
    openshift
    openshift-infra
    service-catalog

Using project "myproject".
Now using project "ansible-service-broker" on server "https://127.0.0.1:8443".

You can add applications to this project with the 'new-app' command. For example, try:

    oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git

to build a new example application in Ruby.
service "asb" created
serviceaccount "asb" created
clusterrolebinding "asb" created
clusterrole "asb-auth" created
clusterrolebinding "asb-auth-bind" created
clusterrole "access-asb-role" created
persistentvolumeclaim "etcd" created
deploymentconfig "asb" created
secret "asb-auth-secret" created
configmap "broker-config" created
serviceaccount "ansibleservicebroker-client" created
clusterrolebinding "ansibleservicebroker-client" created
secret "ansibleservicebroker-client" created
route "asb-1338" created
Error from server (BadRequest): Broker in version "v1beta1" cannot be handled as a Broker: no kind "Broker" is registered for version "servicecatalog.k8s.io/v1beta1"
Error processing template and creating deployment
maleck13 commented 7 years ago

I may be wrong, But I believe it is now targeting OSCP 3.7

slaskawi commented 7 years ago

@maleck13 The comment in the script and this code bit say both 3.7 and 3.6 are supported.

rthallisey commented 7 years ago

@slaskawi we moved the deploy script to only 3.7. I think we're going to create a 3.6 branch and broker image that will work with 3.6 and continue working off master until we release 3.7. @jwmatthews what are your thoughts on that?

slaskawi commented 7 years ago

That sounds really good to me. Looking forward to it.

rthallisey commented 7 years ago

@slaskawi Sorry for the confusion. The release-0.9 branch is primarily targeted for 3.6. The master branch is defaulting to 3.7 for the upcoming release. If you want to use master with 3.6, it's possible, but you may run into some issues. Id would recommend using 3.7.