Switch to service account after logging into OpenShift Sandbox#3844
Conversation
a1b219d to
6b56fd9
Compare
|
@vrubezhny I made the changes you mentioned, specifically:
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3844 +/- ##
===========================================
+ Coverage 32.37% 45.52% +13.15%
===========================================
Files 85 85
Lines 6505 6532 +27
Branches 1349 1352 +3
===========================================
+ Hits 2106 2974 +868
+ Misses 4399 3558 -841 ☔ View full report in Codecov by Sentry. |
✔️
❔ The current user is changed to So now we have two users: the original one + new Once we know for sure that the token for my original user (
✅ (There are some tokens that definitely contain more than 120 chars - so it's needed to watch a bit on how the YAML is serialized for those ones, but at the moment I don't see any problems) |
6b56fd9 to
71c1e4f
Compare
|
Okay, I've updated the PR to rewrite the token of the current user instead of creating a new one. |
Nope, 120 chars looks like is not enough: |
71c1e4f to
5c6c680
Compare
vrubezhny
left a comment
There was a problem hiding this comment.
Looks good overall and works like a charm.
The only question is that we probably must use env.KUBECONFIG when compiling a path to the current Kube config
The service account will remain authenticated for longer than 15 minutes. To try this out: 1. Log into an OpenShift Sandbox cluster using the Login workflow 2. Run `oc whoami`. You should see a reference to `pipeline`, which is the serviceaccount that's being used 3. The Application Explorer should display you as logged in and work as expected Closes redhat-developer#3838 Signed-off-by: David Thompson <davthomp@redhat.com>
5c6c680 to
8555d78
Compare
8555d78 to
5c6c680
Compare
5c6c680 to
8555d78
Compare
vrubezhny
left a comment
There was a problem hiding this comment.
Looks good to me and works like a charm! Thanks!


The service account will remain authenticated for longer than 15 minutes.
To try this out:
oc whoami. You should see a reference topipeline, which is the serviceaccount that's being usedCloses #3838
Signed-off-by: David Thompson davthomp@redhat.com