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

feat: Syncing of proxy settings and self-signed cert to the user's workspace namespace #1027

Merged
merged 37 commits into from
Sep 21, 2021

Conversation

metlos
Copy link
Contributor

@metlos metlos commented Aug 20, 2021

What does this PR do?

Reference: https://issues.redhat.com/browse/CRW-2397
This adds the ability to sync settings to the workspace namespaces of the users.

The new controller watches namespaces (or projects on OpenShift). If a namespace has appropriate label (org.eclipse.che/workspace-namespace-owner-uid), it is considered a user workspace namespace and is synced to.

The value of the label is supposed to be the UID of the user. On OpenShift, this is the UID of the user object and on Kubernetes, the UID of the user as obtained from the OAuth token of the configured OIDC provider.

What issues does this PR fix or reference?

eclipse-che/che#20168

How to test this PR?

create a namespace, label it and check that the proxy settings are synced to it in a config map and self signed certificates in a secret.

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.

@openshift-ci
Copy link

openshift-ci bot commented Aug 20, 2021

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@metlos metlos changed the title Syncing of proxy settings and self-signed cert to the user's workspace namespace feat: Syncing of proxy settings and self-signed cert to the user's workspace namespace Sep 3, 2021
pkg/deploy/sync.go Show resolved Hide resolved
controllers/devworkspace/controller.go Show resolved Hide resolved
controllers/cheuser/namespacecache.go Outdated Show resolved Hide resolved
controllers/cheuser/controller.go Outdated Show resolved Hide resolved
controllers/cheuser/controller.go Outdated Show resolved Hide resolved
@tolusha
Copy link
Contributor

tolusha commented Sep 21, 2021

/retest

"k8s.io/apimachinery/pkg/runtime"
)

type DevworkspaceState int
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type DevworkspaceState int
type DevWorkspaceState int

it would be a consistent naming I think, but that's not critical

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, from looking at CO codebase, we're consistently "Devworkspace" :) So I'd like to keep it out of this PR and deal with it in another issue. But you're of course right, we should use the same terminology...

controllers/devworkspace/util.go Outdated Show resolved Hide resolved
controllers/usernamespace/controller.go Show resolved Hide resolved
controllers/usernamespace/controller.go Outdated Show resolved Hide resolved
controllers/usernamespace/controller.go Show resolved Hide resolved
controllers/usernamespace/controller_test.go Outdated Show resolved Hide resolved
controllers/usernamespace/controller_test.go Outdated Show resolved Hide resolved
controllers/usernamespace/controller_test.go Outdated Show resolved Hide resolved
controllers/usernamespace/controller_test.go Show resolved Hide resolved
@openshift-ci
Copy link

openshift-ci bot commented Sep 21, 2021

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: metlos, sleshchenko, tolusha

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Co-authored-by: Serhii Leshchenko <sleshche@redhat.com>
@openshift-ci
Copy link

openshift-ci bot commented Sep 21, 2021

New changes are detected. LGTM label has been removed.

@openshift-ci openshift-ci bot removed the lgtm label Sep 21, 2021
@openshift-ci
Copy link

openshift-ci bot commented Sep 21, 2021

New changes are detected. LGTM label has been removed.

@metlos metlos merged commit 5e657f8 into eclipse-che:main Sep 21, 2021
@metlos metlos deleted the user-namespace-settings branch September 21, 2021 19:00
@che-bot che-bot added this to the 7.37 milestone Sep 21, 2021
@max-cx
Copy link
Contributor

max-cx commented Nov 17, 2021

@tolusha, a Yes/No question about this issue:

Will the outcome require any changes to the relevant content of the Installation Guide or Administration Guide or End-user Guide?

Yes/No?

@max-cx
Copy link
Contributor

max-cx commented Nov 17, 2021

@metlos, could you please clarify what the user experience impact of this is (for the sake of writing the Release Notes text)?
You can reply here or comment in https://issues.redhat.com/browse/CRW-2397.

@tolusha
Copy link
Contributor

tolusha commented Nov 17, 2021

@max-cx
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants