diff --git a/config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml b/config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml index cb563ee680f..0c571dc8e54 100644 --- a/config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml +++ b/config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml @@ -577,3 +577,213 @@ tests: prometheusOperatorAdmissionWebhookConfig: resources: [] expectedError: 'spec.prometheusOperatorAdmissionWebhookConfig.resources: Invalid value: 0: spec.prometheusOperatorAdmissionWebhookConfig.resources in body should have at least 1 items' + - name: Should be able to create NodeExporterConfig with valid resources + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + resources: + - name: "cpu" + request: "50m" + limit: "200m" + - name: "memory" + request: "50Mi" + limit: "200Mi" + expected: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + resources: + - name: "cpu" + request: "50m" + limit: "200m" + - 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 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + collectors: + cpuFreq: + enabled: Enabled + tcpStat: + enabled: Disabled + netDev: + enabled: Enabled + netClass: + enabled: Enabled + useNetlink: Enabled + systemd: + enabled: Enabled + units: + - "kubelet.service" + - "crio.service" + expected: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + collectors: + cpuFreq: + enabled: Enabled + tcpStat: + enabled: Disabled + netDev: + enabled: Enabled + netClass: + enabled: Enabled + useNetlink: Enabled + systemd: + enabled: Enabled + units: + - "kubelet.service" + - "crio.service" + - name: Should be able to create NodeExporterConfig with all fields + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + nodeSelector: + kubernetes.io/os: linux + resources: + - name: "cpu" + request: "50m" + limit: "200m" + tolerations: + - operator: "Exists" + collectors: + cpuFreq: + enabled: Enabled + buddyInfo: + enabled: Disabled + maxProcs: 4 + ignoredNetworkDevices: + - "^veth.*$" + - "^docker.*$" + expected: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + nodeSelector: + kubernetes.io/os: linux + resources: + - name: "cpu" + request: "50m" + limit: "200m" + tolerations: + - operator: "Exists" + collectors: + cpuFreq: + enabled: Enabled + buddyInfo: + enabled: Disabled + maxProcs: 4 + ignoredNetworkDevices: + - "^veth.*$" + - "^docker.*$" + - name: Should reject NodeExporterConfig with empty object + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: {} + expectedError: 'spec.nodeExporterConfig: Invalid value: 0: spec.nodeExporterConfig in body should have at least 1 properties' + - name: Should reject NodeExporterConfig with too many resources + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + resources: + - name: "cpu" + request: "100m" + - name: "memory" + request: "64Mi" + - name: "hugepages-2Mi" + request: "32Mi" + - name: "hugepages-1Gi" + request: "1Gi" + - name: "ephemeral-storage" + request: "1Gi" + - name: "nvidia.com/gpu" + request: "1" + - name: "example.com/foo" + request: "1" + - name: "example.com/bar" + request: "1" + - name: "example.com/baz" + request: "1" + - name: "example.com/qux" + request: "1" + - name: "example.com/quux" + request: "1" + expectedError: 'spec.nodeExporterConfig.resources: Too many: 11: must have at most 10 items' + - name: Should reject NodeExporterConfig with duplicate resource names + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + resources: + - name: "cpu" + request: "100m" + - name: "cpu" + request: "200m" + expectedError: 'spec.nodeExporterConfig.resources[1]: Duplicate value: map[string]interface {}{"name":"cpu"}' + - name: Should reject NodeExporterConfig with limit less than request + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + resources: + - name: "cpu" + request: "500m" + limit: "200m" + expectedError: 'spec.nodeExporterConfig.resources[0]: Invalid value: "object": limit must be greater than or equal to request' + - name: Should reject NodeExporterConfig with empty resources array + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + resources: [] + expectedError: 'spec.nodeExporterConfig.resources: Invalid value: 0: spec.nodeExporterConfig.resources in body should have at least 1 items' + - name: Should reject NodeExporterConfig with empty collectors object + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + collectors: {} + expectedError: 'spec.nodeExporterConfig.collectors: Invalid value: 0: spec.nodeExporterConfig.collectors in body should have at least 1 properties' + - name: Should reject NodeExporterConfig with maxProcs set to 0 + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + maxProcs: 0 + expectedError: 'spec.nodeExporterConfig.maxProcs' diff --git a/config/v1alpha1/types_cluster_monitoring.go b/config/v1alpha1/types_cluster_monitoring.go index e72f537f99f..12a14b5761e 100644 --- a/config/v1alpha1/types_cluster_monitoring.go +++ b/config/v1alpha1/types_cluster_monitoring.go @@ -107,6 +107,12 @@ type ClusterMonitoringSpec struct { // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. // +optional PrometheusOperatorAdmissionWebhookConfig PrometheusOperatorAdmissionWebhookConfig `json:"prometheusOperatorAdmissionWebhookConfig,omitempty,omitzero"` + // nodeExporterConfig is an optional field that can be used to configure the node-exporter agent + // that runs as a DaemonSet in the openshift-monitoring namespace. The node-exporter agent collects + // hardware and OS-level metrics from every node in the cluster. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + // +optional + NodeExporterConfig NodeExporterConfig `json:"nodeExporterConfig,omitempty,omitzero"` } // UserDefinedMonitoring config for user-defined projects. @@ -566,6 +572,384 @@ type PrometheusOperatorAdmissionWebhookConfig struct { TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` } +// NodeExporterConfig provides configuration options for the node-exporter agent +// that runs as a DaemonSet in the `openshift-monitoring` namespace. The node-exporter agent collects +// hardware and OS-level metrics from every node in the cluster, including CPU, memory, disk, and +// network statistics. +// +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. + // This field is optional. + // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + // This is a simplified API that maps to Kubernetes ResourceRequirements. + // The current default values are: + // resources: + // - name: cpu + // request: 8m + // limit: null + // - name: memory + // request: 32Mi + // limit: null + // Maximum length for this list is 10. + // Minimum length for this list is 1. + // Each resource name must be unique within this list. + // +optional + // +listType=map + // +listMapKey=name + // +kubebuilder:validation:MaxItems=10 + // +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 + // additional configuration options. + // + // When omitted, this means no opinion and the platform is left to choose a reasonable + // default, which is subject to change over time. + // +optional + Collectors NodeExporterCollectorConfig `json:"collectors,omitempty,omitzero"` + // maxProcs sets the target number of CPUs on which the node-exporter process will run. + // maxProcs is optional. + // Use this setting to override the default value, which is set either to 4 or to the number + // of CPUs on the host, whichever is smaller. + // The default value is computed at runtime and set via the GOMAXPROCS environment variable before + // node-exporter is launched. + // If a kernel deadlock occurs or if performance degrades when reading from sysfs concurrently, + // you can change this value to 1, which limits node-exporter to running on one CPU. + // For nodes with a high CPU count, setting the limit to a low number saves resources by preventing + // Go routines from being scheduled to run on all CPUs. However, I/O performance degrades if the + // maxProcs value is set too low and there are many metrics to collect. + // The minimum value is 1. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, + // which is subject to change over time. The current default is min(4, number of host CPUs). + // +optional + // +kubebuilder:validation:Minimum=1 + MaxProcs int32 `json:"maxProcs,omitempty"` + // ignoredNetworkDevices is a list of regular expression patterns that match network devices + // to be excluded from the relevant collector configuration such as netdev, netclass, and ethtool. + // ignoredNetworkDevices is optional. + // + // When omitted, the Cluster Monitoring Operator uses a predefined list of devices to be excluded + // to minimize the impact on memory usage. + // When set as an empty list, no devices are excluded. + // If you modify this setting, monitor the prometheus-k8s deployment closely for excessive memory usage. + // Maximum length for this list is 50. + // Minimum length for this list is 1. + // Each entry must be at most 1024 characters long. + // +kubebuilder:validation:MaxItems=50 + // +kubebuilder:validation:MinItems=1 + // +listType=set + // +optional + IgnoredNetworkDevices []NodeExporterIgnoredNetworkDevice `json:"ignoredNetworkDevices,omitempty"` +} + +// NodeExporterIgnoredNetworkDevice is a regular expression pattern that matches a network device name +// to be excluded from node-exporter metric collection for collectors such as netdev, netclass, and ethtool. +// Must be a valid regular expression and at most 1024 characters. +// +kubebuilder:validation:MinLength=1 +// +kubebuilder:validation:MaxLength=1024 +type NodeExporterIgnoredNetworkDevice string + +// NodeExporterCollectorState defines whether a node-exporter collector is enabled or disabled. +// Valid values are "Enabled" and "Disabled". +// +kubebuilder:validation:Enum=Enabled;Disabled +type NodeExporterCollectorState string + +const ( + // NodeExporterCollectorEnabled means the collector is active and will produce metrics. + NodeExporterCollectorEnabled NodeExporterCollectorState = "Enabled" + // NodeExporterCollectorDisabled means the collector is inactive and will not produce metrics. + NodeExporterCollectorDisabled NodeExporterCollectorState = "Disabled" +) + +// NodeExporterNetlinkState defines whether the netlink implementation of the netclass +// collector is used. Valid values are "Enabled" and "Disabled". +// +kubebuilder:validation:Enum=Enabled;Disabled +type NodeExporterNetlinkState string + +const ( + // NodeExporterNetlinkEnabled activates the netlink implementation. + NodeExporterNetlinkEnabled NodeExporterNetlinkState = "Enabled" + // NodeExporterNetlinkDisabled deactivates the netlink implementation, falling back to the default sysfs implementation. + NodeExporterNetlinkDisabled NodeExporterNetlinkState = "Disabled" +) + +// NodeExporterCollectorConfig defines settings for individual collectors +// of the node-exporter agent. Each collector can be individually enabled or disabled. +// +kubebuilder:validation:MinProperties=1 +type NodeExporterCollectorConfig struct { + // cpuFreq configures the cpufreq collector, which collects CPU frequency statistics. + // cpuFreq is optional. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, + // which is subject to change over time. The current default is disabled. + // Under certain circumstances, enabling the cpufreq collector increases CPU usage on machines + // with many cores. If you enable this collector and have machines with many cores, monitor your + // systems closely for excessive CPU usage. + // +optional + CpuFreq NodeExporterCollectorCpufreqConfig `json:"cpuFreq,omitempty,omitzero"` + // tcpStat configures the tcpstat collector, which collects TCP connection statistics. + // tcpStat is optional. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, + // which is subject to change over time. The current default is disabled. + // +optional + TcpStat NodeExporterCollectorTcpStatConfig `json:"tcpStat,omitempty,omitzero"` + // ethtool configures the ethtool collector, which collects ethernet device statistics. + // ethtool is optional. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, + // which is subject to change over time. The current default is disabled. + // +optional + Ethtool NodeExporterCollectorEthtoolConfig `json:"ethtool,omitempty,omitzero"` + // netDev configures the netdev collector, which collects network device statistics. + // netDev is optional. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, + // which is subject to change over time. The current default is enabled. + // +optional + NetDev NodeExporterCollectorNetDevConfig `json:"netDev,omitempty,omitzero"` + // netClass configures the netclass collector, which collects information about network devices. + // netClass is optional. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, + // which is subject to change over time. The current default is enabled with netlink mode active. + // +optional + NetClass NodeExporterCollectorNetClassConfig `json:"netClass,omitempty,omitzero"` + // buddyInfo configures the buddyinfo collector, which collects statistics about memory + // fragmentation from the node_buddyinfo_blocks metric. This metric collects data from /proc/buddyinfo. + // buddyInfo is optional. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, + // which is subject to change over time. The current default is disabled. + // +optional + BuddyInfo NodeExporterCollectorBuddyInfoConfig `json:"buddyInfo,omitempty,omitzero"` + // mountStats configures the mountstats collector, which collects statistics about NFS volume + // I/O activities. + // mountStats is optional. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, + // which is subject to change over time. The current default is disabled. + // Enabling this collector may produce metrics with high cardinality. If you enable this + // collector, closely monitor the prometheus-k8s deployment for excessive memory usage. + // +optional + MountStats NodeExporterCollectorMountStatsConfig `json:"mountStats,omitempty,omitzero"` + // ksmd configures the ksmd collector, which collects statistics from the kernel same-page + // merger daemon. + // ksmd is optional. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, + // which is subject to change over time. The current default is disabled. + // +optional + Ksmd NodeExporterCollectorKSMDConfig `json:"ksmd,omitempty,omitzero"` + // processes configures the processes collector, which collects statistics from processes and + // threads running in the system. + // processes is optional. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, + // which is subject to change over time. The current default is disabled. + // +optional + Processes NodeExporterCollectorProcessesConfig `json:"processes,omitempty,omitzero"` + // systemd configures the systemd collector, which collects statistics on the systemd daemon + // and its managed services. + // systemd is optional. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, + // which is subject to change over time. The current default is disabled. + // Enabling this collector with a long list of selected units may produce metrics with high + // cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment + // for excessive memory usage. + // +optional + Systemd NodeExporterCollectorSystemdConfig `json:"systemd,omitempty,omitzero"` +} + +// NodeExporterCollectorCpufreqConfig provides configuration for the cpufreq collector +// of the node-exporter agent. The cpufreq collector collects CPU frequency statistics. +// It is disabled by default. +type NodeExporterCollectorCpufreqConfig struct { + // enabled enables or disables the cpufreq collector. + // This field is required. + // Valid values are "Enabled" and "Disabled". + // When set to "Enabled", the cpufreq collector is active and CPU frequency statistics are collected. + // When set to "Disabled", the cpufreq collector is inactive. + // +required + Enabled NodeExporterCollectorState `json:"enabled,omitempty"` +} + +// NodeExporterCollectorTcpStatConfig provides configuration for the tcpstat collector +// of the node-exporter agent. The tcpstat collector collects TCP connection statistics. +// It is disabled by default. +type NodeExporterCollectorTcpStatConfig struct { + // enabled enables or disables the tcpstat collector. + // This field is required. + // Valid values are "Enabled" and "Disabled". + // When set to "Enabled", the tcpstat collector is active and TCP connection statistics are collected. + // When set to "Disabled", the tcpstat collector is inactive. + // +required + Enabled NodeExporterCollectorState `json:"enabled,omitempty"` +} + +// NodeExporterCollectorEthtoolConfig provides configuration for the ethtool collector +// of the node-exporter agent. The ethtool collector collects ethernet device statistics. +// It is disabled by default. +type NodeExporterCollectorEthtoolConfig struct { + // enabled enables or disables the ethtool collector. + // This field is required. + // Valid values are "Enabled" and "Disabled". + // When set to "Enabled", the ethtool collector is active and ethernet device statistics are collected. + // When set to "Disabled", the ethtool collector is inactive. + // +required + Enabled NodeExporterCollectorState `json:"enabled,omitempty"` +} + +// NodeExporterCollectorNetDevConfig provides configuration for the netdev collector +// of the node-exporter agent. The netdev collector collects network device statistics +// such as bytes, packets, errors, and drops per device. +// It is enabled by default. +type NodeExporterCollectorNetDevConfig struct { + // enabled enables or disables the netdev collector. + // This field is required. + // Valid values are "Enabled" and "Disabled". + // When set to "Enabled", the netdev collector is active and network device statistics are collected. + // When set to "Disabled", the netdev collector is inactive and the corresponding metrics become unavailable. + // +required + Enabled NodeExporterCollectorState `json:"enabled,omitempty"` +} + +// NodeExporterCollectorNetClassConfig provides configuration for the netclass collector +// of the node-exporter agent. The netclass collector collects information about network devices +// such as network speed, MTU, and carrier status. +// It is enabled by default. +type NodeExporterCollectorNetClassConfig struct { + // enabled enables or disables the netclass collector. + // This field is required. + // Valid values are "Enabled" and "Disabled". + // When set to "Enabled", the netclass collector is active and network class information is collected. + // When set to "Disabled", the netclass collector is inactive and the corresponding metrics become unavailable. + // +required + Enabled NodeExporterCollectorState `json:"enabled,omitempty"` + // useNetlink activates the netlink implementation of the netclass collector. + // useNetlink is optional. + // This implementation improves the performance of the netclass collector. + // Valid values are "Enabled" and "Disabled". + // When set to "Enabled", the netlink implementation is used for improved performance. + // When set to "Disabled", the default sysfs implementation is used. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, + // which is subject to change over time. The current default is "Enabled". + // +optional + UseNetlink NodeExporterNetlinkState `json:"useNetlink,omitempty"` +} + +// NodeExporterCollectorBuddyInfoConfig provides configuration for the buddyinfo collector +// of the node-exporter agent. The buddyinfo collector collects statistics about memory fragmentation +// from the node_buddyinfo_blocks metric using data from /proc/buddyinfo. +// It is disabled by default. +type NodeExporterCollectorBuddyInfoConfig struct { + // enabled enables or disables the buddyinfo collector. + // This field is required. + // Valid values are "Enabled" and "Disabled". + // When set to "Enabled", the buddyinfo collector is active and memory fragmentation statistics are collected. + // When set to "Disabled", the buddyinfo collector is inactive. + // +required + Enabled NodeExporterCollectorState `json:"enabled,omitempty"` +} + +// NodeExporterCollectorMountStatsConfig provides configuration for the mountstats collector +// of the node-exporter agent. The mountstats collector collects statistics about NFS volume I/O activities. +// It is disabled by default. +// Enabling this collector may produce metrics with high cardinality. If you enable this +// collector, closely monitor the prometheus-k8s deployment for excessive memory usage. +type NodeExporterCollectorMountStatsConfig struct { + // enabled enables or disables the mountstats collector. + // This field is required. + // Valid values are "Enabled" and "Disabled". + // When set to "Enabled", the mountstats collector is active and NFS volume I/O statistics are collected. + // When set to "Disabled", the mountstats collector is inactive. + // +required + Enabled NodeExporterCollectorState `json:"enabled,omitempty"` +} + +// NodeExporterCollectorKSMDConfig provides configuration for the ksmd collector +// of the node-exporter agent. The ksmd collector collects statistics from the kernel +// same-page merger daemon. +// It is disabled by default. +type NodeExporterCollectorKSMDConfig struct { + // enabled enables or disables the ksmd collector. + // This field is required. + // Valid values are "Enabled" and "Disabled". + // When set to "Enabled", the ksmd collector is active and kernel same-page merger statistics are collected. + // When set to "Disabled", the ksmd collector is inactive. + // +required + Enabled NodeExporterCollectorState `json:"enabled,omitempty"` +} + +// NodeExporterCollectorProcessesConfig provides configuration for the processes collector +// of the node-exporter agent. The processes collector collects statistics from processes and threads +// running in the system. +// It is disabled by default. +type NodeExporterCollectorProcessesConfig struct { + // enabled enables or disables the processes collector. + // This field is required. + // Valid values are "Enabled" and "Disabled". + // When set to "Enabled", the processes collector is active and process/thread statistics are collected. + // When set to "Disabled", the processes collector is inactive. + // +required + Enabled NodeExporterCollectorState `json:"enabled,omitempty"` +} + +// NodeExporterCollectorSystemdConfig provides configuration for the systemd collector +// of the node-exporter agent. The systemd collector collects statistics on the systemd daemon +// and its managed services. +// It is disabled by default. +// Enabling this collector with a long list of selected units may produce metrics with high +// cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment +// for excessive memory usage. +type NodeExporterCollectorSystemdConfig struct { + // enabled enables or disables the systemd collector. + // This field is required. + // Valid values are "Enabled" and "Disabled". + // When set to "Enabled", the systemd collector is active and systemd unit statistics are collected. + // When set to "Disabled", the systemd collector is inactive. + // +required + Enabled NodeExporterCollectorState `json:"enabled,omitempty"` + // units is a list of regular expression patterns that match systemd units to be included + // by the systemd collector. + // units is optional. + // By default, the list is empty, so the collector exposes no metrics for systemd units. + // Each entry must be a valid regular expression and at most 1024 characters. + // Maximum length for this list is 50. + // Minimum length for this list is 1. + // Entries in this list must be unique. + // +kubebuilder:validation:MaxItems=50 + // +kubebuilder:validation:MinItems=1 + // +listType=set + // +optional + Units []NodeExporterSystemdUnit `json:"units,omitempty"` +} + +// NodeExporterSystemdUnit is a regular expression pattern that matches a systemd unit name. +// Must be at most 1024 characters. +// +kubebuilder:validation:MinLength=1 +// +kubebuilder:validation:MaxLength=1024 +type NodeExporterSystemdUnit string + // AuditProfile defines the audit log level for the Metrics Server. // +kubebuilder:validation:Enum=None;Metadata;Request;RequestResponse type AuditProfile string diff --git a/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings.crd.yaml b/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings.crd.yaml index 1243cf142c1..00069338f2b 100644 --- a/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings.crd.yaml +++ b/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitorings.crd.yaml @@ -1286,6 +1286,477 @@ spec: - TraceAll type: string type: object + nodeExporterConfig: + description: |- + nodeExporterConfig is an optional field that can be used to configure the node-exporter agent + that runs as a DaemonSet in the openshift-monitoring namespace. The node-exporter agent collects + hardware and OS-level metrics from every node in the cluster. + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + minProperties: 1 + properties: + collectors: + description: |- + collectors configures which node-exporter metric collectors are enabled. + collectors is optional. + Each collector can be individually enabled or disabled. Some collectors may have + additional configuration options. + + When omitted, this means no opinion and the platform is left to choose a reasonable + default, which is subject to change over time. + minProperties: 1 + properties: + buddyInfo: + description: |- + buddyInfo configures the buddyinfo collector, which collects statistics about memory + fragmentation from the node_buddyinfo_blocks metric. This metric collects data from /proc/buddyinfo. + buddyInfo is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + properties: + enabled: + description: |- + enabled enables or disables the buddyinfo collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the buddyinfo collector is active and memory fragmentation statistics are collected. + When set to "Disabled", the buddyinfo collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + cpuFreq: + description: |- + cpuFreq configures the cpufreq collector, which collects CPU frequency statistics. + cpuFreq is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + Under certain circumstances, enabling the cpufreq collector increases CPU usage on machines + with many cores. If you enable this collector and have machines with many cores, monitor your + systems closely for excessive CPU usage. + properties: + enabled: + description: |- + enabled enables or disables the cpufreq collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the cpufreq collector is active and CPU frequency statistics are collected. + When set to "Disabled", the cpufreq collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + ethtool: + description: |- + ethtool configures the ethtool collector, which collects ethernet device statistics. + ethtool is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + properties: + enabled: + description: |- + enabled enables or disables the ethtool collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the ethtool collector is active and ethernet device statistics are collected. + When set to "Disabled", the ethtool collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + ksmd: + description: |- + ksmd configures the ksmd collector, which collects statistics from the kernel same-page + merger daemon. + ksmd is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + properties: + enabled: + description: |- + enabled enables or disables the ksmd collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the ksmd collector is active and kernel same-page merger statistics are collected. + When set to "Disabled", the ksmd collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + mountStats: + description: |- + mountStats configures the mountstats collector, which collects statistics about NFS volume + I/O activities. + mountStats is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + Enabling this collector may produce metrics with high cardinality. If you enable this + collector, closely monitor the prometheus-k8s deployment for excessive memory usage. + properties: + enabled: + description: |- + enabled enables or disables the mountstats collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the mountstats collector is active and NFS volume I/O statistics are collected. + When set to "Disabled", the mountstats collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + netClass: + description: |- + netClass configures the netclass collector, which collects information about network devices. + netClass is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is enabled with netlink mode active. + properties: + enabled: + description: |- + enabled enables or disables the netclass collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the netclass collector is active and network class information is collected. + When set to "Disabled", the netclass collector is inactive and the corresponding metrics become unavailable. + enum: + - Enabled + - Disabled + type: string + useNetlink: + description: |- + useNetlink activates the netlink implementation of the netclass collector. + useNetlink is optional. + This implementation improves the performance of the netclass collector. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the netlink implementation is used for improved performance. + When set to "Disabled", the default sysfs implementation is used. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is "Enabled". + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + netDev: + description: |- + netDev configures the netdev collector, which collects network device statistics. + netDev is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is enabled. + properties: + enabled: + description: |- + enabled enables or disables the netdev collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the netdev collector is active and network device statistics are collected. + When set to "Disabled", the netdev collector is inactive and the corresponding metrics become unavailable. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + processes: + description: |- + processes configures the processes collector, which collects statistics from processes and + threads running in the system. + processes is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + properties: + enabled: + description: |- + enabled enables or disables the processes collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the processes collector is active and process/thread statistics are collected. + When set to "Disabled", the processes collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + systemd: + description: |- + systemd configures the systemd collector, which collects statistics on the systemd daemon + and its managed services. + systemd is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + Enabling this collector with a long list of selected units may produce metrics with high + cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment + for excessive memory usage. + properties: + enabled: + description: |- + enabled enables or disables the systemd collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the systemd collector is active and systemd unit statistics are collected. + When set to "Disabled", the systemd collector is inactive. + enum: + - Enabled + - Disabled + type: string + units: + description: |- + units is a list of regular expression patterns that match systemd units to be included + by the systemd collector. + units is optional. + By default, the list is empty, so the collector exposes no metrics for systemd units. + Each entry must be a valid regular expression and at most 1024 characters. + Maximum length for this list is 50. + Minimum length for this list is 1. + Entries in this list must be unique. + items: + description: |- + NodeExporterSystemdUnit is a regular expression pattern that matches a systemd unit name. + Must be at most 1024 characters. + maxLength: 1024 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: set + required: + - enabled + type: object + tcpStat: + description: |- + tcpStat configures the tcpstat collector, which collects TCP connection statistics. + tcpStat is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + properties: + enabled: + description: |- + enabled enables or disables the tcpstat collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the tcpstat collector is active and TCP connection statistics are collected. + When set to "Disabled", the tcpstat collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + type: object + ignoredNetworkDevices: + description: |- + ignoredNetworkDevices is a list of regular expression patterns that match network devices + to be excluded from the relevant collector configuration such as netdev, netclass, and ethtool. + ignoredNetworkDevices is optional. + + When omitted, the Cluster Monitoring Operator uses a predefined list of devices to be excluded + to minimize the impact on memory usage. + When set as an empty list, no devices are excluded. + If you modify this setting, monitor the prometheus-k8s deployment closely for excessive memory usage. + Maximum length for this list is 50. + Minimum length for this list is 1. + Each entry must be at most 1024 characters long. + items: + description: |- + NodeExporterIgnoredNetworkDevice is a regular expression pattern that matches a network device name + to be excluded from node-exporter metric collection for collectors such as netdev, netclass, and ethtool. + Must be a valid regular expression and at most 1024 characters. + maxLength: 1024 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: set + maxProcs: + description: |- + maxProcs sets the target number of CPUs on which the node-exporter process will run. + maxProcs is optional. + Use this setting to override the default value, which is set either to 4 or to the number + of CPUs on the host, whichever is smaller. + The default value is computed at runtime and set via the GOMAXPROCS environment variable before + node-exporter is launched. + If a kernel deadlock occurs or if performance degrades when reading from sysfs concurrently, + you can change this value to 1, which limits node-exporter to running on one CPU. + For nodes with a high CPU count, setting the limit to a low number saves resources by preventing + Go routines from being scheduled to run on all CPUs. However, I/O performance degrades if the + maxProcs value is set too low and there are many metrics to collect. + The minimum value is 1. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is min(4, number of host CPUs). + format: int32 + 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. + 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. + This field is optional. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + This is a simplified API that maps to Kubernetes ResourceRequirements. + The current default values are: + resources: + - name: cpu + request: 8m + limit: null + - name: memory + request: 32Mi + limit: null + Maximum length for this list is 10. + Minimum length for this list is 1. + Each resource name must be unique within this list. + items: + description: ContainerResource defines a single resource requirement + for a container. + properties: + limit: + anyOf: + - type: integer + - type: string + description: |- + limit is the maximum amount of the resource allowed (e.g. "2Mi", "1Gi"). + This field is optional. + When request is specified, limit cannot be less than request. + The value must be greater than 0 when specified. + maxLength: 20 + minLength: 1 + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + x-kubernetes-validations: + - message: limit must be a positive, non-zero quantity + rule: isQuantity(self) && quantity(self).isGreaterThan(quantity('0')) + name: + description: |- + name of the resource (e.g. "cpu", "memory", "hugepages-2Mi"). + This field is required. + name must consist only of alphanumeric characters, `-`, `_` and `.` and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: name must consist only of alphanumeric characters, + `-`, `_` and `.` and must start and end with an alphanumeric + character + rule: '!format.qualifiedName().validate(self).hasValue()' + request: + anyOf: + - type: integer + - type: string + description: |- + request is the minimum amount of the resource required (e.g. "2Mi", "1Gi"). + This field is optional. + When limit is specified, request cannot be greater than limit. + maxLength: 20 + minLength: 1 + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + x-kubernetes-validations: + - message: request must be a positive, non-zero quantity + rule: isQuantity(self) && quantity(self).isGreaterThan(quantity('0')) + required: + - name + type: object + x-kubernetes-validations: + - message: at least one of request or limit must be set + rule: has(self.request) || has(self.limit) + - message: limit must be greater than or equal to request + rule: '!(has(self.request) && has(self.limit)) || quantity(self.limit).compareTo(quantity(self.request)) + >= 0' + maxItems: 10 + minItems: 1 + type: array + 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 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, 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 prometheusOperatorAdmissionWebhookConfig: description: |- prometheusOperatorAdmissionWebhookConfig is an optional field that can be used to configure the diff --git a/config/v1alpha1/zz_generated.deepcopy.go b/config/v1alpha1/zz_generated.deepcopy.go index e28a94dbeff..d0e27c29c51 100644 --- a/config/v1alpha1/zz_generated.deepcopy.go +++ b/config/v1alpha1/zz_generated.deepcopy.go @@ -493,6 +493,7 @@ func (in *ClusterMonitoringSpec) DeepCopyInto(out *ClusterMonitoringSpec) { in.MetricsServerConfig.DeepCopyInto(&out.MetricsServerConfig) in.PrometheusOperatorConfig.DeepCopyInto(&out.PrometheusOperatorConfig) in.PrometheusOperatorAdmissionWebhookConfig.DeepCopyInto(&out.PrometheusOperatorAdmissionWebhookConfig) + in.NodeExporterConfig.DeepCopyInto(&out.NodeExporterConfig) return } @@ -994,6 +995,240 @@ func (in *MetricsServerConfig) DeepCopy() *MetricsServerConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorBuddyInfoConfig) DeepCopyInto(out *NodeExporterCollectorBuddyInfoConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorBuddyInfoConfig. +func (in *NodeExporterCollectorBuddyInfoConfig) DeepCopy() *NodeExporterCollectorBuddyInfoConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorBuddyInfoConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorConfig) DeepCopyInto(out *NodeExporterCollectorConfig) { + *out = *in + out.CpuFreq = in.CpuFreq + out.TcpStat = in.TcpStat + out.Ethtool = in.Ethtool + out.NetDev = in.NetDev + out.NetClass = in.NetClass + out.BuddyInfo = in.BuddyInfo + out.MountStats = in.MountStats + out.Ksmd = in.Ksmd + out.Processes = in.Processes + in.Systemd.DeepCopyInto(&out.Systemd) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorConfig. +func (in *NodeExporterCollectorConfig) DeepCopy() *NodeExporterCollectorConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorCpufreqConfig) DeepCopyInto(out *NodeExporterCollectorCpufreqConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorCpufreqConfig. +func (in *NodeExporterCollectorCpufreqConfig) DeepCopy() *NodeExporterCollectorCpufreqConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorCpufreqConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorEthtoolConfig) DeepCopyInto(out *NodeExporterCollectorEthtoolConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorEthtoolConfig. +func (in *NodeExporterCollectorEthtoolConfig) DeepCopy() *NodeExporterCollectorEthtoolConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorEthtoolConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorKSMDConfig) DeepCopyInto(out *NodeExporterCollectorKSMDConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorKSMDConfig. +func (in *NodeExporterCollectorKSMDConfig) DeepCopy() *NodeExporterCollectorKSMDConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorKSMDConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorMountStatsConfig) DeepCopyInto(out *NodeExporterCollectorMountStatsConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorMountStatsConfig. +func (in *NodeExporterCollectorMountStatsConfig) DeepCopy() *NodeExporterCollectorMountStatsConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorMountStatsConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorNetClassConfig) DeepCopyInto(out *NodeExporterCollectorNetClassConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorNetClassConfig. +func (in *NodeExporterCollectorNetClassConfig) DeepCopy() *NodeExporterCollectorNetClassConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorNetClassConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorNetDevConfig) DeepCopyInto(out *NodeExporterCollectorNetDevConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorNetDevConfig. +func (in *NodeExporterCollectorNetDevConfig) DeepCopy() *NodeExporterCollectorNetDevConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorNetDevConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorProcessesConfig) DeepCopyInto(out *NodeExporterCollectorProcessesConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorProcessesConfig. +func (in *NodeExporterCollectorProcessesConfig) DeepCopy() *NodeExporterCollectorProcessesConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorProcessesConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorSystemdConfig) DeepCopyInto(out *NodeExporterCollectorSystemdConfig) { + *out = *in + if in.Units != nil { + in, out := &in.Units, &out.Units + *out = make([]NodeExporterSystemdUnit, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorSystemdConfig. +func (in *NodeExporterCollectorSystemdConfig) DeepCopy() *NodeExporterCollectorSystemdConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorSystemdConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorTcpStatConfig) DeepCopyInto(out *NodeExporterCollectorTcpStatConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorTcpStatConfig. +func (in *NodeExporterCollectorTcpStatConfig) DeepCopy() *NodeExporterCollectorTcpStatConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorTcpStatConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterConfig) DeepCopyInto(out *NodeExporterConfig) { + *out = *in + 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.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]ContainerResource, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + 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]) + } + } + in.Collectors.DeepCopyInto(&out.Collectors) + if in.IgnoredNetworkDevices != nil { + in, out := &in.IgnoredNetworkDevices, &out.IgnoredNetworkDevices + *out = make([]NodeExporterIgnoredNetworkDevice, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterConfig. +func (in *NodeExporterConfig) DeepCopy() *NodeExporterConfig { + if in == nil { + return nil + } + out := new(NodeExporterConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PKI) DeepCopyInto(out *PKI) { *out = *in diff --git a/config/v1alpha1/zz_generated.featuregated-crd-manifests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml b/config/v1alpha1/zz_generated.featuregated-crd-manifests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml index b467f106750..b3fdb252902 100644 --- a/config/v1alpha1/zz_generated.featuregated-crd-manifests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml +++ b/config/v1alpha1/zz_generated.featuregated-crd-manifests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml @@ -1286,6 +1286,477 @@ spec: - TraceAll type: string type: object + nodeExporterConfig: + description: |- + nodeExporterConfig is an optional field that can be used to configure the node-exporter agent + that runs as a DaemonSet in the openshift-monitoring namespace. The node-exporter agent collects + hardware and OS-level metrics from every node in the cluster. + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + minProperties: 1 + properties: + collectors: + description: |- + collectors configures which node-exporter metric collectors are enabled. + collectors is optional. + Each collector can be individually enabled or disabled. Some collectors may have + additional configuration options. + + When omitted, this means no opinion and the platform is left to choose a reasonable + default, which is subject to change over time. + minProperties: 1 + properties: + buddyInfo: + description: |- + buddyInfo configures the buddyinfo collector, which collects statistics about memory + fragmentation from the node_buddyinfo_blocks metric. This metric collects data from /proc/buddyinfo. + buddyInfo is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + properties: + enabled: + description: |- + enabled enables or disables the buddyinfo collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the buddyinfo collector is active and memory fragmentation statistics are collected. + When set to "Disabled", the buddyinfo collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + cpuFreq: + description: |- + cpuFreq configures the cpufreq collector, which collects CPU frequency statistics. + cpuFreq is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + Under certain circumstances, enabling the cpufreq collector increases CPU usage on machines + with many cores. If you enable this collector and have machines with many cores, monitor your + systems closely for excessive CPU usage. + properties: + enabled: + description: |- + enabled enables or disables the cpufreq collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the cpufreq collector is active and CPU frequency statistics are collected. + When set to "Disabled", the cpufreq collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + ethtool: + description: |- + ethtool configures the ethtool collector, which collects ethernet device statistics. + ethtool is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + properties: + enabled: + description: |- + enabled enables or disables the ethtool collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the ethtool collector is active and ethernet device statistics are collected. + When set to "Disabled", the ethtool collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + ksmd: + description: |- + ksmd configures the ksmd collector, which collects statistics from the kernel same-page + merger daemon. + ksmd is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + properties: + enabled: + description: |- + enabled enables or disables the ksmd collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the ksmd collector is active and kernel same-page merger statistics are collected. + When set to "Disabled", the ksmd collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + mountStats: + description: |- + mountStats configures the mountstats collector, which collects statistics about NFS volume + I/O activities. + mountStats is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + Enabling this collector may produce metrics with high cardinality. If you enable this + collector, closely monitor the prometheus-k8s deployment for excessive memory usage. + properties: + enabled: + description: |- + enabled enables or disables the mountstats collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the mountstats collector is active and NFS volume I/O statistics are collected. + When set to "Disabled", the mountstats collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + netClass: + description: |- + netClass configures the netclass collector, which collects information about network devices. + netClass is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is enabled with netlink mode active. + properties: + enabled: + description: |- + enabled enables or disables the netclass collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the netclass collector is active and network class information is collected. + When set to "Disabled", the netclass collector is inactive and the corresponding metrics become unavailable. + enum: + - Enabled + - Disabled + type: string + useNetlink: + description: |- + useNetlink activates the netlink implementation of the netclass collector. + useNetlink is optional. + This implementation improves the performance of the netclass collector. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the netlink implementation is used for improved performance. + When set to "Disabled", the default sysfs implementation is used. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is "Enabled". + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + netDev: + description: |- + netDev configures the netdev collector, which collects network device statistics. + netDev is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is enabled. + properties: + enabled: + description: |- + enabled enables or disables the netdev collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the netdev collector is active and network device statistics are collected. + When set to "Disabled", the netdev collector is inactive and the corresponding metrics become unavailable. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + processes: + description: |- + processes configures the processes collector, which collects statistics from processes and + threads running in the system. + processes is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + properties: + enabled: + description: |- + enabled enables or disables the processes collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the processes collector is active and process/thread statistics are collected. + When set to "Disabled", the processes collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + systemd: + description: |- + systemd configures the systemd collector, which collects statistics on the systemd daemon + and its managed services. + systemd is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + Enabling this collector with a long list of selected units may produce metrics with high + cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment + for excessive memory usage. + properties: + enabled: + description: |- + enabled enables or disables the systemd collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the systemd collector is active and systemd unit statistics are collected. + When set to "Disabled", the systemd collector is inactive. + enum: + - Enabled + - Disabled + type: string + units: + description: |- + units is a list of regular expression patterns that match systemd units to be included + by the systemd collector. + units is optional. + By default, the list is empty, so the collector exposes no metrics for systemd units. + Each entry must be a valid regular expression and at most 1024 characters. + Maximum length for this list is 50. + Minimum length for this list is 1. + Entries in this list must be unique. + items: + description: |- + NodeExporterSystemdUnit is a regular expression pattern that matches a systemd unit name. + Must be at most 1024 characters. + maxLength: 1024 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: set + required: + - enabled + type: object + tcpStat: + description: |- + tcpStat configures the tcpstat collector, which collects TCP connection statistics. + tcpStat is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + properties: + enabled: + description: |- + enabled enables or disables the tcpstat collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the tcpstat collector is active and TCP connection statistics are collected. + When set to "Disabled", the tcpstat collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + type: object + ignoredNetworkDevices: + description: |- + ignoredNetworkDevices is a list of regular expression patterns that match network devices + to be excluded from the relevant collector configuration such as netdev, netclass, and ethtool. + ignoredNetworkDevices is optional. + + When omitted, the Cluster Monitoring Operator uses a predefined list of devices to be excluded + to minimize the impact on memory usage. + When set as an empty list, no devices are excluded. + If you modify this setting, monitor the prometheus-k8s deployment closely for excessive memory usage. + Maximum length for this list is 50. + Minimum length for this list is 1. + Each entry must be at most 1024 characters long. + items: + description: |- + NodeExporterIgnoredNetworkDevice is a regular expression pattern that matches a network device name + to be excluded from node-exporter metric collection for collectors such as netdev, netclass, and ethtool. + Must be a valid regular expression and at most 1024 characters. + maxLength: 1024 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: set + maxProcs: + description: |- + maxProcs sets the target number of CPUs on which the node-exporter process will run. + maxProcs is optional. + Use this setting to override the default value, which is set either to 4 or to the number + of CPUs on the host, whichever is smaller. + The default value is computed at runtime and set via the GOMAXPROCS environment variable before + node-exporter is launched. + If a kernel deadlock occurs or if performance degrades when reading from sysfs concurrently, + you can change this value to 1, which limits node-exporter to running on one CPU. + For nodes with a high CPU count, setting the limit to a low number saves resources by preventing + Go routines from being scheduled to run on all CPUs. However, I/O performance degrades if the + maxProcs value is set too low and there are many metrics to collect. + The minimum value is 1. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is min(4, number of host CPUs). + format: int32 + 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. + 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. + This field is optional. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + This is a simplified API that maps to Kubernetes ResourceRequirements. + The current default values are: + resources: + - name: cpu + request: 8m + limit: null + - name: memory + request: 32Mi + limit: null + Maximum length for this list is 10. + Minimum length for this list is 1. + Each resource name must be unique within this list. + items: + description: ContainerResource defines a single resource requirement + for a container. + properties: + limit: + anyOf: + - type: integer + - type: string + description: |- + limit is the maximum amount of the resource allowed (e.g. "2Mi", "1Gi"). + This field is optional. + When request is specified, limit cannot be less than request. + The value must be greater than 0 when specified. + maxLength: 20 + minLength: 1 + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + x-kubernetes-validations: + - message: limit must be a positive, non-zero quantity + rule: isQuantity(self) && quantity(self).isGreaterThan(quantity('0')) + name: + description: |- + name of the resource (e.g. "cpu", "memory", "hugepages-2Mi"). + This field is required. + name must consist only of alphanumeric characters, `-`, `_` and `.` and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: name must consist only of alphanumeric characters, + `-`, `_` and `.` and must start and end with an alphanumeric + character + rule: '!format.qualifiedName().validate(self).hasValue()' + request: + anyOf: + - type: integer + - type: string + description: |- + request is the minimum amount of the resource required (e.g. "2Mi", "1Gi"). + This field is optional. + When limit is specified, request cannot be greater than limit. + maxLength: 20 + minLength: 1 + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + x-kubernetes-validations: + - message: request must be a positive, non-zero quantity + rule: isQuantity(self) && quantity(self).isGreaterThan(quantity('0')) + required: + - name + type: object + x-kubernetes-validations: + - message: at least one of request or limit must be set + rule: has(self.request) || has(self.limit) + - message: limit must be greater than or equal to request + rule: '!(has(self.request) && has(self.limit)) || quantity(self.limit).compareTo(quantity(self.request)) + >= 0' + maxItems: 10 + minItems: 1 + type: array + 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 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, 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 prometheusOperatorAdmissionWebhookConfig: description: |- prometheusOperatorAdmissionWebhookConfig is an optional field that can be used to configure the diff --git a/config/v1alpha1/zz_generated.swagger_doc_generated.go b/config/v1alpha1/zz_generated.swagger_doc_generated.go index e43dc7b236f..6dc404bef35 100644 --- a/config/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/config/v1alpha1/zz_generated.swagger_doc_generated.go @@ -180,6 +180,7 @@ var map_ClusterMonitoringSpec = map[string]string{ "metricsServerConfig": "metricsServerConfig is an optional field that can be used to configure the Kubernetes Metrics Server that runs in the openshift-monitoring namespace. Specifically, it can configure how the Metrics Server instance is deployed, pod scheduling, its audit policy and log verbosity. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", "prometheusOperatorConfig": "prometheusOperatorConfig is an optional field that can be used to configure the Prometheus Operator component. Specifically, it can configure how the Prometheus Operator instance is deployed, pod scheduling, and resource allocation. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", "prometheusOperatorAdmissionWebhookConfig": "prometheusOperatorAdmissionWebhookConfig is an optional field that can be used to configure the admission webhook component of Prometheus Operator that runs in the openshift-monitoring namespace. The admission webhook validates PrometheusRule and AlertmanagerConfig objects to ensure they are semantically valid, mutates PrometheusRule annotations, and converts AlertmanagerConfig objects between API versions. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", + "nodeExporterConfig": "nodeExporterConfig is an optional field that can be used to configure the node-exporter agent that runs as a DaemonSet in the openshift-monitoring namespace. The node-exporter agent collects hardware and OS-level metrics from every node in the cluster. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", } func (ClusterMonitoringSpec) SwaggerDoc() map[string]string { @@ -219,6 +220,130 @@ func (MetricsServerConfig) SwaggerDoc() map[string]string { return map_MetricsServerConfig } +var map_NodeExporterCollectorBuddyInfoConfig = map[string]string{ + "": "NodeExporterCollectorBuddyInfoConfig provides configuration for the buddyinfo collector of the node-exporter agent. The buddyinfo collector collects statistics about memory fragmentation from the node_buddyinfo_blocks metric using data from /proc/buddyinfo. It is disabled by default.", + "enabled": "enabled enables or disables the buddyinfo collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the buddyinfo collector is active and memory fragmentation statistics are collected. When set to \"Disabled\", the buddyinfo collector is inactive.", +} + +func (NodeExporterCollectorBuddyInfoConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorBuddyInfoConfig +} + +var map_NodeExporterCollectorConfig = map[string]string{ + "": "NodeExporterCollectorConfig defines settings for individual collectors of the node-exporter agent. Each collector can be individually enabled or disabled.", + "cpuFreq": "cpuFreq configures the cpufreq collector, which collects CPU frequency statistics. cpuFreq is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. Under certain circumstances, enabling the cpufreq collector increases CPU usage on machines with many cores. If you enable this collector and have machines with many cores, monitor your systems closely for excessive CPU usage.", + "tcpStat": "tcpStat configures the tcpstat collector, which collects TCP connection statistics. tcpStat is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled.", + "ethtool": "ethtool configures the ethtool collector, which collects ethernet device statistics. ethtool is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled.", + "netDev": "netDev configures the netdev collector, which collects network device statistics. netDev is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is enabled.", + "netClass": "netClass configures the netclass collector, which collects information about network devices. netClass is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is enabled with netlink mode active.", + "buddyInfo": "buddyInfo configures the buddyinfo collector, which collects statistics about memory fragmentation from the node_buddyinfo_blocks metric. This metric collects data from /proc/buddyinfo. buddyInfo is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled.", + "mountStats": "mountStats configures the mountstats collector, which collects statistics about NFS volume I/O activities. mountStats is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. Enabling this collector may produce metrics with high cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment for excessive memory usage.", + "ksmd": "ksmd configures the ksmd collector, which collects statistics from the kernel same-page merger daemon. ksmd is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled.", + "processes": "processes configures the processes collector, which collects statistics from processes and threads running in the system. processes is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled.", + "systemd": "systemd configures the systemd collector, which collects statistics on the systemd daemon and its managed services. systemd is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. Enabling this collector with a long list of selected units may produce metrics with high cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment for excessive memory usage.", +} + +func (NodeExporterCollectorConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorConfig +} + +var map_NodeExporterCollectorCpufreqConfig = map[string]string{ + "": "NodeExporterCollectorCpufreqConfig provides configuration for the cpufreq collector of the node-exporter agent. The cpufreq collector collects CPU frequency statistics. It is disabled by default.", + "enabled": "enabled enables or disables the cpufreq collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the cpufreq collector is active and CPU frequency statistics are collected. When set to \"Disabled\", the cpufreq collector is inactive.", +} + +func (NodeExporterCollectorCpufreqConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorCpufreqConfig +} + +var map_NodeExporterCollectorEthtoolConfig = map[string]string{ + "": "NodeExporterCollectorEthtoolConfig provides configuration for the ethtool collector of the node-exporter agent. The ethtool collector collects ethernet device statistics. It is disabled by default.", + "enabled": "enabled enables or disables the ethtool collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the ethtool collector is active and ethernet device statistics are collected. When set to \"Disabled\", the ethtool collector is inactive.", +} + +func (NodeExporterCollectorEthtoolConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorEthtoolConfig +} + +var map_NodeExporterCollectorKSMDConfig = map[string]string{ + "": "NodeExporterCollectorKSMDConfig provides configuration for the ksmd collector of the node-exporter agent. The ksmd collector collects statistics from the kernel same-page merger daemon. It is disabled by default.", + "enabled": "enabled enables or disables the ksmd collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the ksmd collector is active and kernel same-page merger statistics are collected. When set to \"Disabled\", the ksmd collector is inactive.", +} + +func (NodeExporterCollectorKSMDConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorKSMDConfig +} + +var map_NodeExporterCollectorMountStatsConfig = map[string]string{ + "": "NodeExporterCollectorMountStatsConfig provides configuration for the mountstats collector of the node-exporter agent. The mountstats collector collects statistics about NFS volume I/O activities. It is disabled by default. Enabling this collector may produce metrics with high cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment for excessive memory usage.", + "enabled": "enabled enables or disables the mountstats collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the mountstats collector is active and NFS volume I/O statistics are collected. When set to \"Disabled\", the mountstats collector is inactive.", +} + +func (NodeExporterCollectorMountStatsConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorMountStatsConfig +} + +var map_NodeExporterCollectorNetClassConfig = map[string]string{ + "": "NodeExporterCollectorNetClassConfig provides configuration for the netclass collector of the node-exporter agent. The netclass collector collects information about network devices such as network speed, MTU, and carrier status. It is enabled by default.", + "enabled": "enabled enables or disables the netclass collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the netclass collector is active and network class information is collected. When set to \"Disabled\", the netclass collector is inactive and the corresponding metrics become unavailable.", + "useNetlink": "useNetlink activates the netlink implementation of the netclass collector. useNetlink is optional. This implementation improves the performance of the netclass collector. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the netlink implementation is used for improved performance. When set to \"Disabled\", the default sysfs implementation is used. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is \"Enabled\".", +} + +func (NodeExporterCollectorNetClassConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorNetClassConfig +} + +var map_NodeExporterCollectorNetDevConfig = map[string]string{ + "": "NodeExporterCollectorNetDevConfig provides configuration for the netdev collector of the node-exporter agent. The netdev collector collects network device statistics such as bytes, packets, errors, and drops per device. It is enabled by default.", + "enabled": "enabled enables or disables the netdev collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the netdev collector is active and network device statistics are collected. When set to \"Disabled\", the netdev collector is inactive and the corresponding metrics become unavailable.", +} + +func (NodeExporterCollectorNetDevConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorNetDevConfig +} + +var map_NodeExporterCollectorProcessesConfig = map[string]string{ + "": "NodeExporterCollectorProcessesConfig provides configuration for the processes collector of the node-exporter agent. The processes collector collects statistics from processes and threads running in the system. It is disabled by default.", + "enabled": "enabled enables or disables the processes collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the processes collector is active and process/thread statistics are collected. When set to \"Disabled\", the processes collector is inactive.", +} + +func (NodeExporterCollectorProcessesConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorProcessesConfig +} + +var map_NodeExporterCollectorSystemdConfig = map[string]string{ + "": "NodeExporterCollectorSystemdConfig provides configuration for the systemd collector of the node-exporter agent. The systemd collector collects statistics on the systemd daemon and its managed services. It is disabled by default. Enabling this collector with a long list of selected units may produce metrics with high cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment for excessive memory usage.", + "enabled": "enabled enables or disables the systemd collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the systemd collector is active and systemd unit statistics are collected. When set to \"Disabled\", the systemd collector is inactive.", + "units": "units is a list of regular expression patterns that match systemd units to be included by the systemd collector. units is optional. By default, the list is empty, so the collector exposes no metrics for systemd units. Each entry must be a valid regular expression and at most 1024 characters. Maximum length for this list is 50. Minimum length for this list is 1. Entries in this list must be unique.", +} + +func (NodeExporterCollectorSystemdConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorSystemdConfig +} + +var map_NodeExporterCollectorTcpStatConfig = map[string]string{ + "": "NodeExporterCollectorTcpStatConfig provides configuration for the tcpstat collector of the node-exporter agent. The tcpstat collector collects TCP connection statistics. It is disabled by default.", + "enabled": "enabled enables or disables the tcpstat collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the tcpstat collector is active and TCP connection statistics are collected. When set to \"Disabled\", the tcpstat collector is inactive.", +} + +func (NodeExporterCollectorTcpStatConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorTcpStatConfig +} + +var map_NodeExporterConfig = map[string]string{ + "": "NodeExporterConfig provides configuration options for the node-exporter agent that runs as a DaemonSet in the `openshift-monitoring` namespace. The node-exporter agent collects hardware and OS-level metrics from every node in the cluster, including CPU, memory, disk, and network statistics.", + "nodeSelector": "nodeSelector defines the nodes on which the Pods are scheduled. nodeSelector is optional.\n\nWhen 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.", + "resources": "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. This field is optional. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ This is a simplified API that maps to Kubernetes ResourceRequirements. The current default values are:\n resources:\n - name: cpu\n request: 8m\n limit: null\n - name: memory\n request: 32Mi\n limit: null\nMaximum length for this list is 10. Minimum length for this list is 1. Each resource name must be unique within this list.", + "tolerations": "tolerations defines tolerations for the pods. tolerations is optional.\n\nWhen 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.", + "collectors": "collectors configures which node-exporter metric collectors are enabled. collectors is optional. Each collector can be individually enabled or disabled. Some collectors may have additional configuration options.\n\nWhen omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", + "maxProcs": "maxProcs sets the target number of CPUs on which the node-exporter process will run. maxProcs is optional. Use this setting to override the default value, which is set either to 4 or to the number of CPUs on the host, whichever is smaller. The default value is computed at runtime and set via the GOMAXPROCS environment variable before node-exporter is launched. If a kernel deadlock occurs or if performance degrades when reading from sysfs concurrently, you can change this value to 1, which limits node-exporter to running on one CPU. For nodes with a high CPU count, setting the limit to a low number saves resources by preventing Go routines from being scheduled to run on all CPUs. However, I/O performance degrades if the maxProcs value is set too low and there are many metrics to collect. The minimum value is 1. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is min(4, number of host CPUs).", + "ignoredNetworkDevices": "ignoredNetworkDevices is a list of regular expression patterns that match network devices to be excluded from the relevant collector configuration such as netdev, netclass, and ethtool. ignoredNetworkDevices is optional.\n\nWhen omitted, the Cluster Monitoring Operator uses a predefined list of devices to be excluded to minimize the impact on memory usage. When set as an empty list, no devices are excluded. If you modify this setting, monitor the prometheus-k8s deployment closely for excessive memory usage. Maximum length for this list is 50. Minimum length for this list is 1. Each entry must be at most 1024 characters long.", +} + +func (NodeExporterConfig) SwaggerDoc() map[string]string { + return map_NodeExporterConfig +} + var map_PrometheusOperatorAdmissionWebhookConfig = map[string]string{ "": "PrometheusOperatorAdmissionWebhookConfig provides configuration options for the admission webhook component of Prometheus Operator that runs in the `openshift-monitoring` namespace. The admission webhook validates PrometheusRule and AlertmanagerConfig objects, mutates PrometheusRule annotations, and converts AlertmanagerConfig objects between API versions.", "resources": "resources defines the compute resource requests and limits for the prometheus-operator-admission-webhook 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. This field is optional. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ This is a simplified API that maps to Kubernetes ResourceRequirements. The current default values are:\n resources:\n - name: cpu\n request: 5m\n limit: null\n - name: memory\n request: 30Mi\n limit: null\nMaximum length for this list is 10. Minimum length for this list is 1. Each resource name must be unique within this list.", diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go index ac5cca0658d..039b35bab17 100644 --- a/openapi/generated_openapi/zz_generated.openapi.go +++ b/openapi/generated_openapi/zz_generated.openapi.go @@ -489,6 +489,18 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/openshift/api/config/v1alpha1.InsightsDataGatherStatus": schema_openshift_api_config_v1alpha1_InsightsDataGatherStatus(ref), "github.com/openshift/api/config/v1alpha1.KeyConfig": schema_openshift_api_config_v1alpha1_KeyConfig(ref), "github.com/openshift/api/config/v1alpha1.MetricsServerConfig": schema_openshift_api_config_v1alpha1_MetricsServerConfig(ref), + "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorBuddyInfoConfig": schema_openshift_api_config_v1alpha1_NodeExporterCollectorBuddyInfoConfig(ref), + "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorConfig": schema_openshift_api_config_v1alpha1_NodeExporterCollectorConfig(ref), + "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorCpufreqConfig": schema_openshift_api_config_v1alpha1_NodeExporterCollectorCpufreqConfig(ref), + "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorEthtoolConfig": schema_openshift_api_config_v1alpha1_NodeExporterCollectorEthtoolConfig(ref), + "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorKSMDConfig": schema_openshift_api_config_v1alpha1_NodeExporterCollectorKSMDConfig(ref), + "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorMountStatsConfig": schema_openshift_api_config_v1alpha1_NodeExporterCollectorMountStatsConfig(ref), + "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorNetClassConfig": schema_openshift_api_config_v1alpha1_NodeExporterCollectorNetClassConfig(ref), + "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorNetDevConfig": schema_openshift_api_config_v1alpha1_NodeExporterCollectorNetDevConfig(ref), + "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorProcessesConfig": schema_openshift_api_config_v1alpha1_NodeExporterCollectorProcessesConfig(ref), + "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorSystemdConfig": schema_openshift_api_config_v1alpha1_NodeExporterCollectorSystemdConfig(ref), + "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorTcpStatConfig": schema_openshift_api_config_v1alpha1_NodeExporterCollectorTcpStatConfig(ref), + "github.com/openshift/api/config/v1alpha1.NodeExporterConfig": schema_openshift_api_config_v1alpha1_NodeExporterConfig(ref), "github.com/openshift/api/config/v1alpha1.PKI": schema_openshift_api_config_v1alpha1_PKI(ref), "github.com/openshift/api/config/v1alpha1.PKICertificateManagement": schema_openshift_api_config_v1alpha1_PKICertificateManagement(ref), "github.com/openshift/api/config/v1alpha1.PKICertificateSubject": schema_openshift_api_config_v1alpha1_PKICertificateSubject(ref), @@ -23173,11 +23185,18 @@ func schema_openshift_api_config_v1alpha1_ClusterMonitoringSpec(ref common.Refer Ref: ref("github.com/openshift/api/config/v1alpha1.PrometheusOperatorAdmissionWebhookConfig"), }, }, + "nodeExporterConfig": { + SchemaProps: spec.SchemaProps{ + Description: "nodeExporterConfig is an optional field that can be used to configure the node-exporter agent that runs as a DaemonSet in the openshift-monitoring namespace. The node-exporter agent collects hardware and OS-level metrics from every node in the cluster. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1alpha1.NodeExporterConfig"), + }, + }, }, }, }, Dependencies: []string{ - "github.com/openshift/api/config/v1alpha1.AlertmanagerConfig", "github.com/openshift/api/config/v1alpha1.MetricsServerConfig", "github.com/openshift/api/config/v1alpha1.PrometheusOperatorAdmissionWebhookConfig", "github.com/openshift/api/config/v1alpha1.PrometheusOperatorConfig", "github.com/openshift/api/config/v1alpha1.UserDefinedMonitoring"}, + "github.com/openshift/api/config/v1alpha1.AlertmanagerConfig", "github.com/openshift/api/config/v1alpha1.MetricsServerConfig", "github.com/openshift/api/config/v1alpha1.NodeExporterConfig", "github.com/openshift/api/config/v1alpha1.PrometheusOperatorAdmissionWebhookConfig", "github.com/openshift/api/config/v1alpha1.PrometheusOperatorConfig", "github.com/openshift/api/config/v1alpha1.UserDefinedMonitoring"}, } } @@ -24012,6 +24031,434 @@ func schema_openshift_api_config_v1alpha1_MetricsServerConfig(ref common.Referen } } +func schema_openshift_api_config_v1alpha1_NodeExporterCollectorBuddyInfoConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeExporterCollectorBuddyInfoConfig provides configuration for the buddyinfo collector of the node-exporter agent. The buddyinfo collector collects statistics about memory fragmentation from the node_buddyinfo_blocks metric using data from /proc/buddyinfo. It is disabled by default.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "enabled enables or disables the buddyinfo collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the buddyinfo collector is active and memory fragmentation statistics are collected. When set to \"Disabled\", the buddyinfo collector is inactive.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"enabled"}, + }, + }, + } +} + +func schema_openshift_api_config_v1alpha1_NodeExporterCollectorConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeExporterCollectorConfig defines settings for individual collectors of the node-exporter agent. Each collector can be individually enabled or disabled.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cpuFreq": { + SchemaProps: spec.SchemaProps{ + Description: "cpuFreq configures the cpufreq collector, which collects CPU frequency statistics. cpuFreq is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. Under certain circumstances, enabling the cpufreq collector increases CPU usage on machines with many cores. If you enable this collector and have machines with many cores, monitor your systems closely for excessive CPU usage.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1alpha1.NodeExporterCollectorCpufreqConfig"), + }, + }, + "tcpStat": { + SchemaProps: spec.SchemaProps{ + Description: "tcpStat configures the tcpstat collector, which collects TCP connection statistics. tcpStat is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1alpha1.NodeExporterCollectorTcpStatConfig"), + }, + }, + "ethtool": { + SchemaProps: spec.SchemaProps{ + Description: "ethtool configures the ethtool collector, which collects ethernet device statistics. ethtool is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1alpha1.NodeExporterCollectorEthtoolConfig"), + }, + }, + "netDev": { + SchemaProps: spec.SchemaProps{ + Description: "netDev configures the netdev collector, which collects network device statistics. netDev is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is enabled.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1alpha1.NodeExporterCollectorNetDevConfig"), + }, + }, + "netClass": { + SchemaProps: spec.SchemaProps{ + Description: "netClass configures the netclass collector, which collects information about network devices. netClass is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is enabled with netlink mode active.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1alpha1.NodeExporterCollectorNetClassConfig"), + }, + }, + "buddyInfo": { + SchemaProps: spec.SchemaProps{ + Description: "buddyInfo configures the buddyinfo collector, which collects statistics about memory fragmentation from the node_buddyinfo_blocks metric. This metric collects data from /proc/buddyinfo. buddyInfo is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1alpha1.NodeExporterCollectorBuddyInfoConfig"), + }, + }, + "mountStats": { + SchemaProps: spec.SchemaProps{ + Description: "mountStats configures the mountstats collector, which collects statistics about NFS volume I/O activities. mountStats is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. Enabling this collector may produce metrics with high cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment for excessive memory usage.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1alpha1.NodeExporterCollectorMountStatsConfig"), + }, + }, + "ksmd": { + SchemaProps: spec.SchemaProps{ + Description: "ksmd configures the ksmd collector, which collects statistics from the kernel same-page merger daemon. ksmd is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1alpha1.NodeExporterCollectorKSMDConfig"), + }, + }, + "processes": { + SchemaProps: spec.SchemaProps{ + Description: "processes configures the processes collector, which collects statistics from processes and threads running in the system. processes is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1alpha1.NodeExporterCollectorProcessesConfig"), + }, + }, + "systemd": { + SchemaProps: spec.SchemaProps{ + Description: "systemd configures the systemd collector, which collects statistics on the systemd daemon and its managed services. systemd is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. Enabling this collector with a long list of selected units may produce metrics with high cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment for excessive memory usage.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1alpha1.NodeExporterCollectorSystemdConfig"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorBuddyInfoConfig", "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorCpufreqConfig", "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorEthtoolConfig", "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorKSMDConfig", "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorMountStatsConfig", "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorNetClassConfig", "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorNetDevConfig", "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorProcessesConfig", "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorSystemdConfig", "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorTcpStatConfig"}, + } +} + +func schema_openshift_api_config_v1alpha1_NodeExporterCollectorCpufreqConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeExporterCollectorCpufreqConfig provides configuration for the cpufreq collector of the node-exporter agent. The cpufreq collector collects CPU frequency statistics. It is disabled by default.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "enabled enables or disables the cpufreq collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the cpufreq collector is active and CPU frequency statistics are collected. When set to \"Disabled\", the cpufreq collector is inactive.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"enabled"}, + }, + }, + } +} + +func schema_openshift_api_config_v1alpha1_NodeExporterCollectorEthtoolConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeExporterCollectorEthtoolConfig provides configuration for the ethtool collector of the node-exporter agent. The ethtool collector collects ethernet device statistics. It is disabled by default.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "enabled enables or disables the ethtool collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the ethtool collector is active and ethernet device statistics are collected. When set to \"Disabled\", the ethtool collector is inactive.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"enabled"}, + }, + }, + } +} + +func schema_openshift_api_config_v1alpha1_NodeExporterCollectorKSMDConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeExporterCollectorKSMDConfig provides configuration for the ksmd collector of the node-exporter agent. The ksmd collector collects statistics from the kernel same-page merger daemon. It is disabled by default.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "enabled enables or disables the ksmd collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the ksmd collector is active and kernel same-page merger statistics are collected. When set to \"Disabled\", the ksmd collector is inactive.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"enabled"}, + }, + }, + } +} + +func schema_openshift_api_config_v1alpha1_NodeExporterCollectorMountStatsConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeExporterCollectorMountStatsConfig provides configuration for the mountstats collector of the node-exporter agent. The mountstats collector collects statistics about NFS volume I/O activities. It is disabled by default. Enabling this collector may produce metrics with high cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment for excessive memory usage.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "enabled enables or disables the mountstats collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the mountstats collector is active and NFS volume I/O statistics are collected. When set to \"Disabled\", the mountstats collector is inactive.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"enabled"}, + }, + }, + } +} + +func schema_openshift_api_config_v1alpha1_NodeExporterCollectorNetClassConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeExporterCollectorNetClassConfig provides configuration for the netclass collector of the node-exporter agent. The netclass collector collects information about network devices such as network speed, MTU, and carrier status. It is enabled by default.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "enabled enables or disables the netclass collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the netclass collector is active and network class information is collected. When set to \"Disabled\", the netclass collector is inactive and the corresponding metrics become unavailable.", + Type: []string{"string"}, + Format: "", + }, + }, + "useNetlink": { + SchemaProps: spec.SchemaProps{ + Description: "useNetlink activates the netlink implementation of the netclass collector. useNetlink is optional. This implementation improves the performance of the netclass collector. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the netlink implementation is used for improved performance. When set to \"Disabled\", the default sysfs implementation is used. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is \"Enabled\".", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"enabled"}, + }, + }, + } +} + +func schema_openshift_api_config_v1alpha1_NodeExporterCollectorNetDevConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeExporterCollectorNetDevConfig provides configuration for the netdev collector of the node-exporter agent. The netdev collector collects network device statistics such as bytes, packets, errors, and drops per device. It is enabled by default.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "enabled enables or disables the netdev collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the netdev collector is active and network device statistics are collected. When set to \"Disabled\", the netdev collector is inactive and the corresponding metrics become unavailable.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"enabled"}, + }, + }, + } +} + +func schema_openshift_api_config_v1alpha1_NodeExporterCollectorProcessesConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeExporterCollectorProcessesConfig provides configuration for the processes collector of the node-exporter agent. The processes collector collects statistics from processes and threads running in the system. It is disabled by default.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "enabled enables or disables the processes collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the processes collector is active and process/thread statistics are collected. When set to \"Disabled\", the processes collector is inactive.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"enabled"}, + }, + }, + } +} + +func schema_openshift_api_config_v1alpha1_NodeExporterCollectorSystemdConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeExporterCollectorSystemdConfig provides configuration for the systemd collector of the node-exporter agent. The systemd collector collects statistics on the systemd daemon and its managed services. It is disabled by default. Enabling this collector with a long list of selected units may produce metrics with high cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment for excessive memory usage.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "enabled enables or disables the systemd collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the systemd collector is active and systemd unit statistics are collected. When set to \"Disabled\", the systemd collector is inactive.", + Type: []string{"string"}, + Format: "", + }, + }, + "units": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "units is a list of regular expression patterns that match systemd units to be included by the systemd collector. units is optional. By default, the list is empty, so the collector exposes no metrics for systemd units. Each entry must be a valid regular expression and at most 1024 characters. Maximum length for this list is 50. Minimum length for this list is 1. Entries in this list must be unique.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"enabled"}, + }, + }, + } +} + +func schema_openshift_api_config_v1alpha1_NodeExporterCollectorTcpStatConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeExporterCollectorTcpStatConfig provides configuration for the tcpstat collector of the node-exporter agent. The tcpstat collector collects TCP connection statistics. It is disabled by default.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "enabled enables or disables the tcpstat collector. This field is required. Valid values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", the tcpstat collector is active and TCP connection statistics are collected. When set to \"Disabled\", the tcpstat collector is inactive.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"enabled"}, + }, + }, + } +} + +func schema_openshift_api_config_v1alpha1_NodeExporterConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeExporterConfig provides configuration options for the node-exporter agent that runs as a DaemonSet in the `openshift-monitoring` namespace. The node-exporter agent collects hardware and OS-level metrics from every node in the cluster, including CPU, memory, disk, and network statistics.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeSelector": { + SchemaProps: spec.SchemaProps{ + Description: "nodeSelector defines the nodes on which the Pods are scheduled. nodeSelector is optional.\n\nWhen 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.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resources": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "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. This field is optional. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ This is a simplified API that maps to Kubernetes ResourceRequirements. The current default values are:\n resources:\n - name: cpu\n request: 8m\n limit: null\n - name: memory\n request: 32Mi\n limit: null\nMaximum length for this list is 10. Minimum length for this list is 1. Each resource name must be unique within this list.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1alpha1.ContainerResource"), + }, + }, + }, + }, + }, + "tolerations": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "tolerations defines tolerations for the pods. tolerations is optional.\n\nWhen 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.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(corev1.Toleration{}.OpenAPIModelName()), + }, + }, + }, + }, + }, + "collectors": { + SchemaProps: spec.SchemaProps{ + Description: "collectors configures which node-exporter metric collectors are enabled. collectors is optional. Each collector can be individually enabled or disabled. Some collectors may have additional configuration options.\n\nWhen omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1alpha1.NodeExporterCollectorConfig"), + }, + }, + "maxProcs": { + SchemaProps: spec.SchemaProps{ + Description: "maxProcs sets the target number of CPUs on which the node-exporter process will run. maxProcs is optional. Use this setting to override the default value, which is set either to 4 or to the number of CPUs on the host, whichever is smaller. The default value is computed at runtime and set via the GOMAXPROCS environment variable before node-exporter is launched. If a kernel deadlock occurs or if performance degrades when reading from sysfs concurrently, you can change this value to 1, which limits node-exporter to running on one CPU. For nodes with a high CPU count, setting the limit to a low number saves resources by preventing Go routines from being scheduled to run on all CPUs. However, I/O performance degrades if the maxProcs value is set too low and there are many metrics to collect. The minimum value is 1. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is min(4, number of host CPUs).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "ignoredNetworkDevices": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "ignoredNetworkDevices is a list of regular expression patterns that match network devices to be excluded from the relevant collector configuration such as netdev, netclass, and ethtool. ignoredNetworkDevices is optional.\n\nWhen omitted, the Cluster Monitoring Operator uses a predefined list of devices to be excluded to minimize the impact on memory usage. When set as an empty list, no devices are excluded. If you modify this setting, monitor the prometheus-k8s deployment closely for excessive memory usage. Maximum length for this list is 50. Minimum length for this list is 1. Each entry must be at most 1024 characters long.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/config/v1alpha1.ContainerResource", "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorConfig", corev1.Toleration{}.OpenAPIModelName()}, + } +} + func schema_openshift_api_config_v1alpha1_PKI(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/payload-manifests/crds/0000_10_config-operator_01_clustermonitorings.crd.yaml b/payload-manifests/crds/0000_10_config-operator_01_clustermonitorings.crd.yaml index 1243cf142c1..00069338f2b 100644 --- a/payload-manifests/crds/0000_10_config-operator_01_clustermonitorings.crd.yaml +++ b/payload-manifests/crds/0000_10_config-operator_01_clustermonitorings.crd.yaml @@ -1286,6 +1286,477 @@ spec: - TraceAll type: string type: object + nodeExporterConfig: + description: |- + nodeExporterConfig is an optional field that can be used to configure the node-exporter agent + that runs as a DaemonSet in the openshift-monitoring namespace. The node-exporter agent collects + hardware and OS-level metrics from every node in the cluster. + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + minProperties: 1 + properties: + collectors: + description: |- + collectors configures which node-exporter metric collectors are enabled. + collectors is optional. + Each collector can be individually enabled or disabled. Some collectors may have + additional configuration options. + + When omitted, this means no opinion and the platform is left to choose a reasonable + default, which is subject to change over time. + minProperties: 1 + properties: + buddyInfo: + description: |- + buddyInfo configures the buddyinfo collector, which collects statistics about memory + fragmentation from the node_buddyinfo_blocks metric. This metric collects data from /proc/buddyinfo. + buddyInfo is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + properties: + enabled: + description: |- + enabled enables or disables the buddyinfo collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the buddyinfo collector is active and memory fragmentation statistics are collected. + When set to "Disabled", the buddyinfo collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + cpuFreq: + description: |- + cpuFreq configures the cpufreq collector, which collects CPU frequency statistics. + cpuFreq is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + Under certain circumstances, enabling the cpufreq collector increases CPU usage on machines + with many cores. If you enable this collector and have machines with many cores, monitor your + systems closely for excessive CPU usage. + properties: + enabled: + description: |- + enabled enables or disables the cpufreq collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the cpufreq collector is active and CPU frequency statistics are collected. + When set to "Disabled", the cpufreq collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + ethtool: + description: |- + ethtool configures the ethtool collector, which collects ethernet device statistics. + ethtool is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + properties: + enabled: + description: |- + enabled enables or disables the ethtool collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the ethtool collector is active and ethernet device statistics are collected. + When set to "Disabled", the ethtool collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + ksmd: + description: |- + ksmd configures the ksmd collector, which collects statistics from the kernel same-page + merger daemon. + ksmd is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + properties: + enabled: + description: |- + enabled enables or disables the ksmd collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the ksmd collector is active and kernel same-page merger statistics are collected. + When set to "Disabled", the ksmd collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + mountStats: + description: |- + mountStats configures the mountstats collector, which collects statistics about NFS volume + I/O activities. + mountStats is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + Enabling this collector may produce metrics with high cardinality. If you enable this + collector, closely monitor the prometheus-k8s deployment for excessive memory usage. + properties: + enabled: + description: |- + enabled enables or disables the mountstats collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the mountstats collector is active and NFS volume I/O statistics are collected. + When set to "Disabled", the mountstats collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + netClass: + description: |- + netClass configures the netclass collector, which collects information about network devices. + netClass is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is enabled with netlink mode active. + properties: + enabled: + description: |- + enabled enables or disables the netclass collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the netclass collector is active and network class information is collected. + When set to "Disabled", the netclass collector is inactive and the corresponding metrics become unavailable. + enum: + - Enabled + - Disabled + type: string + useNetlink: + description: |- + useNetlink activates the netlink implementation of the netclass collector. + useNetlink is optional. + This implementation improves the performance of the netclass collector. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the netlink implementation is used for improved performance. + When set to "Disabled", the default sysfs implementation is used. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is "Enabled". + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + netDev: + description: |- + netDev configures the netdev collector, which collects network device statistics. + netDev is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is enabled. + properties: + enabled: + description: |- + enabled enables or disables the netdev collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the netdev collector is active and network device statistics are collected. + When set to "Disabled", the netdev collector is inactive and the corresponding metrics become unavailable. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + processes: + description: |- + processes configures the processes collector, which collects statistics from processes and + threads running in the system. + processes is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + properties: + enabled: + description: |- + enabled enables or disables the processes collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the processes collector is active and process/thread statistics are collected. + When set to "Disabled", the processes collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + systemd: + description: |- + systemd configures the systemd collector, which collects statistics on the systemd daemon + and its managed services. + systemd is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + Enabling this collector with a long list of selected units may produce metrics with high + cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment + for excessive memory usage. + properties: + enabled: + description: |- + enabled enables or disables the systemd collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the systemd collector is active and systemd unit statistics are collected. + When set to "Disabled", the systemd collector is inactive. + enum: + - Enabled + - Disabled + type: string + units: + description: |- + units is a list of regular expression patterns that match systemd units to be included + by the systemd collector. + units is optional. + By default, the list is empty, so the collector exposes no metrics for systemd units. + Each entry must be a valid regular expression and at most 1024 characters. + Maximum length for this list is 50. + Minimum length for this list is 1. + Entries in this list must be unique. + items: + description: |- + NodeExporterSystemdUnit is a regular expression pattern that matches a systemd unit name. + Must be at most 1024 characters. + maxLength: 1024 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: set + required: + - enabled + type: object + tcpStat: + description: |- + tcpStat configures the tcpstat collector, which collects TCP connection statistics. + tcpStat is optional. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is disabled. + properties: + enabled: + description: |- + enabled enables or disables the tcpstat collector. + This field is required. + Valid values are "Enabled" and "Disabled". + When set to "Enabled", the tcpstat collector is active and TCP connection statistics are collected. + When set to "Disabled", the tcpstat collector is inactive. + enum: + - Enabled + - Disabled + type: string + required: + - enabled + type: object + type: object + ignoredNetworkDevices: + description: |- + ignoredNetworkDevices is a list of regular expression patterns that match network devices + to be excluded from the relevant collector configuration such as netdev, netclass, and ethtool. + ignoredNetworkDevices is optional. + + When omitted, the Cluster Monitoring Operator uses a predefined list of devices to be excluded + to minimize the impact on memory usage. + When set as an empty list, no devices are excluded. + If you modify this setting, monitor the prometheus-k8s deployment closely for excessive memory usage. + Maximum length for this list is 50. + Minimum length for this list is 1. + Each entry must be at most 1024 characters long. + items: + description: |- + NodeExporterIgnoredNetworkDevice is a regular expression pattern that matches a network device name + to be excluded from node-exporter metric collection for collectors such as netdev, netclass, and ethtool. + Must be a valid regular expression and at most 1024 characters. + maxLength: 1024 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: set + maxProcs: + description: |- + maxProcs sets the target number of CPUs on which the node-exporter process will run. + maxProcs is optional. + Use this setting to override the default value, which is set either to 4 or to the number + of CPUs on the host, whichever is smaller. + The default value is computed at runtime and set via the GOMAXPROCS environment variable before + node-exporter is launched. + If a kernel deadlock occurs or if performance degrades when reading from sysfs concurrently, + you can change this value to 1, which limits node-exporter to running on one CPU. + For nodes with a high CPU count, setting the limit to a low number saves resources by preventing + Go routines from being scheduled to run on all CPUs. However, I/O performance degrades if the + maxProcs value is set too low and there are many metrics to collect. + The minimum value is 1. + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is min(4, number of host CPUs). + format: int32 + 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. + 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. + This field is optional. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + This is a simplified API that maps to Kubernetes ResourceRequirements. + The current default values are: + resources: + - name: cpu + request: 8m + limit: null + - name: memory + request: 32Mi + limit: null + Maximum length for this list is 10. + Minimum length for this list is 1. + Each resource name must be unique within this list. + items: + description: ContainerResource defines a single resource requirement + for a container. + properties: + limit: + anyOf: + - type: integer + - type: string + description: |- + limit is the maximum amount of the resource allowed (e.g. "2Mi", "1Gi"). + This field is optional. + When request is specified, limit cannot be less than request. + The value must be greater than 0 when specified. + maxLength: 20 + minLength: 1 + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + x-kubernetes-validations: + - message: limit must be a positive, non-zero quantity + rule: isQuantity(self) && quantity(self).isGreaterThan(quantity('0')) + name: + description: |- + name of the resource (e.g. "cpu", "memory", "hugepages-2Mi"). + This field is required. + name must consist only of alphanumeric characters, `-`, `_` and `.` and must start and end with an alphanumeric character. + maxLength: 253 + minLength: 1 + type: string + x-kubernetes-validations: + - message: name must consist only of alphanumeric characters, + `-`, `_` and `.` and must start and end with an alphanumeric + character + rule: '!format.qualifiedName().validate(self).hasValue()' + request: + anyOf: + - type: integer + - type: string + description: |- + request is the minimum amount of the resource required (e.g. "2Mi", "1Gi"). + This field is optional. + When limit is specified, request cannot be greater than limit. + maxLength: 20 + minLength: 1 + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + x-kubernetes-validations: + - message: request must be a positive, non-zero quantity + rule: isQuantity(self) && quantity(self).isGreaterThan(quantity('0')) + required: + - name + type: object + x-kubernetes-validations: + - message: at least one of request or limit must be set + rule: has(self.request) || has(self.limit) + - message: limit must be greater than or equal to request + rule: '!(has(self.request) && has(self.limit)) || quantity(self.limit).compareTo(quantity(self.request)) + >= 0' + maxItems: 10 + minItems: 1 + type: array + 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 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, 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 prometheusOperatorAdmissionWebhookConfig: description: |- prometheusOperatorAdmissionWebhookConfig is an optional field that can be used to configure the