-
Notifications
You must be signed in to change notification settings - Fork 57
Inject user OSO token in runtime machine #541
Comments
We are working on improving Cube experience around boosters tests in the issue linked above. We definitely need this as a smooth user experience. Not only user token but the target namespace. For this injecting current username would also help. If |
@bartoszmajsak we have not being able to add that issue to current sprint. We haven't enough capacity during this sprint. Anyway I've changed the priority to P1 to make sure that we will take it in consideration during next planning. |
Thanks @l0rd for making it highest prio, much appreciated! After discussions with @ibuziuk and @lordofthejars we have some ideas about how to solve our use case, but let's start with it first. Why we need thatMost of the boosters (if not all) are shipped with integration tests based on Arquillian Cube. This tool makes it easy to set up and hides all the infrastructure code so tests are focused only on the relevant scenario/business logic/acceptance criteria. In Che environment, we are in the namespace (and using the service account) we don't have sufficient rights. Thus we cannot easily run our tests. For the moment we have the following workaround in place, but I think we can agree that we can provide the way smoother user experience. Potential solutionsCube comes with two options when it comes to deployment to the cluster:
Option 1:(as described in the issue itself) Option 2:
Option 3:
Let me know what you think about both these options. |
I think we should go for option 2 with username and OSO token injected in Che. @ibuziuk why this should not be ideal? |
@l0rd I split option 2 to two, as they are a bit different and I think previously it was slightly confusing from the description. Personally, I think the third one might be the most feasible one. |
Well, actually I never told that option 2 is not preferred and actually it looks more robust that 2 since injected OSIO token might be expired by the time Cube adapter would call |
@ibuziuk Then I guess I misunderstood our discussion about che-server and cluster information not being populated. Apologies.
I assumed that OSIO token lifespan is the same as OSO. If the case you are describing holds true, then 2nd option is in fact better. My thinking was that with the 3rd option we don't need to have any knowledge about the cluster we are running in, as this information will come from calling |
This is not the case afaik. Also, I'm wondering since all the oso communications are going to happen via oso proxy is it planned to have endpoint for obtaining oso token at all ? cc: @alexeykazakov
This is a fair point, but still there is a problem with OSIO token expiration |
|
@garagatyi which route did you choose? |
I'm going to execute |
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
… using oc CLI in workspace containers
…project using oc CLI in workspace containers
…o user project using oc CLI in workspace containers
…Login to user project using oc CLI in workspace containers
…541: Login to user project using oc CLI in workspace containers
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
Thanks @garagatyi for this important improvement. Can you give me a rough date when we can see it on OSIO prod-preview? /cc @l0rd |
@bartoszmajsak I don't know when Che6 will be deployed on prod-preview with my changes. |
@garagatyi @bartoszmajsak it is already on prod-preview ;-) |
@ibuziuk but I mean including my changes that I did today |
your changes should be already available on https://rhche.prod-preview.openshift.io/ |
@ibuziuk changes for this issue are available on https://rhche.prod-preview.openshift.io/. but I cannot see it on https://che.prod-preview.openshift.io. Any idea when this changes(which is already available for https://rhche.prod-preview.openshift.io) will be available on osio prod-preview(https://che.prod-preview.openshift.io)? |
@dipak-pawar it is expected. This change would be only in brand new che 6 AFAIK. We are not planning to port it to che 5 since we would migrate to che 6 in a short run (this / next week ) |
btw, https://rhche.prod-preview.openshift.io is che 6 osio prod-preview |
@ibuziuk Thank you for confirming. |
In an OSIO Che workspace, if a user want to have access to the OSO OpenShift API, he needs to
oc login
. That should be automated: we should inject the OSO token of current user as soon as the workspace container is created. And we should set the current project the user namespace.For instance, with the vertx quickstart, if a user run
mvn clean fabric8:deploy -Popenshift
from the Che terminal it should build successfully and deploy the quickstart application in the user namespace (not in the *-che namespace).Note that the token is stored in stored in
~/.kube/config
The text was updated successfully, but these errors were encountered: