openshift / open-service-broker-sdk

A starting point for creating service brokers implementing the Open Service Broker API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kubernetes translation of roles.yaml

maleck13 opened this issue · comments

The roles in https://github.com/openshift/open-service-broker-sdk/blob/master/test-scripts/resources/roles.yaml do not currently work in a standalone Kubernetes cluster, this is because the it uses OpenShift specific constructs. In order to allow this SDK to work for both Kubernetes and OpenShift, these roles need to be translated into the rbac API https://kubernetes.io/docs/admin/authorization/rbac/

we should supply both sets of roles, and an install script for each set. (installl-openshift, install-k8s) or make it an argument to the install script.

Openshift has conversion functions for converting between origin / kube RBAC. You should be able to automate the generation of one from the other.

@enj are those conversion functions only available in code, or do we actually have cli invocations for doing it?

I believe I have a working translation now, will make a pr shortly

@bparees The translation I created yesterday evening is working well on my K8 cluster. A suggestion for adding it is to add a new install directory that would look like this

install/
├── kubernetes  #roles.yaml, service.yaml etc...
└── openshift #template.yaml roles.yaml

another option would be to keep the common pieces at the install level and have the specific pieces in the directories?

@maleck13 yeah i'd rather keep the common stuff together and then subdirs for the specific stuff.