Skip to content
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

Factory acceptance fails if there is no k8s namespace yet #19236

Closed
sleshchenko opened this issue Mar 9, 2021 · 8 comments
Closed

Factory acceptance fails if there is no k8s namespace yet #19236

sleshchenko opened this issue Mar 9, 2021 · 8 comments
Assignees
Labels
area/che-server kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P2 Has a minor but important impact to the usage or development of the system.

Comments

@sleshchenko
Copy link
Member

sleshchenko commented Mar 9, 2021

Is your task related to a problem? Please describe.

The PR eclipse-che/che-dashboard#183 integrates dashboard with Che Server Bitbucket OAuth flow implemented recently. But there is one drawback: oauth flow can't be finished is namespace does not exists and Dashboard can do nothing with it.

Che Server should try to precreate namespace when it does not exist on /api/kubernetes/namespaces method or on try to store bitbucket secret.

I'm open to discuss alternative if any.

@sleshchenko sleshchenko added kind/task Internal things, technical debt, and to-do tasks to be performed. area/che-server labels Mar 9, 2021
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Mar 9, 2021
@azatsarynnyy azatsarynnyy added severity/P2 Has a minor but important impact to the usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Mar 9, 2021
@sleshchenko
Copy link
Member Author

Dashboard workaround introduced in eclipse-che/che-dashboard#183 is broken, probably due changes on Che Server side #19518

It's how now the dashboard notifies users about namespace absence:
Screenshot_20210430_190820

@cccs-eric
Copy link
Contributor

I also ran into this issue while testing my GitHub integration with OAuth. Once my PR gets merged, we might see more and more occurrences of this problem since a lot of people are using GitHub. So this doesn't only apply to BitBucket, but also to GitHub eventually.

@mshaposhnik
Copy link
Contributor

mshaposhnik commented Jul 9, 2021

Honestly, i don't like idea that factory/resolve must create namespace. But twice much as that, i don't like the idea that factory/resolve must do a decision what exacly to create (namings etc).

Since dashb already doing the request to figure out list of user-s namespaces (and theirs existence),
my proposal is to send desired namespace name as the parameter of factory/resolve (which can take an unlimited number of parameters). In that case we can just do the usual routine using KubernetesNamespaceFactory with minimal modifications.

That will also help if user have multiple NS, so we will create token secrets exactly where is is specified by dashb and avoid mess.

@skabashnyuk @sleshchenko WDYT ?

@skabashnyuk
Copy link
Contributor

Since dashb already doing the request to figure out list of user-s namespaces (and theirs existence),
my proposal is to send desired namespace name as the parameter of factory/resolve (which can take an unlimited number of parameters).

Dashboard does not know it. In that case, we need to provide a service that will tell what the namespace names should be.

That will also help if user have multiple NS

Users can have one and only one NS.

@mshaposhnik
Copy link
Contributor

Service is already present and dashboard making requests to it. Link

@skabashnyuk
Copy link
Contributor

@mshaposhnik I think it's better to rethink/refact che-server internals and create k8s namespace when it's needed.

@skabashnyuk skabashnyuk changed the title Private bitbucket factory acceptance fails if there is no k8s namespace yet Factory acceptance fails if there is no k8s namespace yet Sep 6, 2021
@skabashnyuk
Copy link
Contributor

Fixed #20165 and #20167

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-server kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
None yet
Development

No branches or pull requests

6 participants