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

Add namespace name cleanup before applying #17892

Merged
merged 17 commits into from
Oct 7, 2020
Merged

Add namespace name cleanup before applying #17892

merged 17 commits into from
Oct 7, 2020

Conversation

mshaposhnik
Copy link
Contributor

@mshaposhnik mshaposhnik commented Sep 17, 2020

What does this PR do?

Sometimes users may have names incompartible with K8S objects naming (simplest example is using email as a username),
so in that case user-defined namespace creation with names generated using templates like abc-<username> will fail.

This PR adds checks for symbols and length validity, sanitizes username if required, and stores it into user preferences for further usage.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

#17841

How to test this PR?

Configure Che to use <username> placeholder namespace template. Register user with name containing symbol(s) not allowed in kubernetes names. Log in with that user and start workspace. Namespace with sanitized name should be created.

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@mshaposhnik mshaposhnik changed the title Add namespace name cleanup иуащку фззднштп Add namespace name cleanup before applying Sep 17, 2020
@che-bot che-bot added kind/enhancement A feature request - must adhere to the feature request template. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. labels Sep 17, 2020
@che-bot
Copy link
Contributor

che-bot commented Sep 17, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Sep 18, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Sep 23, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Sep 23, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Sep 23, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Sep 30, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Sep 30, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Sep 30, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Sep 30, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Sep 30, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Sep 30, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Oct 1, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Oct 1, 2020

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

@che-bot
Copy link
Contributor

che-bot commented Oct 2, 2020

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

@mshaposhnik mshaposhnik merged commit b399be7 into eclipse-che:master Oct 7, 2020
@mshaposhnik mshaposhnik deleted the namespace_name_ branch October 7, 2020 07:15
@che-bot che-bot removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Oct 7, 2020
@che-bot che-bot added this to the 7.20 milestone Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants