Skip to content

Commit aa226ea

Browse files
authored
chore: Add spec.DevWorkspace.containerResourceCaps field (#2069)
Signed-off-by: Anatolii Bazko <[email protected]>
1 parent 356a994 commit aa226ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2119
-204
lines changed

api/v2/checluster_types.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ type CheClusterDevEnvironments struct {
128128
// container components that do not define limits or requests.
129129
// +optional
130130
DefaultContainerResources *corev1.ResourceRequirements `json:"defaultContainerResources,omitempty"`
131+
// ContainerResourceCaps defines the maximum resource requirements enforced for workspace
132+
// containers. If a container specifies limits or requests that exceed these values, they
133+
// will be capped at the maximum. Note: Caps only apply when resources are already specified
134+
// on a container. For containers without resource specifications, use DefaultContainerResources
135+
// instead. These resource caps do not apply to initContainers or the projectClone container.
136+
// +optional
137+
ContainerResourceCaps *corev1.ResourceRequirements `json:"containerResourceCaps,omitempty"`
131138
// Idle timeout for workspaces in seconds.
132139
// This timeout is the duration after which a workspace will be idled if there is no activity.
133140
// To disable workspace idling due to inactivity, set this value to -1.

api/v2/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ metadata:
8686
categories: Developer Tools
8787
certified: "false"
8888
containerImage: quay.io/eclipse/che-operator:next
89-
createdAt: "2025-10-23T08:53:01Z"
89+
createdAt: "2025-12-19T10:48:02Z"
9090
description: A Kube-native development solution that delivers portable and collaborative
9191
developer workspaces.
9292
features.operators.openshift.io/cnf: "false"
@@ -108,7 +108,7 @@ metadata:
108108
operatorframework.io/arch.amd64: supported
109109
operatorframework.io/arch.arm64: supported
110110
operatorframework.io/os.linux: supported
111-
name: eclipse-che.v7.111.0-948.next
111+
name: eclipse-che.v7.113.0-949.next
112112
namespace: placeholder
113113
spec:
114114
apiservicedefinitions: {}
@@ -1141,7 +1141,7 @@ spec:
11411141
name: gateway-authorization-sidecar-k8s
11421142
- image: quay.io/che-incubator/header-rewrite-proxy:latest
11431143
name: gateway-header-sidecar
1144-
version: 7.111.0-948.next
1144+
version: 7.113.0-949.next
11451145
webhookdefinitions:
11461146
- admissionReviewVersions:
11471147
- v1

bundle/next/eclipse-che/manifests/org.eclipse.che_checlusters.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5902,6 +5902,70 @@ spec:
59025902
required:
59035903
- openShiftSecurityContextConstraint
59045904
type: object
5905+
containerResourceCaps:
5906+
description: |-
5907+
ContainerResourceCaps defines the maximum resource requirements enforced for workspace
5908+
containers. If a container specifies limits or requests that exceed these values, they
5909+
will be capped at the maximum. Note: Caps only apply when resources are already specified
5910+
on a container. For containers without resource specifications, use DefaultContainerResources
5911+
instead. These resource caps do not apply to initContainers or the projectClone container.
5912+
properties:
5913+
claims:
5914+
description: |-
5915+
Claims lists the names of resources, defined in spec.resourceClaims,
5916+
that are used by this container.
5917+
5918+
This field depends on the
5919+
DynamicResourceAllocation feature gate.
5920+
5921+
This field is immutable. It can only be set for containers.
5922+
items:
5923+
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
5924+
properties:
5925+
name:
5926+
description: |-
5927+
Name must match the name of one entry in pod.spec.resourceClaims of
5928+
the Pod where this field is used. It makes that resource available
5929+
inside a container.
5930+
type: string
5931+
request:
5932+
description: |-
5933+
Request is the name chosen for a request in the referenced claim.
5934+
If empty, everything from the claim is made available, otherwise
5935+
only the result of this request.
5936+
type: string
5937+
required:
5938+
- name
5939+
type: object
5940+
type: array
5941+
x-kubernetes-list-map-keys:
5942+
- name
5943+
x-kubernetes-list-type: map
5944+
limits:
5945+
additionalProperties:
5946+
anyOf:
5947+
- type: integer
5948+
- type: string
5949+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
5950+
x-kubernetes-int-or-string: true
5951+
description: |-
5952+
Limits describes the maximum amount of compute resources allowed.
5953+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
5954+
type: object
5955+
requests:
5956+
additionalProperties:
5957+
anyOf:
5958+
- type: integer
5959+
- type: string
5960+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
5961+
x-kubernetes-int-or-string: true
5962+
description: |-
5963+
Requests describes the minimum amount of compute resources required.
5964+
If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
5965+
otherwise to an implementation-defined value. Requests cannot exceed Limits.
5966+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
5967+
type: object
5968+
type: object
59055969
containerRunConfiguration:
59065970
description: Container run configuration.
59075971
properties:

config/crd/bases/org.eclipse.che_checlusters.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5860,6 +5860,70 @@ spec:
58605860
required:
58615861
- openShiftSecurityContextConstraint
58625862
type: object
5863+
containerResourceCaps:
5864+
description: |-
5865+
ContainerResourceCaps defines the maximum resource requirements enforced for workspace
5866+
containers. If a container specifies limits or requests that exceed these values, they
5867+
will be capped at the maximum. Note: Caps only apply when resources are already specified
5868+
on a container. For containers without resource specifications, use DefaultContainerResources
5869+
instead. These resource caps do not apply to initContainers or the projectClone container.
5870+
properties:
5871+
claims:
5872+
description: |-
5873+
Claims lists the names of resources, defined in spec.resourceClaims,
5874+
that are used by this container.
5875+
5876+
This field depends on the
5877+
DynamicResourceAllocation feature gate.
5878+
5879+
This field is immutable. It can only be set for containers.
5880+
items:
5881+
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
5882+
properties:
5883+
name:
5884+
description: |-
5885+
Name must match the name of one entry in pod.spec.resourceClaims of
5886+
the Pod where this field is used. It makes that resource available
5887+
inside a container.
5888+
type: string
5889+
request:
5890+
description: |-
5891+
Request is the name chosen for a request in the referenced claim.
5892+
If empty, everything from the claim is made available, otherwise
5893+
only the result of this request.
5894+
type: string
5895+
required:
5896+
- name
5897+
type: object
5898+
type: array
5899+
x-kubernetes-list-map-keys:
5900+
- name
5901+
x-kubernetes-list-type: map
5902+
limits:
5903+
additionalProperties:
5904+
anyOf:
5905+
- type: integer
5906+
- type: string
5907+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
5908+
x-kubernetes-int-or-string: true
5909+
description: |-
5910+
Limits describes the maximum amount of compute resources allowed.
5911+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
5912+
type: object
5913+
requests:
5914+
additionalProperties:
5915+
anyOf:
5916+
- type: integer
5917+
- type: string
5918+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
5919+
x-kubernetes-int-or-string: true
5920+
description: |-
5921+
Requests describes the minimum amount of compute resources required.
5922+
If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
5923+
otherwise to an implementation-defined value. Requests cannot exceed Limits.
5924+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
5925+
type: object
5926+
type: object
58635927
containerRunConfiguration:
58645928
description: Container run configuration.
58655929
properties:

deploy/deployment/kubernetes/combined.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5881,6 +5881,70 @@ spec:
58815881
required:
58825882
- openShiftSecurityContextConstraint
58835883
type: object
5884+
containerResourceCaps:
5885+
description: |-
5886+
ContainerResourceCaps defines the maximum resource requirements enforced for workspace
5887+
containers. If a container specifies limits or requests that exceed these values, they
5888+
will be capped at the maximum. Note: Caps only apply when resources are already specified
5889+
on a container. For containers without resource specifications, use DefaultContainerResources
5890+
instead. These resource caps do not apply to initContainers or the projectClone container.
5891+
properties:
5892+
claims:
5893+
description: |-
5894+
Claims lists the names of resources, defined in spec.resourceClaims,
5895+
that are used by this container.
5896+
5897+
This field depends on the
5898+
DynamicResourceAllocation feature gate.
5899+
5900+
This field is immutable. It can only be set for containers.
5901+
items:
5902+
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
5903+
properties:
5904+
name:
5905+
description: |-
5906+
Name must match the name of one entry in pod.spec.resourceClaims of
5907+
the Pod where this field is used. It makes that resource available
5908+
inside a container.
5909+
type: string
5910+
request:
5911+
description: |-
5912+
Request is the name chosen for a request in the referenced claim.
5913+
If empty, everything from the claim is made available, otherwise
5914+
only the result of this request.
5915+
type: string
5916+
required:
5917+
- name
5918+
type: object
5919+
type: array
5920+
x-kubernetes-list-map-keys:
5921+
- name
5922+
x-kubernetes-list-type: map
5923+
limits:
5924+
additionalProperties:
5925+
anyOf:
5926+
- type: integer
5927+
- type: string
5928+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
5929+
x-kubernetes-int-or-string: true
5930+
description: |-
5931+
Limits describes the maximum amount of compute resources allowed.
5932+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
5933+
type: object
5934+
requests:
5935+
additionalProperties:
5936+
anyOf:
5937+
- type: integer
5938+
- type: string
5939+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
5940+
x-kubernetes-int-or-string: true
5941+
description: |-
5942+
Requests describes the minimum amount of compute resources required.
5943+
If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
5944+
otherwise to an implementation-defined value. Requests cannot exceed Limits.
5945+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
5946+
type: object
5947+
type: object
58845948
containerRunConfiguration:
58855949
description: Container run configuration.
58865950
properties:

deploy/deployment/kubernetes/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5876,6 +5876,70 @@ spec:
58765876
required:
58775877
- openShiftSecurityContextConstraint
58785878
type: object
5879+
containerResourceCaps:
5880+
description: |-
5881+
ContainerResourceCaps defines the maximum resource requirements enforced for workspace
5882+
containers. If a container specifies limits or requests that exceed these values, they
5883+
will be capped at the maximum. Note: Caps only apply when resources are already specified
5884+
on a container. For containers without resource specifications, use DefaultContainerResources
5885+
instead. These resource caps do not apply to initContainers or the projectClone container.
5886+
properties:
5887+
claims:
5888+
description: |-
5889+
Claims lists the names of resources, defined in spec.resourceClaims,
5890+
that are used by this container.
5891+
5892+
This field depends on the
5893+
DynamicResourceAllocation feature gate.
5894+
5895+
This field is immutable. It can only be set for containers.
5896+
items:
5897+
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
5898+
properties:
5899+
name:
5900+
description: |-
5901+
Name must match the name of one entry in pod.spec.resourceClaims of
5902+
the Pod where this field is used. It makes that resource available
5903+
inside a container.
5904+
type: string
5905+
request:
5906+
description: |-
5907+
Request is the name chosen for a request in the referenced claim.
5908+
If empty, everything from the claim is made available, otherwise
5909+
only the result of this request.
5910+
type: string
5911+
required:
5912+
- name
5913+
type: object
5914+
type: array
5915+
x-kubernetes-list-map-keys:
5916+
- name
5917+
x-kubernetes-list-type: map
5918+
limits:
5919+
additionalProperties:
5920+
anyOf:
5921+
- type: integer
5922+
- type: string
5923+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
5924+
x-kubernetes-int-or-string: true
5925+
description: |-
5926+
Limits describes the maximum amount of compute resources allowed.
5927+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
5928+
type: object
5929+
requests:
5930+
additionalProperties:
5931+
anyOf:
5932+
- type: integer
5933+
- type: string
5934+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
5935+
x-kubernetes-int-or-string: true
5936+
description: |-
5937+
Requests describes the minimum amount of compute resources required.
5938+
If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
5939+
otherwise to an implementation-defined value. Requests cannot exceed Limits.
5940+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
5941+
type: object
5942+
type: object
58795943
containerRunConfiguration:
58805944
description: Container run configuration.
58815945
properties:

0 commit comments

Comments
 (0)