-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Set custom annotations when create user workspace #23350
Comments
@vinokurig hello, could you please take a look? Are those properties still valid? |
I've just checked on minikube % oc get namespaces admin-che -o yaml
apiVersion: v1
kind: Namespace
metadata:
annotations:
che.eclipse.org/username: admin
field.cattle.io/projectId: c-57d7n:p-8j45h
creationTimestamp: "2025-02-18T08:38:30Z"
labels:
app.kubernetes.io/component: workspaces-namespace
app.kubernetes.io/part-of: che.eclipse.org
field.cattle.io/projectId: p-8j45h
kubernetes.io/metadata.name: admin-che
name: admin-che
resourceVersion: "3588"
uid: 66938dec-7742-4452-8b47-4f1d900bf154
spec:
finalizers:
- kubernetes
status:
phase: Active |
Could not reproduce the issue on openshift, the labels and annotations from the extraproperties were propagated to the automatically created namespace:
|
@disaster37 hello, do you have any other details? otherwise we are going to close as Can't Reproduce |
Hi, I use it on rancher / rke2. If I set only |
Try to set log level to spec:
components:
cheServer:
logLevel: DEBUG All magic happens here https://github.com/eclipse-che/che-server/blob/main/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespace.java#L218 |
Hum, I found the following log:
When I look on my cluster, I found the clusterRoleBinding And the cluster role - apiGroups:
- ''
resources:
- namespaces
verbs:
- get
- create
- update
- list |
I suspect error have no direct link with RBAC. Because it work on your platform, the only way is because rancher operator add some annotations when new namespace is created. I think it break che server when it try to annotate the namespace. Maybee it first create namespace then it annotate it. But because namespace was updated between create and annotate by rancher operator, It get a forbiden because object already updated. Somethink like this... |
I am wondering if you are able |
Describe the bug
When put this directive
CHE_INFRA_KUBERNETES_NAMESPACE_ANNOTATIONS: 'che.eclipse.org/username=<username>,field.cattle.io/projectId=c-m-27mnjwcx:p-m2mjd
onextraProperties
, is not working.I need to set this annotations when eclipse-che create user workspace. I know that I can pre create namespace as expected, but is not possible because of I doesn't know in advance the users wil be connect on.
Che version
7.98
Steps to reproduce
Deploy eclipse che like you want and add:
Expected behavior
The namespace created must have expected annotations, aka
che.eclipse.org/username=<username>,field.cattle.io/projectId=c-57d7n:p-8j45h
But, there are nothink here, not
che.eclipse.org/username=<username>
and notfield.cattle.io/projectId=c-57d7n:p-8j45h
Runtime
other (please specify in additional context)
Screenshots
No response
Installation method
chectl/latest
Environment
Linux
Eclipse Che Logs
Additional context
No response
The text was updated successfully, but these errors were encountered: