Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Support both Openshift and Kubernetes #233

Closed
rthallisey opened this issue Jun 26, 2017 · 4 comments · Fixed by #496, #556, #561 or #563
Closed

Proposal: Support both Openshift and Kubernetes #233

rthallisey opened this issue Jun 26, 2017 · 4 comments · Fixed by #496, #556, #561 or #563

Comments

@rthallisey
Copy link
Contributor

rthallisey commented Jun 26, 2017

Feature: Support other Clusters than OpenShift

The ansible-service-broker is currently OpenShift only because OpenShift has a few features that Kubernetes is still developing. The delta between OpenShift and Kubernetes is going to be a common occurrence so need a way to easily support both. I'm proposing that we can solve this by organizing our code paths into separate pieces and filling the gaps to meet the service-catalog specs:

  • Kubernetes operations
  • OpenShift operations
  • Kubernetes hack operations that perform the actions done in 'OpenShift operations', but for Kubernetes

Proposed work

  1. Split out all the clients into pkg/clients/
    1a. Break apart all the clients so they are easier to consume #213
    2a. Breakup all the Broker Clients into a clients pkg #222
  2. Split out all Cluster logic into a pkg/cluster/openshift.go and pkg/cluster/kubernetes.go
  • Kubernetes is used for the majority of the broker actions while OpenShift a small number of actions. Let's break apart these code paths and call into a cluster pkg for cluster actions.
  1. Create a pkg/cluster/kubernetes-hack.go that will do OpenShift specific functions the Kubernetes way
  2. Use a Kubernetes solution to service accounts
    4a. https://github.com/openshift/ansible-service-broker/blob/master/pkg/apb/svc_acct.go
  3. Change APBs so they support Kubernetes
    5a. Don't hard code openshift/k8s things in the apb-base fusor/apb-examples#60
  4. Remove all "oc" commands and replace them with Kubernetes and OpenShift client calls
    6a. https://github.com/openshift/ansible-service-broker/search?p=1&q=%22oc%22&type=&utf8=%E2%9C%93
@rthallisey rthallisey changed the title Support both Openshift and Kubernetes Make the ansible-service-broker Cluster agnostic Jun 26, 2017
@rthallisey rthallisey changed the title Make the ansible-service-broker Cluster agnostic Support both Openshift and Kubernetes Jun 26, 2017
@rthallisey rthallisey changed the title Support both Openshift and Kubernetes Proposal: Support both Openshift and Kubernetes Jul 6, 2017
@rthallisey
Copy link
Contributor Author

I think git might've closed this. Reopening to track more PR's

@ron1
Copy link

ron1 commented Dec 21, 2017

Was this closed prematurely?

@rthallisey
Copy link
Contributor Author

Once #556 merged, the broker was able on kubernetes.

If you want to use ansible to setup the broker & catalog on kubernetes see: https://github.com/fusor/catasb#openshift-or-kubernetes

If you want to use the template for the broker: https://github.com/openshift/ansible-service-broker/blob/master/templates/k8s-ansible-service-broker.yaml.j2 and https://github.com/openshift/ansible-service-broker/blob/master/templates/k8s-template.py

@rthallisey
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment