From 05052b04315b478459c88196d68c0b8edf286c67 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Mon, 23 Mar 2026 10:15:21 +0100 Subject: [PATCH 1/5] feat: Option to have devspaces operator create namespace instead of project on OCP Signed-off-by: Anatolii Bazko --- api/v2/checluster_types.go | 4 ++ api/v2/zz_generated.deepcopy.go | 5 ++ .../che-operator.clusterserviceversion.yaml | 6 +- .../org.eclipse.che_checlusters.yaml | 6 ++ .../bases/org.eclipse.che_checlusters.yaml | 6 ++ deploy/deployment/kubernetes/combined.yaml | 6 ++ ....eclipse.che.CustomResourceDefinition.yaml | 6 ++ deploy/deployment/openshift/combined.yaml | 6 ++ ....eclipse.che.CustomResourceDefinition.yaml | 6 ++ ....eclipse.che.CustomResourceDefinition.yaml | 6 ++ pkg/common/constants/constants.go | 15 ++--- pkg/deploy/server/server_configmap.go | 55 +++++++++++-------- pkg/deploy/server/server_configmap_test.go | 1 + 13 files changed, 95 insertions(+), 33 deletions(-) diff --git a/api/v2/checluster_types.go b/api/v2/checluster_types.go index 2a0cf3063c..14c1d259b9 100644 --- a/api/v2/checluster_types.go +++ b/api/v2/checluster_types.go @@ -500,6 +500,10 @@ type DefaultNamespace struct { // +optional // +kubebuilder:default:=true AutoProvision *bool `json:"autoProvision,omitempty"` + // For OpenShift clusters only, setting this to `true` creates + // a standard Kubernetes Namespace directly. When false (default), the OpenShift ProjectRequest API + // is used instead to trigger cluster-specific Project Templates. + DirectNamespaceCreation *bool `json:"directNamespaceCreation,omitempty"` } type DashboardHeaderMessage struct { diff --git a/api/v2/zz_generated.deepcopy.go b/api/v2/zz_generated.deepcopy.go index 111b0d42d5..071bee7826 100644 --- a/api/v2/zz_generated.deepcopy.go +++ b/api/v2/zz_generated.deepcopy.go @@ -726,6 +726,11 @@ func (in *DefaultNamespace) DeepCopyInto(out *DefaultNamespace) { *out = new(bool) **out = **in } + if in.DirectNamespaceCreation != nil { + in, out := &in.DirectNamespaceCreation, &out.DirectNamespaceCreation + *out = new(bool) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultNamespace. diff --git a/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml b/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml index 80d2b6e42b..19669e3135 100644 --- a/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml +++ b/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml @@ -86,7 +86,7 @@ metadata: categories: Developer Tools certified: "false" containerImage: quay.io/eclipse/che-operator:next - createdAt: "2026-03-19T13:07:33Z" + createdAt: "2026-03-23T09:08:59Z" description: A Kube-native development solution that delivers portable and collaborative developer workspaces. features.operators.openshift.io/cnf: "false" @@ -108,7 +108,7 @@ metadata: operatorframework.io/arch.amd64: supported operatorframework.io/arch.arm64: supported operatorframework.io/os.linux: supported - name: eclipse-che.v7.116.0-956.next + name: eclipse-che.v7.116.0-957.next namespace: placeholder spec: apiservicedefinitions: {} @@ -1144,7 +1144,7 @@ spec: name: gateway-authorization-sidecar-k8s - image: quay.io/che-incubator/header-rewrite-proxy:latest name: gateway-header-sidecar - version: 7.116.0-956.next + version: 7.116.0-957.next webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/bundle/next/eclipse-che/manifests/org.eclipse.che_checlusters.yaml b/bundle/next/eclipse-che/manifests/org.eclipse.che_checlusters.yaml index 6cfee42049..151bd8aa27 100644 --- a/bundle/next/eclipse-che/manifests/org.eclipse.che_checlusters.yaml +++ b/bundle/next/eclipse-che/manifests/org.eclipse.che_checlusters.yaml @@ -7708,6 +7708,12 @@ spec: Indicates if is allowed to automatically create a user namespace. If it set to false, then user namespace must be pre-created by a cluster administrator. type: boolean + directNamespaceCreation: + description: |- + For OpenShift clusters, setting this to true creates a standard Kubernetes Namespace directly. + When false (default), the OpenShift ProjectRequest API is used instead to trigger cluster-specific + Project Templates. + type: boolean template: default: -che description: |- diff --git a/config/crd/bases/org.eclipse.che_checlusters.yaml b/config/crd/bases/org.eclipse.che_checlusters.yaml index 3658d8a5fe..0aaa82eae1 100644 --- a/config/crd/bases/org.eclipse.che_checlusters.yaml +++ b/config/crd/bases/org.eclipse.che_checlusters.yaml @@ -7662,6 +7662,12 @@ spec: Indicates if is allowed to automatically create a user namespace. If it set to false, then user namespace must be pre-created by a cluster administrator. type: boolean + directNamespaceCreation: + description: |- + For OpenShift clusters, setting this to true creates a standard Kubernetes Namespace directly. + When false (default), the OpenShift ProjectRequest API is used instead to trigger cluster-specific + Project Templates. + type: boolean template: default: -che description: |- diff --git a/deploy/deployment/kubernetes/combined.yaml b/deploy/deployment/kubernetes/combined.yaml index 7729f6f97b..23837f0cbe 100644 --- a/deploy/deployment/kubernetes/combined.yaml +++ b/deploy/deployment/kubernetes/combined.yaml @@ -7683,6 +7683,12 @@ spec: Indicates if is allowed to automatically create a user namespace. If it set to false, then user namespace must be pre-created by a cluster administrator. type: boolean + directNamespaceCreation: + description: |- + For OpenShift clusters, setting this to true creates a standard Kubernetes Namespace directly. + When false (default), the OpenShift ProjectRequest API is used instead to trigger cluster-specific + Project Templates. + type: boolean template: default: -che description: |- diff --git a/deploy/deployment/kubernetes/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml b/deploy/deployment/kubernetes/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml index adab82790b..d901073faa 100644 --- a/deploy/deployment/kubernetes/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml +++ b/deploy/deployment/kubernetes/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml @@ -7678,6 +7678,12 @@ spec: Indicates if is allowed to automatically create a user namespace. If it set to false, then user namespace must be pre-created by a cluster administrator. type: boolean + directNamespaceCreation: + description: |- + For OpenShift clusters, setting this to true creates a standard Kubernetes Namespace directly. + When false (default), the OpenShift ProjectRequest API is used instead to trigger cluster-specific + Project Templates. + type: boolean template: default: -che description: |- diff --git a/deploy/deployment/openshift/combined.yaml b/deploy/deployment/openshift/combined.yaml index 18bf307fff..447dc3cf87 100644 --- a/deploy/deployment/openshift/combined.yaml +++ b/deploy/deployment/openshift/combined.yaml @@ -7683,6 +7683,12 @@ spec: Indicates if is allowed to automatically create a user namespace. If it set to false, then user namespace must be pre-created by a cluster administrator. type: boolean + directNamespaceCreation: + description: |- + For OpenShift clusters, setting this to true creates a standard Kubernetes Namespace directly. + When false (default), the OpenShift ProjectRequest API is used instead to trigger cluster-specific + Project Templates. + type: boolean template: default: -che description: |- diff --git a/deploy/deployment/openshift/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml b/deploy/deployment/openshift/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml index 5c9730714d..4f58b7cc07 100644 --- a/deploy/deployment/openshift/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml +++ b/deploy/deployment/openshift/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml @@ -7678,6 +7678,12 @@ spec: Indicates if is allowed to automatically create a user namespace. If it set to false, then user namespace must be pre-created by a cluster administrator. type: boolean + directNamespaceCreation: + description: |- + For OpenShift clusters, setting this to true creates a standard Kubernetes Namespace directly. + When false (default), the OpenShift ProjectRequest API is used instead to trigger cluster-specific + Project Templates. + type: boolean template: default: -che description: |- diff --git a/helmcharts/next/crds/checlusters.org.eclipse.che.CustomResourceDefinition.yaml b/helmcharts/next/crds/checlusters.org.eclipse.che.CustomResourceDefinition.yaml index adab82790b..d901073faa 100644 --- a/helmcharts/next/crds/checlusters.org.eclipse.che.CustomResourceDefinition.yaml +++ b/helmcharts/next/crds/checlusters.org.eclipse.che.CustomResourceDefinition.yaml @@ -7678,6 +7678,12 @@ spec: Indicates if is allowed to automatically create a user namespace. If it set to false, then user namespace must be pre-created by a cluster administrator. type: boolean + directNamespaceCreation: + description: |- + For OpenShift clusters, setting this to true creates a standard Kubernetes Namespace directly. + When false (default), the OpenShift ProjectRequest API is used instead to trigger cluster-specific + Project Templates. + type: boolean template: default: -che description: |- diff --git a/pkg/common/constants/constants.go b/pkg/common/constants/constants.go index ae5ed50b54..b6376ed5ed 100644 --- a/pkg/common/constants/constants.go +++ b/pkg/common/constants/constants.go @@ -108,13 +108,14 @@ const ( ConfigOpenShiftIOInjectTrustedCaBundle = "config.openshift.io/inject-trusted-cabundle" // DevEnvironments - PerUserPVCStorageStrategy = "per-user" - DefaultPvcStorageStrategy = "per-user" - PerWorkspacePVCStorageStrategy = "per-workspace" - EphemeralPVCStorageStrategy = "ephemeral" - CommonPVCStorageStrategy = "common" - DefaultDeploymentStrategy = "Recreate" - DefaultAutoProvision = true + PerUserPVCStorageStrategy = "per-user" + DefaultPvcStorageStrategy = "per-user" + PerWorkspacePVCStorageStrategy = "per-workspace" + EphemeralPVCStorageStrategy = "ephemeral" + CommonPVCStorageStrategy = "common" + DefaultDeploymentStrategy = "Recreate" + DefaultAutoProvision = true + OpenShiftDirectNamespaceCreation = false // Ingress DefaultSelfSignedCertificateSecretName = "self-signed-certificate" diff --git a/pkg/deploy/server/server_configmap.go b/pkg/deploy/server/server_configmap.go index 4ad150e124..c7833bdfb6 100644 --- a/pkg/deploy/server/server_configmap.go +++ b/pkg/deploy/server/server_configmap.go @@ -38,18 +38,19 @@ import ( ) type CheConfigMap struct { - JavaOpts string `json:"JAVA_OPTS"` - CheHost string `json:"CHE_HOST"` - ChePort string `json:"CHE_PORT"` - CheDebugServer string `json:"CHE_DEBUG_SERVER"` - CheLogLevel string `json:"CHE_LOG_LEVEL"` - CheMetricsEnabled string `json:"CHE_METRICS_ENABLED"` - CheInfrastructure string `json:"CHE_INFRASTRUCTURE_ACTIVE"` - UserClusterRoles string `json:"CHE_INFRA_KUBERNETES_USER__CLUSTER__ROLES"` - NamespaceDefault string `json:"CHE_INFRA_KUBERNETES_NAMESPACE_DEFAULT"` - NamespaceCreationAllowed string `json:"CHE_INFRA_KUBERNETES_NAMESPACE_CREATION__ALLOWED"` - Http2Disable string `json:"HTTP2_DISABLE"` - KubernetesLabels string `json:"KUBERNETES_LABELS"` + JavaOpts string `json:"JAVA_OPTS"` + CheHost string `json:"CHE_HOST"` + ChePort string `json:"CHE_PORT"` + CheDebugServer string `json:"CHE_DEBUG_SERVER"` + CheLogLevel string `json:"CHE_LOG_LEVEL"` + CheMetricsEnabled string `json:"CHE_METRICS_ENABLED"` + CheInfrastructure string `json:"CHE_INFRASTRUCTURE_ACTIVE"` + UserClusterRoles string `json:"CHE_INFRA_KUBERNETES_USER__CLUSTER__ROLES"` + NamespaceDefault string `json:"CHE_INFRA_KUBERNETES_NAMESPACE_DEFAULT"` + NamespaceCreationAllowed string `json:"CHE_INFRA_KUBERNETES_NAMESPACE_CREATION__ALLOWED"` + Http2Disable string `json:"HTTP2_DISABLE"` + KubernetesLabels string `json:"KUBERNETES_LABELS"` + OpenShiftDirectNamespaceCreation string `json:"CHE_INFRA_OPENSHIFT__DIRECT_NAMESPACE_CREATION"` // TODO remove when keycloak codebase is removed from che-server component CheOIDCAuthServerUrl string `json:"CHE_OIDC_AUTH__SERVER__URL,omitempty"` @@ -136,18 +137,26 @@ func (s *CheServerReconciler) getConfigMapData(ctx *chetypes.DeployContext) (che kubernetesLabels := labels.FormatLabels(deploy.GetLabels(defaults.GetCheFlavor())) + openShiftDirectNamespaceCreation := strconv.FormatBool( + pointer.BoolDeref( + ctx.CheCluster.Spec.DevEnvironments.DefaultNamespace.DirectNamespaceCreation, + constants.OpenShiftDirectNamespaceCreation, + ), + ) + data := &CheConfigMap{ - JavaOpts: javaOpts, - CheHost: ctx.CheHost, - ChePort: chePort, - CheDebugServer: cheDebugServer, - CheLogLevel: cheLogLevel, - CheMetricsEnabled: cheMetricsEnabled, - CheInfrastructure: cheInfrastructure, - CheOIDCAuthServerUrl: ctx.CheCluster.Spec.Networking.Auth.IdentityProviderURL, - NamespaceDefault: namespaceDefault, - NamespaceCreationAllowed: namespaceCreationAllowed, - KubernetesLabels: kubernetesLabels, + JavaOpts: javaOpts, + CheHost: ctx.CheHost, + ChePort: chePort, + CheDebugServer: cheDebugServer, + CheLogLevel: cheLogLevel, + CheMetricsEnabled: cheMetricsEnabled, + CheInfrastructure: cheInfrastructure, + CheOIDCAuthServerUrl: ctx.CheCluster.Spec.Networking.Auth.IdentityProviderURL, + NamespaceDefault: namespaceDefault, + NamespaceCreationAllowed: namespaceCreationAllowed, + KubernetesLabels: kubernetesLabels, + OpenShiftDirectNamespaceCreation: openShiftDirectNamespaceCreation, // Disable HTTP2 protocol. // Fix issue with creating config maps on the cluster https://issues.redhat.com/browse/CRW-2677 // The root cause is in the HTTP2 protocol support of the okttp3 library that is used by fabric8.kubernetes-client that is used by che-server diff --git a/pkg/deploy/server/server_configmap_test.go b/pkg/deploy/server/server_configmap_test.go index 54b2ebf0a5..6bc0a5fa4d 100644 --- a/pkg/deploy/server/server_configmap_test.go +++ b/pkg/deploy/server/server_configmap_test.go @@ -83,6 +83,7 @@ func TestGetConfigMapData(t *testing.T) { "KUBERNETES_LABELS": labels.FormatLabels(deploy.GetLabels(defaults.GetCheFlavor())), "HTTP2_DISABLE": "true", "CHE_OIDC_AUTH__SERVER__URL": "http://identity-provider", + "CHE_INFRA_OPENSHIFT__DIRECT_NAMESPACE_CREATION": "false", }, }, } From 28d7abf1f33957014c6bb1fe93860382724da7b2 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Mon, 23 Mar 2026 10:20:21 +0100 Subject: [PATCH 2/5] feat: Option to have devspaces operator create namespace instead of project on OCP Signed-off-by: Anatolii Bazko --- .../manifests/che-operator.clusterserviceversion.yaml | 6 +++--- .../eclipse-che/manifests/org.eclipse.che_checlusters.yaml | 6 +++--- config/crd/bases/org.eclipse.che_checlusters.yaml | 6 +++--- deploy/deployment/kubernetes/combined.yaml | 6 +++--- ...heclusters.org.eclipse.che.CustomResourceDefinition.yaml | 6 +++--- deploy/deployment/openshift/combined.yaml | 6 +++--- ...heclusters.org.eclipse.che.CustomResourceDefinition.yaml | 6 +++--- ...heclusters.org.eclipse.che.CustomResourceDefinition.yaml | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml b/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml index 19669e3135..e54debfbfd 100644 --- a/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml +++ b/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml @@ -86,7 +86,7 @@ metadata: categories: Developer Tools certified: "false" containerImage: quay.io/eclipse/che-operator:next - createdAt: "2026-03-23T09:08:59Z" + createdAt: "2026-03-23T09:20:08Z" description: A Kube-native development solution that delivers portable and collaborative developer workspaces. features.operators.openshift.io/cnf: "false" @@ -108,7 +108,7 @@ metadata: operatorframework.io/arch.amd64: supported operatorframework.io/arch.arm64: supported operatorframework.io/os.linux: supported - name: eclipse-che.v7.116.0-957.next + name: eclipse-che.v7.116.0-958.next namespace: placeholder spec: apiservicedefinitions: {} @@ -1144,7 +1144,7 @@ spec: name: gateway-authorization-sidecar-k8s - image: quay.io/che-incubator/header-rewrite-proxy:latest name: gateway-header-sidecar - version: 7.116.0-957.next + version: 7.116.0-958.next webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/bundle/next/eclipse-che/manifests/org.eclipse.che_checlusters.yaml b/bundle/next/eclipse-che/manifests/org.eclipse.che_checlusters.yaml index 151bd8aa27..1638270777 100644 --- a/bundle/next/eclipse-che/manifests/org.eclipse.che_checlusters.yaml +++ b/bundle/next/eclipse-che/manifests/org.eclipse.che_checlusters.yaml @@ -7710,9 +7710,9 @@ spec: type: boolean directNamespaceCreation: description: |- - For OpenShift clusters, setting this to true creates a standard Kubernetes Namespace directly. - When false (default), the OpenShift ProjectRequest API is used instead to trigger cluster-specific - Project Templates. + For OpenShift clusters only, setting this to `true` creates + a standard Kubernetes Namespace directly. When false (default), the OpenShift ProjectRequest API + is used instead to trigger cluster-specific Project Templates. type: boolean template: default: -che diff --git a/config/crd/bases/org.eclipse.che_checlusters.yaml b/config/crd/bases/org.eclipse.che_checlusters.yaml index 0aaa82eae1..4a635f20ba 100644 --- a/config/crd/bases/org.eclipse.che_checlusters.yaml +++ b/config/crd/bases/org.eclipse.che_checlusters.yaml @@ -7664,9 +7664,9 @@ spec: type: boolean directNamespaceCreation: description: |- - For OpenShift clusters, setting this to true creates a standard Kubernetes Namespace directly. - When false (default), the OpenShift ProjectRequest API is used instead to trigger cluster-specific - Project Templates. + For OpenShift clusters only, setting this to `true` creates + a standard Kubernetes Namespace directly. When false (default), the OpenShift ProjectRequest API + is used instead to trigger cluster-specific Project Templates. type: boolean template: default: -che diff --git a/deploy/deployment/kubernetes/combined.yaml b/deploy/deployment/kubernetes/combined.yaml index 23837f0cbe..402e656d75 100644 --- a/deploy/deployment/kubernetes/combined.yaml +++ b/deploy/deployment/kubernetes/combined.yaml @@ -7685,9 +7685,9 @@ spec: type: boolean directNamespaceCreation: description: |- - For OpenShift clusters, setting this to true creates a standard Kubernetes Namespace directly. - When false (default), the OpenShift ProjectRequest API is used instead to trigger cluster-specific - Project Templates. + For OpenShift clusters only, setting this to `true` creates + a standard Kubernetes Namespace directly. When false (default), the OpenShift ProjectRequest API + is used instead to trigger cluster-specific Project Templates. type: boolean template: default: -che diff --git a/deploy/deployment/kubernetes/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml b/deploy/deployment/kubernetes/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml index d901073faa..8b5dddff49 100644 --- a/deploy/deployment/kubernetes/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml +++ b/deploy/deployment/kubernetes/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml @@ -7680,9 +7680,9 @@ spec: type: boolean directNamespaceCreation: description: |- - For OpenShift clusters, setting this to true creates a standard Kubernetes Namespace directly. - When false (default), the OpenShift ProjectRequest API is used instead to trigger cluster-specific - Project Templates. + For OpenShift clusters only, setting this to `true` creates + a standard Kubernetes Namespace directly. When false (default), the OpenShift ProjectRequest API + is used instead to trigger cluster-specific Project Templates. type: boolean template: default: -che diff --git a/deploy/deployment/openshift/combined.yaml b/deploy/deployment/openshift/combined.yaml index 447dc3cf87..1762d45e03 100644 --- a/deploy/deployment/openshift/combined.yaml +++ b/deploy/deployment/openshift/combined.yaml @@ -7685,9 +7685,9 @@ spec: type: boolean directNamespaceCreation: description: |- - For OpenShift clusters, setting this to true creates a standard Kubernetes Namespace directly. - When false (default), the OpenShift ProjectRequest API is used instead to trigger cluster-specific - Project Templates. + For OpenShift clusters only, setting this to `true` creates + a standard Kubernetes Namespace directly. When false (default), the OpenShift ProjectRequest API + is used instead to trigger cluster-specific Project Templates. type: boolean template: default: -che diff --git a/deploy/deployment/openshift/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml b/deploy/deployment/openshift/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml index 4f58b7cc07..ce620773ab 100644 --- a/deploy/deployment/openshift/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml +++ b/deploy/deployment/openshift/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml @@ -7680,9 +7680,9 @@ spec: type: boolean directNamespaceCreation: description: |- - For OpenShift clusters, setting this to true creates a standard Kubernetes Namespace directly. - When false (default), the OpenShift ProjectRequest API is used instead to trigger cluster-specific - Project Templates. + For OpenShift clusters only, setting this to `true` creates + a standard Kubernetes Namespace directly. When false (default), the OpenShift ProjectRequest API + is used instead to trigger cluster-specific Project Templates. type: boolean template: default: -che diff --git a/helmcharts/next/crds/checlusters.org.eclipse.che.CustomResourceDefinition.yaml b/helmcharts/next/crds/checlusters.org.eclipse.che.CustomResourceDefinition.yaml index d901073faa..8b5dddff49 100644 --- a/helmcharts/next/crds/checlusters.org.eclipse.che.CustomResourceDefinition.yaml +++ b/helmcharts/next/crds/checlusters.org.eclipse.che.CustomResourceDefinition.yaml @@ -7680,9 +7680,9 @@ spec: type: boolean directNamespaceCreation: description: |- - For OpenShift clusters, setting this to true creates a standard Kubernetes Namespace directly. - When false (default), the OpenShift ProjectRequest API is used instead to trigger cluster-specific - Project Templates. + For OpenShift clusters only, setting this to `true` creates + a standard Kubernetes Namespace directly. When false (default), the OpenShift ProjectRequest API + is used instead to trigger cluster-specific Project Templates. type: boolean template: default: -che From ae468ad877627a373b09a32a42ff1d12a0002f7f Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Tue, 24 Mar 2026 11:03:25 +0100 Subject: [PATCH 3/5] fixup Signed-off-by: Anatolii Bazko --- api/v2/checluster_types.go | 3 ++- api/v2/zz_generated.deepcopy.go | 4 ++-- pkg/deploy/server/server_configmap.go | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/api/v2/checluster_types.go b/api/v2/checluster_types.go index 14c1d259b9..560c9b8306 100644 --- a/api/v2/checluster_types.go +++ b/api/v2/checluster_types.go @@ -503,7 +503,8 @@ type DefaultNamespace struct { // For OpenShift clusters only, setting this to `true` creates // a standard Kubernetes Namespace directly. When false (default), the OpenShift ProjectRequest API // is used instead to trigger cluster-specific Project Templates. - DirectNamespaceCreation *bool `json:"directNamespaceCreation,omitempty"` + // +optional + CreateNamespaceDirectly *bool `json:"createNamespaceDirectly,omitempty"` } type DashboardHeaderMessage struct { diff --git a/api/v2/zz_generated.deepcopy.go b/api/v2/zz_generated.deepcopy.go index 071bee7826..ec3d7cf06e 100644 --- a/api/v2/zz_generated.deepcopy.go +++ b/api/v2/zz_generated.deepcopy.go @@ -726,8 +726,8 @@ func (in *DefaultNamespace) DeepCopyInto(out *DefaultNamespace) { *out = new(bool) **out = **in } - if in.DirectNamespaceCreation != nil { - in, out := &in.DirectNamespaceCreation, &out.DirectNamespaceCreation + if in.CreateNamespaceDirectly != nil { + in, out := &in.CreateNamespaceDirectly, &out.CreateNamespaceDirectly *out = new(bool) **out = **in } diff --git a/pkg/deploy/server/server_configmap.go b/pkg/deploy/server/server_configmap.go index c7833bdfb6..f92194778e 100644 --- a/pkg/deploy/server/server_configmap.go +++ b/pkg/deploy/server/server_configmap.go @@ -139,7 +139,7 @@ func (s *CheServerReconciler) getConfigMapData(ctx *chetypes.DeployContext) (che openShiftDirectNamespaceCreation := strconv.FormatBool( pointer.BoolDeref( - ctx.CheCluster.Spec.DevEnvironments.DefaultNamespace.DirectNamespaceCreation, + ctx.CheCluster.Spec.DevEnvironments.DefaultNamespace.CreateNamespaceDirectly, constants.OpenShiftDirectNamespaceCreation, ), ) From 59f7714d28b322f0c20e9161725ffdfc9681840b Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Tue, 24 Mar 2026 11:05:56 +0100 Subject: [PATCH 4/5] fixup Signed-off-by: Anatolii Bazko --- pkg/common/constants/constants.go | 2 +- pkg/deploy/server/server_configmap.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/common/constants/constants.go b/pkg/common/constants/constants.go index b6376ed5ed..5b52ad5bbc 100644 --- a/pkg/common/constants/constants.go +++ b/pkg/common/constants/constants.go @@ -115,7 +115,7 @@ const ( CommonPVCStorageStrategy = "common" DefaultDeploymentStrategy = "Recreate" DefaultAutoProvision = true - OpenShiftDirectNamespaceCreation = false + OpenShiftCreateNamespaceDirectly = false // Ingress DefaultSelfSignedCertificateSecretName = "self-signed-certificate" diff --git a/pkg/deploy/server/server_configmap.go b/pkg/deploy/server/server_configmap.go index f92194778e..9bb85ce6c6 100644 --- a/pkg/deploy/server/server_configmap.go +++ b/pkg/deploy/server/server_configmap.go @@ -50,7 +50,7 @@ type CheConfigMap struct { NamespaceCreationAllowed string `json:"CHE_INFRA_KUBERNETES_NAMESPACE_CREATION__ALLOWED"` Http2Disable string `json:"HTTP2_DISABLE"` KubernetesLabels string `json:"KUBERNETES_LABELS"` - OpenShiftDirectNamespaceCreation string `json:"CHE_INFRA_OPENSHIFT__DIRECT_NAMESPACE_CREATION"` + OpenShiftCreateNamespaceDirectly string `json:"CHE_INFRA_OPENSHIFT__DIRECT_NAMESPACE_CREATION"` // TODO remove when keycloak codebase is removed from che-server component CheOIDCAuthServerUrl string `json:"CHE_OIDC_AUTH__SERVER__URL,omitempty"` @@ -137,10 +137,10 @@ func (s *CheServerReconciler) getConfigMapData(ctx *chetypes.DeployContext) (che kubernetesLabels := labels.FormatLabels(deploy.GetLabels(defaults.GetCheFlavor())) - openShiftDirectNamespaceCreation := strconv.FormatBool( + openShiftCreateNamespaceDirectly := strconv.FormatBool( pointer.BoolDeref( ctx.CheCluster.Spec.DevEnvironments.DefaultNamespace.CreateNamespaceDirectly, - constants.OpenShiftDirectNamespaceCreation, + constants.OpenShiftCreateNamespaceDirectly, ), ) @@ -156,7 +156,7 @@ func (s *CheServerReconciler) getConfigMapData(ctx *chetypes.DeployContext) (che NamespaceDefault: namespaceDefault, NamespaceCreationAllowed: namespaceCreationAllowed, KubernetesLabels: kubernetesLabels, - OpenShiftDirectNamespaceCreation: openShiftDirectNamespaceCreation, + OpenShiftCreateNamespaceDirectly: openShiftCreateNamespaceDirectly, // Disable HTTP2 protocol. // Fix issue with creating config maps on the cluster https://issues.redhat.com/browse/CRW-2677 // The root cause is in the HTTP2 protocol support of the okttp3 library that is used by fabric8.kubernetes-client that is used by che-server From 38c5e437c19a5d899c2126cdb9405b9ec9dc87e0 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Tue, 24 Mar 2026 11:37:51 +0100 Subject: [PATCH 5/5] fixup Signed-off-by: Anatolii Bazko --- .../manifests/che-operator.clusterserviceversion.yaml | 6 +++--- .../eclipse-che/manifests/org.eclipse.che_checlusters.yaml | 2 +- config/crd/bases/org.eclipse.che_checlusters.yaml | 2 +- deploy/deployment/kubernetes/combined.yaml | 2 +- ...heclusters.org.eclipse.che.CustomResourceDefinition.yaml | 2 +- deploy/deployment/openshift/combined.yaml | 2 +- ...heclusters.org.eclipse.che.CustomResourceDefinition.yaml | 2 +- ...heclusters.org.eclipse.che.CustomResourceDefinition.yaml | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml b/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml index e54debfbfd..5079a0a7f4 100644 --- a/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml +++ b/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml @@ -86,7 +86,7 @@ metadata: categories: Developer Tools certified: "false" containerImage: quay.io/eclipse/che-operator:next - createdAt: "2026-03-23T09:20:08Z" + createdAt: "2026-03-24T10:32:31Z" description: A Kube-native development solution that delivers portable and collaborative developer workspaces. features.operators.openshift.io/cnf: "false" @@ -108,7 +108,7 @@ metadata: operatorframework.io/arch.amd64: supported operatorframework.io/arch.arm64: supported operatorframework.io/os.linux: supported - name: eclipse-che.v7.116.0-958.next + name: eclipse-che.v7.116.0-959.next namespace: placeholder spec: apiservicedefinitions: {} @@ -1144,7 +1144,7 @@ spec: name: gateway-authorization-sidecar-k8s - image: quay.io/che-incubator/header-rewrite-proxy:latest name: gateway-header-sidecar - version: 7.116.0-958.next + version: 7.116.0-959.next webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/bundle/next/eclipse-che/manifests/org.eclipse.che_checlusters.yaml b/bundle/next/eclipse-che/manifests/org.eclipse.che_checlusters.yaml index 1638270777..7bfb8be2b9 100644 --- a/bundle/next/eclipse-che/manifests/org.eclipse.che_checlusters.yaml +++ b/bundle/next/eclipse-che/manifests/org.eclipse.che_checlusters.yaml @@ -7708,7 +7708,7 @@ spec: Indicates if is allowed to automatically create a user namespace. If it set to false, then user namespace must be pre-created by a cluster administrator. type: boolean - directNamespaceCreation: + createNamespaceDirectly: description: |- For OpenShift clusters only, setting this to `true` creates a standard Kubernetes Namespace directly. When false (default), the OpenShift ProjectRequest API diff --git a/config/crd/bases/org.eclipse.che_checlusters.yaml b/config/crd/bases/org.eclipse.che_checlusters.yaml index 4a635f20ba..e19792fb37 100644 --- a/config/crd/bases/org.eclipse.che_checlusters.yaml +++ b/config/crd/bases/org.eclipse.che_checlusters.yaml @@ -7662,7 +7662,7 @@ spec: Indicates if is allowed to automatically create a user namespace. If it set to false, then user namespace must be pre-created by a cluster administrator. type: boolean - directNamespaceCreation: + createNamespaceDirectly: description: |- For OpenShift clusters only, setting this to `true` creates a standard Kubernetes Namespace directly. When false (default), the OpenShift ProjectRequest API diff --git a/deploy/deployment/kubernetes/combined.yaml b/deploy/deployment/kubernetes/combined.yaml index 402e656d75..d150579c33 100644 --- a/deploy/deployment/kubernetes/combined.yaml +++ b/deploy/deployment/kubernetes/combined.yaml @@ -7683,7 +7683,7 @@ spec: Indicates if is allowed to automatically create a user namespace. If it set to false, then user namespace must be pre-created by a cluster administrator. type: boolean - directNamespaceCreation: + createNamespaceDirectly: description: |- For OpenShift clusters only, setting this to `true` creates a standard Kubernetes Namespace directly. When false (default), the OpenShift ProjectRequest API diff --git a/deploy/deployment/kubernetes/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml b/deploy/deployment/kubernetes/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml index 8b5dddff49..3149c71735 100644 --- a/deploy/deployment/kubernetes/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml +++ b/deploy/deployment/kubernetes/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml @@ -7678,7 +7678,7 @@ spec: Indicates if is allowed to automatically create a user namespace. If it set to false, then user namespace must be pre-created by a cluster administrator. type: boolean - directNamespaceCreation: + createNamespaceDirectly: description: |- For OpenShift clusters only, setting this to `true` creates a standard Kubernetes Namespace directly. When false (default), the OpenShift ProjectRequest API diff --git a/deploy/deployment/openshift/combined.yaml b/deploy/deployment/openshift/combined.yaml index 1762d45e03..5c4f27513a 100644 --- a/deploy/deployment/openshift/combined.yaml +++ b/deploy/deployment/openshift/combined.yaml @@ -7683,7 +7683,7 @@ spec: Indicates if is allowed to automatically create a user namespace. If it set to false, then user namespace must be pre-created by a cluster administrator. type: boolean - directNamespaceCreation: + createNamespaceDirectly: description: |- For OpenShift clusters only, setting this to `true` creates a standard Kubernetes Namespace directly. When false (default), the OpenShift ProjectRequest API diff --git a/deploy/deployment/openshift/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml b/deploy/deployment/openshift/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml index ce620773ab..4b3c06913b 100644 --- a/deploy/deployment/openshift/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml +++ b/deploy/deployment/openshift/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml @@ -7678,7 +7678,7 @@ spec: Indicates if is allowed to automatically create a user namespace. If it set to false, then user namespace must be pre-created by a cluster administrator. type: boolean - directNamespaceCreation: + createNamespaceDirectly: description: |- For OpenShift clusters only, setting this to `true` creates a standard Kubernetes Namespace directly. When false (default), the OpenShift ProjectRequest API diff --git a/helmcharts/next/crds/checlusters.org.eclipse.che.CustomResourceDefinition.yaml b/helmcharts/next/crds/checlusters.org.eclipse.che.CustomResourceDefinition.yaml index 8b5dddff49..3149c71735 100644 --- a/helmcharts/next/crds/checlusters.org.eclipse.che.CustomResourceDefinition.yaml +++ b/helmcharts/next/crds/checlusters.org.eclipse.che.CustomResourceDefinition.yaml @@ -7678,7 +7678,7 @@ spec: Indicates if is allowed to automatically create a user namespace. If it set to false, then user namespace must be pre-created by a cluster administrator. type: boolean - directNamespaceCreation: + createNamespaceDirectly: description: |- For OpenShift clusters only, setting this to `true` creates a standard Kubernetes Namespace directly. When false (default), the OpenShift ProjectRequest API