-
Notifications
You must be signed in to change notification settings - Fork 88
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: Allow configuring user namespaces with OpenShift template #1925
Conversation
@tolusha: do you think it’s possible to verify this PR on an existing OCP cluster by deploying Eclipse Che Next with an operator image built using the codebase of this PR? |
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
@tolusha have a question about the |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested on workspaces.openshift.com against rosa 4.17.2 with the following template:
kind: Template
apiVersion: template.openshift.io/v1
metadata:
name: che-user-namespace-configurator
namespace: eclipse-che
uid: 68fa1f1a-9d15-41cd-8cbf-ba491221b915
resourceVersion: '50502'
creationTimestamp: '2024-10-30T10:46:36Z'
labels:
app.kubernetes.io/component: workspaces-config
app.kubernetes.io/part-of: che.eclipse.org
managedFields:
- manager: Mozilla
operation: Update
apiVersion: template.openshift.io/v1
time: '2024-10-30T11:27:14Z'
fieldsType: FieldsV1
fieldsV1:
'f:metadata':
'f:labels':
.: {}
'f:app.kubernetes.io/component': {}
'f:app.kubernetes.io/part-of': {}
'f:objects': {}
objects:
- kind: ConfigMap
apiVersion: v1
metadata:
name: user-cm
labels:
app.kubernetes.io/part-of: che.eclipse.org
app.kubernetes.io/component: workspaces-config
annotations:
controller.devfile.io/mount-as: subpath
controller.devfile.io/mount-path: /home/user/
data:
test-config-map-file: configmap
- kind: Secret
apiVersion: v1
metadata:
name: user-secret
labels:
app.kubernetes.io/part-of: che.eclipse.org
app.kubernetes.io/component: workspaces-config
annotations:
controller.devfile.io/mount-as: subpath
controller.devfile.io/mount-path: /home/user/
stringData:
test-secret-file: secret
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: user-pvc
labels:
app.kubernetes.io/part-of: che.eclipse.org
app.kubernetes.io/component: workspaces-config
controller.devfile.io/mount-to-devworkspace: 'true'
annotations:
controller.devfile.io/mount-path: /home/user/user-pvc
controller.devfile.io/read-only: 'false'
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
volumeMode: Filesystem
- apiVersion: v1
kind: LimitRange
metadata:
name: cpu-resource-constraint
spec:
limits:
- default:
cpu: 500m
defaultRequest:
cpu: 500m
max:
cpu: '1'
min:
cpu: 100m
type: Container
- apiVersion: v1
kind: ResourceQuota
metadata:
name: my-resource-quota
spec:
hard:
cpu: '10'
memory: 10Gi
pods: '10'
The only thing that is important is properly documenting optional parameters and cross-link it with OpenShift docs
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
@tolusha : hello, Thank you for the test scenario in PR description. I had faced error message Also, it's not completely clear if it was needed to log into Eclipse Che at step
And I am not sure if ${PROJECT_ADMIN_USER}, PROJECT_NAME, PROJECT_ADMIN_USER should be replaced with a real values in the template when create it in OpenShift at the step 2. Could you, please, help to sort the errors above out? |
Hello. Install yq following the command:
Add a new user to the OpenShift and log in
Use script to for proper testing /build/scripts/olm/test-catalog-from-sources.sh
No, it shouldn't |
@tolusha : thank you for the help Test results as non admin userTest with factory URL https://github.com/che-incubator/quarkus-api-exampleAfter login into Eclipse Che as non admin user workspace had been created from factory URL https://github.com/che-incubator/quarkus-api-example successfully, but
Test Empty Workspace sampleEmpty Workspace started successfully being logged as non admin user, but
Test .NET 5.0 sampleNon-empty sample .NET 5.0 started successfully as non admin user, but there was no oc command available in the terminal to run
Test results as admin userTest with factory URL https://github.com/che-incubator/quarkus-api-exampleWorkspace started successfully, and there was expected output in the terminal: Test Empty Workspace sampleStart of Empty Workspace as cluster admin user had failed because of error creating DevWorkspace deployment: Container universal-developer-image has state ImagePullBackOff
DevWorkspace.yaml: https://gist.github.com/dmytro-ndp/b9aecb75d1a25d85c7e2424c418cdc90 Second start of Empty Workspace as cluster admin user was successful with expected output in the workspace terminal:
Test .NET 5.0 sampleNon-empty sample .NET 5.0 started successfully as cluster admin user, but there was no oc command available in the terminal to run |
Signed-off-by: Anatolii Bazko <[email protected]>
@tolusha : it's also interesting to know if it's expected to see workspace route config maps in the Shouldn't they being created in the user namespaces? |
No, they are fine |
@tolusha: I have faced the same error message when checked commands in workspace terminal as non admin user in redeployed Eclipse Che from this PR:
|
Build 3.18 :: operator_3.x/427: Console, Changes, Git Data |
Build 3.18 :: sync-to-downstream_3.x/8006: Console, Changes, Git Data |
Build 3.18 :: operator-bundle_3.x/3805: Console, Changes, Git Data |
Build 3.18 :: sync-to-downstream_3.x/8007: Console, Changes, Git Data |
Build 3.18 :: get-sources-rhpkg-container-build_3.x/8084: devspaces-operator : 3.x :: Failed in 65725932 : operator-3.18-17 |
Build 3.18 :: get-sources-rhpkg-container-build_3.x/8085: devspaces-operator-bundle : 3.x :: Failed in 65728338 : BREW:BUILD/STATUS:UNKNOWN |
Build 3.18 :: operator-bundle_3.x/3807: Console, Changes, Git Data |
Build 3.18 :: sync-to-downstream_3.x/8011: Console, Changes, Git Data |
Build 3.18 :: get-sources-rhpkg-container-build_3.x/8089: devspaces-operator-bundle : 3.x :: Failed in 65733171 : BREW:BUILD/STATUS:UNKNOWN |
Build 3.18 :: operator-bundle_3.x/3808: Console, Changes, Git Data |
Build 3.18 :: sync-to-downstream_3.x/8012: Console, Changes, Git Data |
Build 3.18 :: get-sources-rhpkg-container-build_3.x/8090: devspaces-operator-bundle : 3.x :: Failed in 65740261 : BREW:BUILD/STATUS:UNKNOWN |
Build 3.18 :: operator-bundle_3.x/3809: Console, Changes, Git Data |
Build 3.18 :: sync-to-downstream_3.x/8013: Console, Changes, Git Data |
Build 3.18 :: get-sources-rhpkg-container-build_3.x/8091: devspaces-operator-bundle : 3.x :: Failed in 65746878 : BREW:BUILD/STATUS:UNKNOWN |
Build 3.18 :: operator-bundle_3.x/3810: Console, Changes, Git Data |
Build 3.18 :: sync-to-downstream_3.x/8014: Console, Changes, Git Data |
Build 3.18 :: get-sources-rhpkg-container-build_3.x/8092: devspaces-operator-bundle : 3.x :: Failed in 65757204 : BREW:BUILD/STATUS:UNKNOWN |
Build 3.18 :: operator-bundle_3.x/3811: Console, Changes, Git Data |
Build 3.18 :: sync-to-downstream_3.x/8015: Console, Changes, Git Data |
Build 3.18 :: get-sources-rhpkg-container-build_3.x/8093: devspaces-operator-bundle : 3.x :: Failed in 65761388 : BREW:BUILD/STATUS:UNKNOWN |
What does this PR do?
feat: Allow configuring user namespaces with OpenShift template
Screenshot/screencast of this PR
N/A
What issues does this PR fix or reference?
eclipse-che/che#23176
How to test this PR?
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.