Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1799,21 +1799,6 @@ tests:
- name: "memory"
request: "50Mi"
limit: "200Mi"
- name: Should be able to create NodeExporterConfig with valid tolerations
initial: |
apiVersion: config.openshift.io/v1alpha1
kind: ClusterMonitoring
spec:
nodeExporterConfig:
tolerations:
- operator: "Exists"
expected: |
apiVersion: config.openshift.io/v1alpha1
kind: ClusterMonitoring
spec:
nodeExporterConfig:
tolerations:
- operator: "Exists"
- name: Should be able to create NodeExporterConfig with collectors
initial: |
apiVersion: config.openshift.io/v1alpha1
Expand Down Expand Up @@ -1869,14 +1854,10 @@ tests:
kind: ClusterMonitoring
spec:
nodeExporterConfig:
nodeSelector:
kubernetes.io/os: linux
resources:
- name: "cpu"
request: "50m"
limit: "200m"
tolerations:
- operator: "Exists"
collectors:
cpuFreq:
collectionPolicy: Collect
Expand All @@ -1891,14 +1872,10 @@ tests:
kind: ClusterMonitoring
spec:
nodeExporterConfig:
nodeSelector:
kubernetes.io/os: linux
resources:
- name: "cpu"
request: "50m"
limit: "200m"
tolerations:
- operator: "Exists"
collectors:
cpuFreq:
collectionPolicy: Collect
Expand Down Expand Up @@ -2062,71 +2039,6 @@ tests:
collectors:
systemd:
collectionPolicy: DoNotCollect
- name: Should reject NodeExporterConfig with empty nodeSelector
initial: |
apiVersion: config.openshift.io/v1alpha1
kind: ClusterMonitoring
spec:
nodeExporterConfig:
nodeSelector: {}
expectedError: 'spec.nodeExporterConfig.nodeSelector: Invalid value: 0: spec.nodeExporterConfig.nodeSelector in body should have at least 1 properties'
- name: Should reject NodeExporterConfig with too many nodeSelector entries
initial: |
apiVersion: config.openshift.io/v1alpha1
kind: ClusterMonitoring
spec:
nodeExporterConfig:
nodeSelector:
key1: val1
key2: val2
key3: val3
key4: val4
key5: val5
key6: val6
key7: val7
key8: val8
key9: val9
key10: val10
key11: val11
expectedError: 'spec.nodeExporterConfig.nodeSelector: Too many: 11: must have at most 10 items'
- name: Should reject NodeExporterConfig with empty tolerations array
initial: |
apiVersion: config.openshift.io/v1alpha1
kind: ClusterMonitoring
spec:
nodeExporterConfig:
tolerations: []
expectedError: 'spec.nodeExporterConfig.tolerations: Invalid value: 0: spec.nodeExporterConfig.tolerations in body should have at least 1 items'
- name: Should reject NodeExporterConfig with too many tolerations
initial: |
apiVersion: config.openshift.io/v1alpha1
kind: ClusterMonitoring
spec:
nodeExporterConfig:
tolerations:
- key: "key1"
operator: "Exists"
- key: "key2"
operator: "Exists"
- key: "key3"
operator: "Exists"
- key: "key4"
operator: "Exists"
- key: "key5"
operator: "Exists"
- key: "key6"
operator: "Exists"
- key: "key7"
operator: "Exists"
- key: "key8"
operator: "Exists"
- key: "key9"
operator: "Exists"
- key: "key10"
operator: "Exists"
- key: "key11"
operator: "Exists"
expectedError: 'spec.nodeExporterConfig.tolerations: Too many: 11: must have at most 10 items'
- name: Should reject systemd collect with empty object
initial: |
apiVersion: config.openshift.io/v1alpha1
Expand Down
25 changes: 0 additions & 25 deletions config/v1alpha1/types_cluster_monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,6 @@ type OpenShiftStateMetricsConfig struct {
// At least one field must be specified.
// +kubebuilder:validation:MinProperties=1
type NodeExporterConfig struct {
// nodeSelector defines the nodes on which the Pods are scheduled.
// nodeSelector is optional.
//
// When omitted, this means the user has no opinion and the platform is left
// to choose reasonable defaults. These defaults are subject to change over time.
// The current default value is `kubernetes.io/os: linux`.
// When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries.
// +optional
// +kubebuilder:validation:MinProperties=1
// +kubebuilder:validation:MaxProperties=10
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// resources defines the compute resource requests and limits for the node-exporter container.
// This includes CPU, memory and HugePages constraints to help control scheduling and resource usage.
// When not specified, defaults are used by the platform. Requests cannot exceed limits.
Expand All @@ -276,20 +265,6 @@ type NodeExporterConfig struct {
// +kubebuilder:validation:MaxItems=5
// +kubebuilder:validation:MinItems=1
Resources []ContainerResource `json:"resources,omitempty"`
// tolerations defines tolerations for the pods.
// tolerations is optional.
//
// When omitted, this means the user has no opinion and the platform is left
// to choose reasonable defaults. These defaults are subject to change over time.
// The current default is to tolerate all taints (operator: Exists without any key),
// which is typical for DaemonSets that must run on every node.
// Maximum length for this list is 10.
// Minimum length for this list is 1.
// +kubebuilder:validation:MaxItems=10
// +kubebuilder:validation:MinItems=1
// +listType=atomic
// +optional
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
// collectors configures which node-exporter metric collectors are enabled.
// collectors is optional.
// Each collector can be individually enabled or disabled. Some collectors may have
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2018,20 +2018,6 @@ spec:
maximum: 1024
minimum: 1
type: integer
nodeSelector:
additionalProperties:
type: string
description: |-
nodeSelector defines the nodes on which the Pods are scheduled.
nodeSelector is optional.

When omitted, this means the user has no opinion and the platform is left
to choose reasonable defaults. These defaults are subject to change over time.
The current default value is `kubernetes.io/os: linux`.
When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries.
maxProperties: 10
minProperties: 1
type: object
resources:
description: |-
resources defines the compute resource requests and limits for the node-exporter container.
Expand Down Expand Up @@ -2112,58 +2098,6 @@ spec:
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
tolerations:
description: |-
tolerations defines tolerations for the pods.
tolerations is optional.

When omitted, this means the user has no opinion and the platform is left
to choose reasonable defaults. These defaults are subject to change over time.
The current default is to tolerate all taints (operator: Exists without any key),
which is typical for DaemonSets that must run on every node.
Maximum length for this list is 10.
Minimum length for this list is 1.
items:
description: |-
The pod this Toleration is attached to tolerates any taint that matches
the triple <key,value,effect> using the matching operator <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, Equal, Lt, and Gt. Defaults to Equal.
Exists is equivalent to wildcard for value, so that a pod can
tolerate all taints of a particular category.
Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators).
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
maxItems: 10
minItems: 1
type: array
x-kubernetes-list-type: atomic
type: object
openShiftStateMetricsConfig:
description: |-
Expand Down
14 changes: 0 additions & 14 deletions config/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2018,20 +2018,6 @@ spec:
maximum: 1024
minimum: 1
type: integer
nodeSelector:
additionalProperties:
type: string
description: |-
nodeSelector defines the nodes on which the Pods are scheduled.
nodeSelector is optional.

When omitted, this means the user has no opinion and the platform is left
to choose reasonable defaults. These defaults are subject to change over time.
The current default value is `kubernetes.io/os: linux`.
When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries.
maxProperties: 10
minProperties: 1
type: object
resources:
description: |-
resources defines the compute resource requests and limits for the node-exporter container.
Expand Down Expand Up @@ -2112,58 +2098,6 @@ spec:
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
tolerations:
description: |-
tolerations defines tolerations for the pods.
tolerations is optional.

When omitted, this means the user has no opinion and the platform is left
to choose reasonable defaults. These defaults are subject to change over time.
The current default is to tolerate all taints (operator: Exists without any key),
which is typical for DaemonSets that must run on every node.
Maximum length for this list is 10.
Minimum length for this list is 1.
items:
description: |-
The pod this Toleration is attached to tolerates any taint that matches
the triple <key,value,effect> using the matching operator <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, Equal, Lt, and Gt. Defaults to Equal.
Exists is equivalent to wildcard for value, so that a pod can
tolerate all taints of a particular category.
Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators).
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
maxItems: 10
minItems: 1
type: array
x-kubernetes-list-type: atomic
type: object
openShiftStateMetricsConfig:
description: |-
Expand Down
Loading