aerogearcatalog / keycloak-apb

Apache License 2.0
3 stars 21 forks source link

Keycloak uses DeploymentConfig rather than Deployment #28

Open dimitraz opened 6 years ago

dimitraz commented 6 years ago

It looks like a recent changed has caused Keycloak to use a deployment config rather than a deployment which means we can't deploy it to kubernetes. This also has a knock-on effect on the CLI as we expect a deployment Should we be supporting both Kubernetes and Openshift using a deployment rather?

@matzew @maleck13 @pb82

maleck13 commented 6 years ago

Spoke with @dimitraz about this and asked her to open the issue

pb82 commented 6 years ago

It looks like the keycloak-apb always used a Openshift DeploymentConfig vs a Kubernetes Deployment. Initial commit: https://github.com/aerogearcatalog/keycloak-apb/blob/e6d0c697ab38cc6c435f8a585457290a93453ff9/roles/provision-keycloak-apb/tasks/main.yml#L17

Support for the kubernetes style deployment seems to be still in Tech Preview: https://docs.openshift.org/latest/dev_guide/deployments/kubernetes_deployments.html

I'd be in favor of supporting both, Openshift and Kubernetes but it looks like at this point we can't use Deployment or is Tech Preview ok?

maleck13 commented 6 years ago

Your right about keycloak actually. I think in actual fact what has changed in fh-sync-server perhaps? But aside from that:

I Hadn't noticed it was only tech preview for openshift. But I still think we should support both. Perhaps the broker could pass in the platform target, if it doesn't already and we can choose which template to use based on this. Do you know if it tells you which runtime target as a param to the apb? We will have to do some work in the CLI to deal with it being either a DeploymentConfig or a Deployment. But we have no chance of getting community support from the wider k8s community if we only support OSCP

maleck13 commented 6 years ago

ping @david-martin

pb82 commented 6 years ago

@maleck13 The ASB does support Kubernetes and i've asked the guys if there's a way for a playbook to know if it's running in Openshift or Kubernetes. Looks like there is: https://github.com/ansibleplaybookbundle/postgresql-apb/blob/master/playbooks/provision.yaml#L5

The broker changes the value of this variable to either "openshift" or "kubernetes". So in Ansible we could possibly query '{{ cluster }}' and depending on the value use openshift_v1_deployment_config or run a Kubernetes specific template.

david-martin commented 6 years ago

Reaching out to see when it could be out of tech preview https://github.com/openshift/openshift-docs/pull/5254#issuecomment-360781785.

Having the APB support both dc's and deployments is a bit of overhead. Not just in the APB, but the mobile cli too. My thinking is go with deployments for now so it works in kubernetes, and seems to work ok in openshift too. When we're closer to locking down a version of openshift that's our baseline for our APBs, we can revisit.

maleck13 commented 6 years ago

@pb82 Does this make sense to you? Which would you prefer as an apb developer, that we just use deployments or that we maintain 2 sets of objects and switch based on the target. My choice would be to just use Deployments and get some kind of answer to when it is expected out of tech preview.

matzew commented 6 years ago

My thinking is go with deployments for now so it works in kubernetes, and seems to work ok in openshift too.

I like that thinking. to be able address the full k8s user space

matzew commented 6 years ago

@dimitraz loop me in for a potential PR - happy to review/test ;-)

maleck13 commented 6 years ago

@matzew I think perhaps issues created in the service teams backlogs would be a better approach here as it need to be reflected in all services. However @dimitraz if you wanted to look into it don't let me stop you :)

pb82 commented 6 years ago

@maleck13 Yes i think we should just use Deployments if that's ok. Maintaining two different configurations would make apb development very difficult.

maleck13 commented 6 years ago

Ok guys so it sounds like we are in agreement on using deployments for our services. Will you guys update the service backlogs with an issue to do this? @pb82 @matzew @david-martin

matzew commented 6 years ago

I'd think let's create a JIRA and move it to the backlog, no ?

On Mon, Jan 29, 2018 at 11:06 AM, Craig Brookes notifications@github.com wrote:

Ok guys so it sounds like we are in agreement on using deployments for our services. Will you guys update the service backlogs with an issue to do this? @pb82 https://github.com/pb82 @matzew https://github.com/matzew @david-martin https://github.com/david-martin

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aerogearcatalog/keycloak-apb/issues/28#issuecomment-361197331, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJnzpFHDUA70xnWD9_4Yl4Nicp2wCbxks5tPZgugaJpZM4RuKke .

-- Matthias Wessendorf

github: https://github.com/matzew twitter: http://twitter.com/mwessendorf

dimitraz commented 6 years ago

https://issues.jboss.org/browse/AEROGEAR-2012

maleck13 commented 6 years ago

@matzew yes thats what I meant ? Maybe some confusion :)