From d5e74996ea1628e6a014d39ba218d1c2b263b6d1 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Fri, 20 Sep 2024 13:30:05 +0200 Subject: [PATCH] feat: Add option to deploy che component on specific nodes (#1902) * feat: Add option to deploy che component on specific nodes Signed-off-by: Anatolii Bazko --- api/v2/checluster_types.go | 6 + api/v2/zz_generated.deepcopy.go | 14 ++ .../che-operator.clusterserviceversion.yaml | 4 +- .../org.eclipse.che_checlusters.yaml | 230 ++++++++++++++++++ .../bases/org.eclipse.che_checlusters.yaml | 230 ++++++++++++++++++ deploy/deployment/kubernetes/combined.yaml | 230 ++++++++++++++++++ ....eclipse.che.CustomResourceDefinition.yaml | 230 ++++++++++++++++++ deploy/deployment/openshift/combined.yaml | 230 ++++++++++++++++++ ....eclipse.che.CustomResourceDefinition.yaml | 230 ++++++++++++++++++ ....eclipse.che.CustomResourceDefinition.yaml | 230 ++++++++++++++++++ pkg/deploy/deployment.go | 16 ++ pkg/deploy/deployment_test.go | 72 ++++++ 12 files changed, 1720 insertions(+), 2 deletions(-) diff --git a/api/v2/checluster_types.go b/api/v2/checluster_types.go index 027700166c..7c2ffd3b92 100644 --- a/api/v2/checluster_types.go +++ b/api/v2/checluster_types.go @@ -674,6 +674,12 @@ type Deployment struct { // Security options the pod should run with. // +optional SecurityContext *PodSecurityContext `json:"securityContext,omitempty"` + // The node selector limits the nodes that can run the pod. + // +optional + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + // The pod tolerations of the component pod limit where the pod can run. + // +optional + Tolerations []corev1.Toleration `json:"tolerations,omitempty"` } // Container custom settings. diff --git a/api/v2/zz_generated.deepcopy.go b/api/v2/zz_generated.deepcopy.go index 1eb3efc634..b54bd90c3c 100644 --- a/api/v2/zz_generated.deepcopy.go +++ b/api/v2/zz_generated.deepcopy.go @@ -659,6 +659,20 @@ func (in *Deployment) DeepCopyInto(out *Deployment) { *out = new(PodSecurityContext) (*in).DeepCopyInto(*out) } + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Tolerations != nil { + in, out := &in.Tolerations, &out.Tolerations + *out = make([]v1.Toleration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Deployment. diff --git a/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml b/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml index bbba9e6d26..4fe61bf666 100644 --- a/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml +++ b/bundle/next/eclipse-che/manifests/che-operator.clusterserviceversion.yaml @@ -104,7 +104,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/eclipse-che/che-operator support: Eclipse Foundation - name: eclipse-che.v7.92.0-886.next + name: eclipse-che.v7.92.0-887.next namespace: placeholder spec: apiservicedefinitions: {} @@ -1035,7 +1035,7 @@ spec: minKubeVersion: 1.19.0 provider: name: Eclipse Foundation - version: 7.92.0-886.next + version: 7.92.0-887.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 3aa7805e89..a1d052f8bc 100644 --- a/bundle/next/eclipse-che/manifests/org.eclipse.che_checlusters.yaml +++ b/bundle/next/eclipse-che/manifests/org.eclipse.che_checlusters.yaml @@ -4288,6 +4288,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that + can run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4303,6 +4309,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object extraProperties: additionalProperties: @@ -4575,6 +4621,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that + can run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4590,6 +4642,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object headerMessage: description: Dashboard header message. @@ -4830,6 +4922,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that + can run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4845,6 +4943,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object disableInternalRegistry: description: Disables internal devfile registry. @@ -5125,6 +5263,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that + can run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -5140,6 +5284,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object disableInternalRegistry: description: Disables internal plug-in registry. @@ -8226,6 +8410,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes + that can run the pod. + type: object securityContext: description: Security options the pod should run with. @@ -8243,6 +8433,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component + pod limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object kubeRbacProxy: description: Configuration for kube-rbac-proxy within diff --git a/config/crd/bases/org.eclipse.che_checlusters.yaml b/config/crd/bases/org.eclipse.che_checlusters.yaml index 8fac423ca8..4e1d8254e3 100644 --- a/config/crd/bases/org.eclipse.che_checlusters.yaml +++ b/config/crd/bases/org.eclipse.che_checlusters.yaml @@ -4252,6 +4252,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4267,6 +4273,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object extraProperties: additionalProperties: @@ -4537,6 +4583,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4552,6 +4604,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object headerMessage: description: Dashboard header message. @@ -4790,6 +4882,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4805,6 +4903,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object disableInternalRegistry: description: Disables internal devfile registry. @@ -5083,6 +5221,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -5098,6 +5242,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object disableInternalRegistry: description: Disables internal plug-in registry. @@ -8174,6 +8358,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that + can run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -8190,6 +8380,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component + pod limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object kubeRbacProxy: description: Configuration for kube-rbac-proxy within diff --git a/deploy/deployment/kubernetes/combined.yaml b/deploy/deployment/kubernetes/combined.yaml index ca83b58f02..98576ccd0c 100644 --- a/deploy/deployment/kubernetes/combined.yaml +++ b/deploy/deployment/kubernetes/combined.yaml @@ -4273,6 +4273,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4288,6 +4294,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object extraProperties: additionalProperties: @@ -4558,6 +4604,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4573,6 +4625,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object headerMessage: description: Dashboard header message. @@ -4811,6 +4903,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4826,6 +4924,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object disableInternalRegistry: description: Disables internal devfile registry. @@ -5104,6 +5242,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -5119,6 +5263,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object disableInternalRegistry: description: Disables internal plug-in registry. @@ -8195,6 +8379,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that + can run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -8211,6 +8401,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component + pod limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object kubeRbacProxy: description: Configuration for kube-rbac-proxy within 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 a6ef8ccf8b..da4f87f940 100644 --- a/deploy/deployment/kubernetes/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml +++ b/deploy/deployment/kubernetes/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml @@ -4268,6 +4268,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4283,6 +4289,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object extraProperties: additionalProperties: @@ -4553,6 +4599,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4568,6 +4620,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object headerMessage: description: Dashboard header message. @@ -4806,6 +4898,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4821,6 +4919,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object disableInternalRegistry: description: Disables internal devfile registry. @@ -5099,6 +5237,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -5114,6 +5258,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object disableInternalRegistry: description: Disables internal plug-in registry. @@ -8190,6 +8374,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that + can run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -8206,6 +8396,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component + pod limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object kubeRbacProxy: description: Configuration for kube-rbac-proxy within diff --git a/deploy/deployment/openshift/combined.yaml b/deploy/deployment/openshift/combined.yaml index 5d092117ea..f00ff5d742 100644 --- a/deploy/deployment/openshift/combined.yaml +++ b/deploy/deployment/openshift/combined.yaml @@ -4273,6 +4273,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4288,6 +4294,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object extraProperties: additionalProperties: @@ -4558,6 +4604,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4573,6 +4625,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object headerMessage: description: Dashboard header message. @@ -4811,6 +4903,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4826,6 +4924,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object disableInternalRegistry: description: Disables internal devfile registry. @@ -5104,6 +5242,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -5119,6 +5263,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object disableInternalRegistry: description: Disables internal plug-in registry. @@ -8195,6 +8379,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that + can run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -8211,6 +8401,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component + pod limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object kubeRbacProxy: description: Configuration for kube-rbac-proxy within 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 9fe2d88d28..1265a520d6 100644 --- a/deploy/deployment/openshift/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml +++ b/deploy/deployment/openshift/objects/checlusters.org.eclipse.che.CustomResourceDefinition.yaml @@ -4268,6 +4268,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4283,6 +4289,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object extraProperties: additionalProperties: @@ -4553,6 +4599,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4568,6 +4620,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object headerMessage: description: Dashboard header message. @@ -4806,6 +4898,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4821,6 +4919,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object disableInternalRegistry: description: Disables internal devfile registry. @@ -5099,6 +5237,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -5114,6 +5258,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object disableInternalRegistry: description: Disables internal plug-in registry. @@ -8190,6 +8374,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that + can run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -8206,6 +8396,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component + pod limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object kubeRbacProxy: description: Configuration for kube-rbac-proxy within diff --git a/helmcharts/next/crds/checlusters.org.eclipse.che.CustomResourceDefinition.yaml b/helmcharts/next/crds/checlusters.org.eclipse.che.CustomResourceDefinition.yaml index a6ef8ccf8b..da4f87f940 100644 --- a/helmcharts/next/crds/checlusters.org.eclipse.che.CustomResourceDefinition.yaml +++ b/helmcharts/next/crds/checlusters.org.eclipse.che.CustomResourceDefinition.yaml @@ -4268,6 +4268,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4283,6 +4289,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object extraProperties: additionalProperties: @@ -4553,6 +4599,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4568,6 +4620,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object headerMessage: description: Dashboard header message. @@ -4806,6 +4898,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -4821,6 +4919,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object disableInternalRegistry: description: Disables internal devfile registry. @@ -5099,6 +5237,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that can + run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -5114,6 +5258,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component pod + limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object disableInternalRegistry: description: Disables internal plug-in registry. @@ -8190,6 +8374,12 @@ spec: type: object type: object type: array + nodeSelector: + additionalProperties: + type: string + description: The node selector limits the nodes that + can run the pod. + type: object securityContext: description: Security options the pod should run with. properties: @@ -8206,6 +8396,46 @@ spec: format: int64 type: integer type: object + tolerations: + description: The pod tolerations of the component + pod limit where the pod can run. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array type: object kubeRbacProxy: description: Configuration for kube-rbac-proxy within diff --git a/pkg/deploy/deployment.go b/pkg/deploy/deployment.go index 6f175005cd..d9492a98f4 100644 --- a/pkg/deploy/deployment.go +++ b/pkg/deploy/deployment.go @@ -132,6 +132,22 @@ func OverrideDeployment( } } + if overrideDeploymentSettings != nil { + if len(overrideDeploymentSettings.NodeSelector) > 0 { + deployment.Spec.Template.Spec.NodeSelector = make(map[string]string, len(overrideDeploymentSettings.NodeSelector)) + for i, s := range overrideDeploymentSettings.NodeSelector { + deployment.Spec.Template.Spec.NodeSelector[i] = s + } + } + + if len(overrideDeploymentSettings.Tolerations) > 0 { + deployment.Spec.Template.Spec.Tolerations = make([]corev1.Toleration, len(overrideDeploymentSettings.Tolerations)) + for i, t := range overrideDeploymentSettings.Tolerations { + deployment.Spec.Template.Spec.Tolerations[i] = t + } + } + } + if !infrastructure.IsOpenShift() { if overrideDeploymentSettings != nil { if overrideDeploymentSettings.SecurityContext != nil { diff --git a/pkg/deploy/deployment_test.go b/pkg/deploy/deployment_test.go index 95e8f6c013..90c06e1bb8 100644 --- a/pkg/deploy/deployment_test.go +++ b/pkg/deploy/deployment_test.go @@ -1189,3 +1189,75 @@ func TestOverrideContainerCpuLimit(t *testing.T) { }) } } + +func TestOverrideNodeSelector(t *testing.T) { + ctx := test.GetDeployContext(nil, []runtime.Object{}) + deployment := &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "eclipse-che", + }, + Spec: appsv1.DeploymentSpec{ + Template: corev1.PodTemplateSpec{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "test", + }, + }, + }, + }, + }, + } + overrideDeployment := &chev2.Deployment{ + NodeSelector: map[string]string{ + "a": "b", + "c": "d", + }, + } + + err := OverrideDeployment(ctx, deployment, overrideDeployment) + assert.NoError(t, err) + assert.Equal(t, overrideDeployment.NodeSelector, deployment.Spec.Template.Spec.NodeSelector) +} + +func TestOverrideTolerations(t *testing.T) { + ctx := test.GetDeployContext(nil, []runtime.Object{}) + deployment := &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "eclipse-che", + }, + Spec: appsv1.DeploymentSpec{ + Template: corev1.PodTemplateSpec{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "test", + }, + }, + }, + }, + }, + } + overrideDeployment := &chev2.Deployment{ + Tolerations: []corev1.Toleration{ + { + Key: "a", + Operator: corev1.TolerationOpEqual, + Value: "b", + Effect: corev1.TaintEffectNoSchedule, + }, + { + Key: "b", + Operator: corev1.TolerationOpExists, + Value: "c", + Effect: corev1.TaintEffectNoExecute, + }, + }, + } + + err := OverrideDeployment(ctx, deployment, overrideDeployment) + assert.NoError(t, err) + assert.Equal(t, overrideDeployment.Tolerations, deployment.Spec.Template.Spec.Tolerations) +}