-
Notifications
You must be signed in to change notification settings - Fork 26
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
Don't hard code openshift/k8s things in the apb-base
#60
Comments
@flaper87 please add a little more context What do you suggest the usage is for the 2 base APB images? Thank you, |
@jwmatthews sure, sorry for the lack of context in the description. There are 2 things, really. The first one is handled differences between k8s and OCP but the one that I'm more interested in is being able to use APBs to provision/deprovision apps on other COEs other than k8s and OCP. I've created a small APB that can be used as an init container on docker to install other apps. I guess my goal would be to make APB's API not k8s/OCP centric if possible and rather have specific base images for those cases.
Does this make sense? |
Hey @flaper87. I agree with your proposal. But right now, the broker is not cluster agnostic and it's something we hope to implement. I think the first pass at this will be to broaden support to add Kubernetes as a target. After that, we can consider adding more COEs if folks have a use case for them. Here's an issue in the broker outlining the work required to add Kubernetes support openshift/ansible-service-broker#233. |
@flaper87 thank you, that information helps. |
@rthallisey makes sense to me. Do you think we can start by splitting the base image into 2 images? Once the ASB feature is implemented, we can then make the COE image agnostic. I can help with the former if y'all agree. |
@flaper87 Sure. Let's start with a discussion on how we want to do this because I think it can be done a few different ways:
|
@flaper87 Thanks for your contribution! Is the suggestion there should be a single agnostic base image, and then individual apbs that are cluster specific, I.E. postgres-apb-k8s, postgres-apb-openshift? The broker is going to need branches of logic specific to each flavor. To do this right, we need to encapsulate cluster specific logic behind an interface and abstract it away. Call the interface
Lets us write as many runners as we'd like to support in a Anyone take issue with having cluster specific apbs aside from the obviously having to manage a bunch of different apbs floating around? |
Yes. I'm not sure what the best way to implement this is, though. My suggestion was to have 2 base images. The first one creates the user, adds the base entrypoint and a few cluster agnostic operations. On top of that one, we could have a Kubernetes one, an OpenShift one (or one that is generic for both) or simply have an APB created on top of the the generic top image. Here are some examples:
I'd like to be able to build the second APB without any k8s/openshift specific dependencies. |
Sounds reasonable to me. Truthfully, the broker has been designed with the expectation there's some kind of orchestration engine available, not vanilla docker. I don't see a technical reason we can't support this in the broker if we move towards an agnostic runner design. |
apb-base
assumes the APB will talk to either OpenShift or Kubernetes. It should not attempt to login to the cluster.Ideally, there should be 2 base APB. The first one is the actual base with the entrypoint script and the second one should add the
oc-login.sh
call.The text was updated successfully, but these errors were encountered: