Use che.infrastructure.kubernetes.namespace.default during workspace namespace resolution (#14828)
Load the workspace during then namespace resolution so that we can check
for the attribute stored in the workspace attributes.
Switch the default namespace to `<username>-che`.
Update the property descriptions in che.properties and use the new
CHE_INFRA_KUBERNETES_NAMESPACE_DEFAULT in the helm chart.
Move the delete to the KubernetesNamespace/OpenShiftProject to
concentrate the handling in one place.
Split the isNamespaceStatic() (previously called isPredefined()) into
isCreatingNamespaces() and isManagingNamespaces() to separately capture
the two usecases in which that single method was previously incorrectly
called. Also make these methods workspace-specific to be able to
consistently work with the legacy logic across all methods.
Signed-off-by:
Lukas Krejci <lkrejci@redhat.com>
Showing
- assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/classes/che/che.properties 15 additions, 7 deletions...er-war/src/main/webapp/WEB-INF/classes/che/che.properties
- deploy/kubernetes/helm/che/templates/configmap.yaml 1 addition, 1 deletiondeploy/kubernetes/helm/che/templates/configmap.yaml
- deploy/kubernetes/helm/che/templates/deployment.yaml 2 additions, 2 deletionsdeploy/kubernetes/helm/che/templates/deployment.yaml
- deploy/kubernetes/helm/che/templates/exec-role.yaml 1 addition, 1 deletiondeploy/kubernetes/helm/che/templates/exec-role.yaml
- deploy/kubernetes/helm/che/templates/workspace-exec-role-binding.yaml 1 addition, 1 deletion...netes/helm/che/templates/workspace-exec-role-binding.yaml
- deploy/kubernetes/helm/che/templates/workspace-service-account.yaml 1 addition, 1 deletion...ernetes/helm/che/templates/workspace-service-account.yaml
- deploy/kubernetes/helm/che/templates/workspace-view-role-binding.yaml 1 addition, 1 deletion...netes/helm/che/templates/workspace-view-role-binding.yaml
- deploy/kubernetes/helm/che/templates/workspace-view-role.yaml 1 addition, 1 deletion...oy/kubernetes/helm/che/templates/workspace-view-role.yaml
- deploy/kubernetes/helm/che/values.yaml 3 additions, 3 deletionsdeploy/kubernetes/helm/che/values.yaml
- infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespace.java 32 additions, 0 deletions...rastructure/kubernetes/namespace/KubernetesNamespace.java
- infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactory.java 235 additions, 40 deletions...ture/kubernetes/namespace/KubernetesNamespaceFactory.java
- infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/RemoveNamespaceOnWorkspaceRemove.java 9 additions, 32 deletions...ubernetes/namespace/RemoveNamespaceOnWorkspaceRemove.java
- infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/pvc/WorkspacePVCCleaner.java 9 additions, 1 deletion...ructure/kubernetes/namespace/pvc/WorkspacePVCCleaner.java
- infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactoryTest.java 251 additions, 38 deletions.../kubernetes/namespace/KubernetesNamespaceFactoryTest.java
- infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceTest.java 49 additions, 0 deletions...ructure/kubernetes/namespace/KubernetesNamespaceTest.java
- infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/RemoveNamespaceOnWorkspaceRemoveTest.java 20 additions, 5 deletions...netes/namespace/RemoveNamespaceOnWorkspaceRemoveTest.java
- infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/pvc/WorkspacePVCCleanerTest.java 24 additions, 38 deletions...ure/kubernetes/namespace/pvc/WorkspacePVCCleanerTest.java
- infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProject.java 33 additions, 0 deletions...ce/infrastructure/openshift/project/OpenShiftProject.java
- infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactory.java 59 additions, 6 deletions...astructure/openshift/project/OpenShiftProjectFactory.java
- infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/RemoveProjectOnWorkspaceRemove.java 9 additions, 32 deletions...ure/openshift/project/RemoveProjectOnWorkspaceRemove.java
Please register or sign in to comment