From dc799fc0be2d42d70ab427b0bf44f6215f4323c8 Mon Sep 17 00:00:00 2001 From: Daniel Mellado Date: Tue, 17 Mar 2026 12:44:40 +0100 Subject: [PATCH] MON-4036: Add NodeExporterConfig to ClusterMonitoring API Add configuration for the node-exporter agent that runs as a DaemonSet in openshift-monitoring, collecting hardware and OS-level metrics from every node in the cluster. Signed-off-by: Daniel Mellado --- .../ClusterMonitoringConfig.yaml | 371 ++++++++++++ config/v1alpha1/types_cluster_monitoring.go | 438 +++++++++++++++ ...ig-operator_01_clustermonitorings.crd.yaml | 507 +++++++++++++++++ config/v1alpha1/zz_generated.deepcopy.go | 273 +++++++++ .../ClusterMonitoringConfig.yaml | 507 +++++++++++++++++ .../zz_generated.swagger_doc_generated.go | 143 +++++ .../generated_openapi/zz_generated.openapi.go | 530 +++++++++++++++++- ...ig-operator_01_clustermonitorings.crd.yaml | 507 +++++++++++++++++ 8 files changed, 3275 insertions(+), 1 deletion(-) diff --git a/config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml b/config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml index 89b21367c92..eaf8a9f4606 100644 --- a/config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml +++ b/config/v1alpha1/tests/clustermonitorings.config.openshift.io/ClusterMonitoringConfig.yaml @@ -1094,6 +1094,377 @@ tests: operator: "Exists" effect: "NoSchedule" expectedError: 'spec.telemeterClientConfig.tolerations: Too many: 11: must have at most 10 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: + collectionPolicy: Collect + tcpStat: + collectionPolicy: DoNotCollect + netDev: + collectionPolicy: Collect + netClass: + collectionPolicy: Collect + collect: + statsGatherer: Netlink + systemd: + collectionPolicy: Collect + collect: + units: + - "kubelet.service" + - "crio.service" + expected: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + collectors: + cpuFreq: + collectionPolicy: Collect + tcpStat: + collectionPolicy: DoNotCollect + netDev: + collectionPolicy: Collect + netClass: + collectionPolicy: Collect + collect: + statsGatherer: Netlink + systemd: + collectionPolicy: Collect + collect: + 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: + collectionPolicy: Collect + buddyInfo: + collectionPolicy: DoNotCollect + 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: + collectionPolicy: Collect + buddyInfo: + collectionPolicy: DoNotCollect + 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" + expectedError: 'spec.nodeExporterConfig.resources: Too many' + - 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 accept NodeExporterConfig with empty ignoredNetworkDevices list + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + ignoredNetworkDevices: [] + expected: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + ignoredNetworkDevices: [] + - name: Should reject NodeExporterConfig with maxProcs below minimum + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + maxProcs: -1 + expectedError: 'spec.nodeExporterConfig.maxProcs' + - name: Should reject NodeExporterConfig with maxProcs exceeding maximum + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + maxProcs: 1025 + expectedError: 'spec.nodeExporterConfig.maxProcs' + - name: Should reject netClass with collect set when collector is DoNotCollect + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + collectors: + netClass: + collectionPolicy: DoNotCollect + collect: + statsGatherer: Netlink + expectedError: 'collect configuration is forbidden when collectionPolicy is DoNotCollect' + - name: Should accept netClass DoNotCollect without collect + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + collectors: + netClass: + collectionPolicy: DoNotCollect + expected: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + collectors: + netClass: + collectionPolicy: DoNotCollect + - name: Should reject systemd with collect set when collector is DoNotCollect + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + collectors: + systemd: + collectionPolicy: DoNotCollect + collect: + units: + - "kubelet.service" + expectedError: 'collect configuration is forbidden when collectionPolicy is DoNotCollect' + - name: Should accept systemd DoNotCollect without collect + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + collectors: + systemd: + collectionPolicy: DoNotCollect + expected: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + collectors: + systemd: + collectionPolicy: DoNotCollect + - name: Should reject NodeExporterConfig with empty nodeSelector + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + nodeSelector: {} + expectedError: 'spec.nodeExporterConfig.nodeSelector: Invalid value: 0: spec.nodeExporterConfig.nodeSelector in body should have at least 1 properties' + - name: Should reject NodeExporterConfig with too many nodeSelector entries + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + nodeSelector: + key1: val1 + key2: val2 + key3: val3 + key4: val4 + key5: val5 + key6: val6 + key7: val7 + key8: val8 + key9: val9 + key10: val10 + key11: val11 + expectedError: 'spec.nodeExporterConfig.nodeSelector: Too many: 11: must have at most 10 items' + - name: Should reject NodeExporterConfig with empty tolerations array + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + tolerations: [] + expectedError: 'spec.nodeExporterConfig.tolerations: Invalid value: 0: spec.nodeExporterConfig.tolerations in body should have at least 1 items' + - name: Should reject NodeExporterConfig with too many tolerations + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + tolerations: + - key: "key1" + operator: "Exists" + - key: "key2" + operator: "Exists" + - key: "key3" + operator: "Exists" + - key: "key4" + operator: "Exists" + - key: "key5" + operator: "Exists" + - key: "key6" + operator: "Exists" + - key: "key7" + operator: "Exists" + - key: "key8" + operator: "Exists" + - key: "key9" + operator: "Exists" + - key: "key10" + operator: "Exists" + - key: "key11" + operator: "Exists" + expectedError: 'spec.nodeExporterConfig.tolerations: Too many: 11: must have at most 10 items' + - name: Should reject systemd collect with empty object + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + collectors: + systemd: + collectionPolicy: Collect + collect: {} + expectedError: "spec.nodeExporterConfig.collectors.systemd.collect: Invalid value" + - name: Should reject netClass collect with empty object + initial: | + apiVersion: config.openshift.io/v1alpha1 + kind: ClusterMonitoring + spec: + nodeExporterConfig: + collectors: + netClass: + collectionPolicy: Collect + collect: {} + expectedError: "spec.nodeExporterConfig.collectors.netClass.collect: Invalid value" onUpdate: - name: Should reject updating TelemeterClientConfig to empty object initial: | diff --git a/config/v1alpha1/types_cluster_monitoring.go b/config/v1alpha1/types_cluster_monitoring.go index 1d9042a23ce..e1a5a311846 100644 --- a/config/v1alpha1/types_cluster_monitoring.go +++ b/config/v1alpha1/types_cluster_monitoring.go @@ -133,6 +133,12 @@ type ClusterMonitoringSpec struct { // When set, at least one field must be specified within telemeterClientConfig. // +optional TelemeterClientConfig TelemeterClientConfig `json:"telemeterClientConfig,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"` } // OpenShiftStateMetricsConfig provides configuration options for the openshift-state-metrics agent @@ -208,6 +214,438 @@ type OpenShiftStateMetricsConfig 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. +// At least one field must be specified. +// +kubebuilder:validation:MinProperties=1 +type NodeExporterConfig struct { + // nodeSelector defines the nodes on which the Pods are scheduled. + // nodeSelector is optional. + // + // When omitted, this means the user has no opinion and the platform is left + // to choose reasonable defaults. These defaults are subject to change over time. + // The current default value is `kubernetes.io/os: linux`. + // When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries. + // +optional + // +kubebuilder:validation:MinProperties=1 + // +kubebuilder:validation:MaxProperties=10 + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + // resources defines the compute resource requests and limits for the node-exporter container. + // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. + // When not specified, defaults are used by the platform. Requests cannot exceed limits. + // 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 + // --- + // maxItems is set to 5 to stay within the Kubernetes CRD CEL validation cost budget. + // See the MaxItems comment near the ContainerResource type definition for details. + // Minimum length for this list is 1. + // Each resource name must be unique within this list. + // +optional + // +listType=map + // +listMapKey=name + // +kubebuilder:validation:MaxItems=5 + // +kubebuilder:validation:MinItems=1 + Resources []ContainerResource `json:"resources,omitempty"` + // tolerations defines tolerations for the pods. + // tolerations is optional. + // + // When omitted, this means the user has no opinion and the platform is left + // to choose reasonable defaults. These defaults are subject to change over time. + // The current default is to tolerate all taints (operator: Exists without any key), + // which is typical for DaemonSets that must run on every node. + // Maximum length for this list is 10. + // Minimum length for this list is 1. + // +kubebuilder:validation:MaxItems=10 + // +kubebuilder:validation:MinItems=1 + // +listType=atomic + // +optional + Tolerations []v1.Toleration `json:"tolerations,omitempty"` + // collectors configures which node-exporter metric collectors are enabled. + // collectors is optional. + // Each collector can be individually enabled or disabled. Some collectors may have + // 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 and the maximum value is 1024. + // 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 + // +kubebuilder:validation:Maximum=1024 + 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. + // Each entry must be at least 1 character and at most 1024 characters long. + // +kubebuilder:validation:MaxItems=50 + // +kubebuilder:validation:MinItems=0 + // +listType=set + // +optional + IgnoredNetworkDevices *[]NodeExporterIgnoredNetworkDevice `json:"ignoredNetworkDevices,omitempty"` +} + +// NodeExporterIgnoredNetworkDevice is a string that is interpreted as a Go regular expression +// pattern by the controller to match network device names to exclude from node-exporter +// metric collection for collectors such as netdev, netclass, and ethtool. +// Invalid regular expressions will cause a controller-level error at runtime. +// Must be at least 1 character and at most 1024 characters. +// +kubebuilder:validation:MinLength=1 +// +kubebuilder:validation:MaxLength=1024 +type NodeExporterIgnoredNetworkDevice string + +// NodeExporterCollectorCollectionPolicy declares whether a node-exporter collector should collect metrics. +// Valid values are "Collect" and "DoNotCollect". +// +kubebuilder:validation:Enum=Collect;DoNotCollect +// +enum +type NodeExporterCollectorCollectionPolicy string + +const ( + // NodeExporterCollectorCollectionPolicyCollect means the collector is active and will produce metrics. + NodeExporterCollectorCollectionPolicyCollect NodeExporterCollectorCollectionPolicy = "Collect" + // NodeExporterCollectorCollectionPolicyDoNotCollect means the collector is inactive and will not produce metrics. + NodeExporterCollectorCollectionPolicyDoNotCollect NodeExporterCollectorCollectionPolicy = "DoNotCollect" +) + +// NodeExporterNetclassStatsGatherer identifies how the netclass collector gathers device statistics +// (for example via sysfs or netlink, as implemented in node_exporter). +// Valid values are "Sysfs" and "Netlink". +// +kubebuilder:validation:Enum=Sysfs;Netlink +// +enum +type NodeExporterNetclassStatsGatherer string + +const ( + // NodeExporterNetclassStatsGathererSysfs uses the sysfs-based implementation. + NodeExporterNetclassStatsGathererSysfs NodeExporterNetclassStatsGatherer = "Sysfs" + // NodeExporterNetclassStatsGathererNetlink uses the netlink-based implementation. + NodeExporterNetclassStatsGathererNetlink NodeExporterNetclassStatsGatherer = "Netlink" +) + +// NodeExporterCollectorConfig defines settings for individual collectors +// of the node-exporter agent. Each collector can be individually set to collect or not collect metrics. +// At least one collector must be specified. +// +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. + // Consider enabling when you need to observe CPU frequency scaling; expect higher CPU usage on + // many-core nodes when collectionPolicy is Collect. + // +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. + // Enable when debugging TCP connection behavior or capacity at the node level. + // +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. + // Enable when you need NIC driver-level ethtool metrics beyond generic netdev counters. + // +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. + // Turn off if you must reduce per-interface metric cardinality on hosts with many virtual interfaces. + // +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. + // Use statsGatherer when sysfs vs netlink implementation matters or when matching node_exporter tuning. + // +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. + // Enable when investigating kernel memory fragmentation; typically for advanced troubleshooting only. + // +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. + // Enable when you care about per-mount NFS client statistics. + // +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. + // Enable on nodes where KSM is in use and you want visibility into merging activity. + // +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. + // Enable for process/thread-level insight; can be expensive on busy nodes. + // +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. + // Enable when you need metrics for specific units; scope units carefully. + // +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 { + // collectionPolicy declares whether the cpufreq collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the cpufreq collector is active and CPU frequency statistics are collected. + // When set to "DoNotCollect", the cpufreq collector is inactive. + // +required + CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,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 { + // collectionPolicy declares whether the tcpstat collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the tcpstat collector is active and TCP connection statistics are collected. + // When set to "DoNotCollect", the tcpstat collector is inactive. + // +required + CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,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 { + // collectionPolicy declares whether the ethtool collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the ethtool collector is active and ethernet device statistics are collected. + // When set to "DoNotCollect", the ethtool collector is inactive. + // +required + CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,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 { + // collectionPolicy declares whether the netdev collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the netdev collector is active and network device statistics are collected. + // When set to "DoNotCollect", the netdev collector is inactive and the corresponding metrics become unavailable. + // +required + CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,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. +// When collectionPolicy is DoNotCollect, the collect field must not be set. +// +kubebuilder:validation:XValidation:rule="self.collectionPolicy == 'Collect' || !has(self.collect)",message="collect configuration is forbidden when collectionPolicy is DoNotCollect" +// +union +type NodeExporterCollectorNetClassConfig struct { + // collectionPolicy declares whether the netclass collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the netclass collector is active and network class information is collected. + // When set to "DoNotCollect", the netclass collector is inactive and the corresponding metrics become unavailable. + // When set to "DoNotCollect", the collect field must not be set. + // +unionDiscriminator + // +required + CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` + // collect contains configuration options that apply only when the netclass collector is actively collecting metrics + // (i.e. when collectionPolicy is Collect). + // collect is optional and may be omitted even when collectionPolicy is Collect. + // When collectionPolicy is DoNotCollect, this field must not be set. + // When set, at least one field must be specified within collect. + // +unionMember + // +optional + Collect NodeExporterCollectorNetClassCollectConfig `json:"collect,omitzero,omitempty"` +} + +// NodeExporterCollectorNetClassCollectConfig holds configuration options for the netclass collector +// when it is actively collecting metrics. At least one field must be specified. +// +kubebuilder:validation:MinProperties=1 +type NodeExporterCollectorNetClassCollectConfig struct { + // statsGatherer selects which implementation the netclass collector uses to gather statistics (sysfs or netlink). + // statsGatherer is optional. + // Valid values are "Sysfs" and "Netlink". + // When set to "Netlink", the netlink implementation is used; when set to "Sysfs", the 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 Netlink. + // +optional + StatsGatherer NodeExporterNetclassStatsGatherer `json:"statsGatherer,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 { + // collectionPolicy declares whether the buddyinfo collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the buddyinfo collector is active and memory fragmentation statistics are collected. + // When set to "DoNotCollect", the buddyinfo collector is inactive. + // +required + CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,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 { + // collectionPolicy declares whether the mountstats collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the mountstats collector is active and NFS volume I/O statistics are collected. + // When set to "DoNotCollect", the mountstats collector is inactive. + // +required + CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,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 { + // collectionPolicy declares whether the ksmd collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the ksmd collector is active and kernel same-page merger statistics are collected. + // When set to "DoNotCollect", the ksmd collector is inactive. + // +required + CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,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 { + // collectionPolicy declares whether the processes collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the processes collector is active and process/thread statistics are collected. + // When set to "DoNotCollect", the processes collector is inactive. + // +required + CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,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. +// When collectionPolicy is DoNotCollect, the collect field must not be set. +// +kubebuilder:validation:XValidation:rule="self.collectionPolicy == 'Collect' || !has(self.collect)",message="collect configuration is forbidden when collectionPolicy is DoNotCollect" +// +union +type NodeExporterCollectorSystemdConfig struct { + // collectionPolicy declares whether the systemd collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the systemd collector is active and systemd unit statistics are collected. + // When set to "DoNotCollect", the systemd collector is inactive and the collect field must not be set. + // +unionDiscriminator + // +required + CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` + // collect contains configuration options that apply only when the systemd collector is actively collecting metrics + // (i.e. when collectionPolicy is Collect). + // collect is optional and may be omitted even when collectionPolicy is Collect. + // When collectionPolicy is DoNotCollect, this field must not be set. + // When set, at least one field must be specified within collect. + // +unionMember + // +optional + Collect NodeExporterCollectorSystemdCollectConfig `json:"collect,omitzero,omitempty"` +} + +// NodeExporterCollectorSystemdCollectConfig holds configuration options for the systemd collector +// when it is actively collecting metrics. At least one field must be specified. +// +kubebuilder:validation:MinProperties=1 +type NodeExporterCollectorSystemdCollectConfig struct { + // 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 is a regular expression pattern and must be at least 1 character 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 string that is interpreted as a Go regular expression +// pattern by the controller to match systemd unit names. +// Invalid regular expressions will cause a controller-level error at runtime. +// Must be at least 1 character and at most 1024 characters. +// +kubebuilder:validation:MinLength=1 +// +kubebuilder:validation:MaxLength=1024 +type NodeExporterSystemdUnit string + // UserDefinedMonitoring config for user-defined projects. type UserDefinedMonitoring struct { // mode defines the different configurations of UserDefinedMonitoring 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 4930fc25e20..2ea5ff3f5bb 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 @@ -1284,6 +1284,513 @@ 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. + Enable when investigating kernel memory fragmentation; typically for advanced troubleshooting only. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the buddyinfo collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the buddyinfo collector is active and memory fragmentation statistics are collected. + When set to "DoNotCollect", the buddyinfo collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Consider enabling when you need to observe CPU frequency scaling; expect higher CPU usage on + many-core nodes when collectionPolicy is Collect. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the cpufreq collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the cpufreq collector is active and CPU frequency statistics are collected. + When set to "DoNotCollect", the cpufreq collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Enable when you need NIC driver-level ethtool metrics beyond generic netdev counters. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the ethtool collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the ethtool collector is active and ethernet device statistics are collected. + When set to "DoNotCollect", the ethtool collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Enable on nodes where KSM is in use and you want visibility into merging activity. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the ksmd collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the ksmd collector is active and kernel same-page merger statistics are collected. + When set to "DoNotCollect", the ksmd collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Enable when you care about per-mount NFS client statistics. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the mountstats collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the mountstats collector is active and NFS volume I/O statistics are collected. + When set to "DoNotCollect", the mountstats collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Use statsGatherer when sysfs vs netlink implementation matters or when matching node_exporter tuning. + properties: + collect: + description: |- + collect contains configuration options that apply only when the netclass collector is actively collecting metrics + (i.e. when collectionPolicy is Collect). + collect is optional and may be omitted even when collectionPolicy is Collect. + When collectionPolicy is DoNotCollect, this field must not be set. + When set, at least one field must be specified within collect. + minProperties: 1 + properties: + statsGatherer: + description: |- + statsGatherer selects which implementation the netclass collector uses to gather statistics (sysfs or netlink). + statsGatherer is optional. + Valid values are "Sysfs" and "Netlink". + When set to "Netlink", the netlink implementation is used; when set to "Sysfs", the 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 Netlink. + enum: + - Sysfs + - Netlink + type: string + type: object + collectionPolicy: + description: |- + collectionPolicy declares whether the netclass collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the netclass collector is active and network class information is collected. + When set to "DoNotCollect", the netclass collector is inactive and the corresponding metrics become unavailable. + When set to "DoNotCollect", the collect field must not be set. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + type: object + x-kubernetes-validations: + - message: collect configuration is forbidden when collectionPolicy + is DoNotCollect + rule: self.collectionPolicy == 'Collect' || !has(self.collect) + 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. + Turn off if you must reduce per-interface metric cardinality on hosts with many virtual interfaces. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the netdev collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the netdev collector is active and network device statistics are collected. + When set to "DoNotCollect", the netdev collector is inactive and the corresponding metrics become unavailable. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Enable for process/thread-level insight; can be expensive on busy nodes. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the processes collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the processes collector is active and process/thread statistics are collected. + When set to "DoNotCollect", the processes collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Enable when you need metrics for specific units; scope units carefully. + properties: + collect: + description: |- + collect contains configuration options that apply only when the systemd collector is actively collecting metrics + (i.e. when collectionPolicy is Collect). + collect is optional and may be omitted even when collectionPolicy is Collect. + When collectionPolicy is DoNotCollect, this field must not be set. + When set, at least one field must be specified within collect. + minProperties: 1 + properties: + 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 is a regular expression pattern and must be at least 1 character 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 string that is interpreted as a Go regular expression + pattern by the controller to match systemd unit names. + Invalid regular expressions will cause a controller-level error at runtime. + Must be at least 1 character and at most 1024 characters. + maxLength: 1024 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: set + type: object + collectionPolicy: + description: |- + collectionPolicy declares whether the systemd collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the systemd collector is active and systemd unit statistics are collected. + When set to "DoNotCollect", the systemd collector is inactive and the collect field must not be set. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + type: object + x-kubernetes-validations: + - message: collect configuration is forbidden when collectionPolicy + is DoNotCollect + rule: self.collectionPolicy == 'Collect' || !has(self.collect) + 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. + Enable when debugging TCP connection behavior or capacity at the node level. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the tcpstat collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the tcpstat collector is active and TCP connection statistics are collected. + When set to "DoNotCollect", the tcpstat collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Each entry must be at least 1 character and at most 1024 characters long. + items: + description: |- + NodeExporterIgnoredNetworkDevice is a string that is interpreted as a Go regular expression + pattern by the controller to match network device names to exclude from node-exporter + metric collection for collectors such as netdev, netclass, and ethtool. + Invalid regular expressions will cause a controller-level error at runtime. + Must be at least 1 character and at most 1024 characters. + maxLength: 1024 + minLength: 1 + type: string + maxItems: 50 + minItems: 0 + 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 and the maximum value is 1024. + 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 + maximum: 1024 + minimum: 1 + type: integer + nodeSelector: + additionalProperties: + type: string + description: |- + nodeSelector defines the nodes on which the Pods are scheduled. + nodeSelector is optional. + + When omitted, this means the user has no opinion and the platform is left + to choose reasonable defaults. These defaults are subject to change over time. + The current default value is `kubernetes.io/os: linux`. + When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries. + maxProperties: 10 + minProperties: 1 + type: object + resources: + description: |- + resources defines the compute resource requests and limits for the node-exporter container. + 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 + 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: 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: 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: 5 + 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 openShiftStateMetricsConfig: description: |- openShiftStateMetricsConfig is an optional field that can be used to configure the openshift-state-metrics diff --git a/config/v1alpha1/zz_generated.deepcopy.go b/config/v1alpha1/zz_generated.deepcopy.go index 2fa022877df..a571bdbbb91 100644 --- a/config/v1alpha1/zz_generated.deepcopy.go +++ b/config/v1alpha1/zz_generated.deepcopy.go @@ -448,6 +448,7 @@ func (in *ClusterMonitoringSpec) DeepCopyInto(out *ClusterMonitoringSpec) { in.PrometheusOperatorAdmissionWebhookConfig.DeepCopyInto(&out.PrometheusOperatorAdmissionWebhookConfig) in.OpenShiftStateMetricsConfig.DeepCopyInto(&out.OpenShiftStateMetricsConfig) in.TelemeterClientConfig.DeepCopyInto(&out.TelemeterClientConfig) + in.NodeExporterConfig.DeepCopyInto(&out.NodeExporterConfig) return } @@ -874,6 +875,278 @@ 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 *NodeExporterCollectorNetClassCollectConfig) DeepCopyInto(out *NodeExporterCollectorNetClassCollectConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorNetClassCollectConfig. +func (in *NodeExporterCollectorNetClassCollectConfig) DeepCopy() *NodeExporterCollectorNetClassCollectConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorNetClassCollectConfig) + 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 + out.Collect = in.Collect + 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 *NodeExporterCollectorSystemdCollectConfig) DeepCopyInto(out *NodeExporterCollectorSystemdCollectConfig) { + *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 NodeExporterCollectorSystemdCollectConfig. +func (in *NodeExporterCollectorSystemdCollectConfig) DeepCopy() *NodeExporterCollectorSystemdCollectConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorSystemdCollectConfig) + 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 + in.Collect.DeepCopyInto(&out.Collect) + 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 = new([]NodeExporterIgnoredNetworkDevice) + if **in != nil { + in, out := *in, *out + *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 *OAuth2) DeepCopyInto(out *OAuth2) { *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 92506c29775..d2107cd2510 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 @@ -1284,6 +1284,513 @@ 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. + Enable when investigating kernel memory fragmentation; typically for advanced troubleshooting only. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the buddyinfo collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the buddyinfo collector is active and memory fragmentation statistics are collected. + When set to "DoNotCollect", the buddyinfo collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Consider enabling when you need to observe CPU frequency scaling; expect higher CPU usage on + many-core nodes when collectionPolicy is Collect. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the cpufreq collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the cpufreq collector is active and CPU frequency statistics are collected. + When set to "DoNotCollect", the cpufreq collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Enable when you need NIC driver-level ethtool metrics beyond generic netdev counters. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the ethtool collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the ethtool collector is active and ethernet device statistics are collected. + When set to "DoNotCollect", the ethtool collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Enable on nodes where KSM is in use and you want visibility into merging activity. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the ksmd collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the ksmd collector is active and kernel same-page merger statistics are collected. + When set to "DoNotCollect", the ksmd collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Enable when you care about per-mount NFS client statistics. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the mountstats collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the mountstats collector is active and NFS volume I/O statistics are collected. + When set to "DoNotCollect", the mountstats collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Use statsGatherer when sysfs vs netlink implementation matters or when matching node_exporter tuning. + properties: + collect: + description: |- + collect contains configuration options that apply only when the netclass collector is actively collecting metrics + (i.e. when collectionPolicy is Collect). + collect is optional and may be omitted even when collectionPolicy is Collect. + When collectionPolicy is DoNotCollect, this field must not be set. + When set, at least one field must be specified within collect. + minProperties: 1 + properties: + statsGatherer: + description: |- + statsGatherer selects which implementation the netclass collector uses to gather statistics (sysfs or netlink). + statsGatherer is optional. + Valid values are "Sysfs" and "Netlink". + When set to "Netlink", the netlink implementation is used; when set to "Sysfs", the 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 Netlink. + enum: + - Sysfs + - Netlink + type: string + type: object + collectionPolicy: + description: |- + collectionPolicy declares whether the netclass collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the netclass collector is active and network class information is collected. + When set to "DoNotCollect", the netclass collector is inactive and the corresponding metrics become unavailable. + When set to "DoNotCollect", the collect field must not be set. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + type: object + x-kubernetes-validations: + - message: collect configuration is forbidden when collectionPolicy + is DoNotCollect + rule: self.collectionPolicy == 'Collect' || !has(self.collect) + 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. + Turn off if you must reduce per-interface metric cardinality on hosts with many virtual interfaces. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the netdev collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the netdev collector is active and network device statistics are collected. + When set to "DoNotCollect", the netdev collector is inactive and the corresponding metrics become unavailable. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Enable for process/thread-level insight; can be expensive on busy nodes. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the processes collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the processes collector is active and process/thread statistics are collected. + When set to "DoNotCollect", the processes collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Enable when you need metrics for specific units; scope units carefully. + properties: + collect: + description: |- + collect contains configuration options that apply only when the systemd collector is actively collecting metrics + (i.e. when collectionPolicy is Collect). + collect is optional and may be omitted even when collectionPolicy is Collect. + When collectionPolicy is DoNotCollect, this field must not be set. + When set, at least one field must be specified within collect. + minProperties: 1 + properties: + 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 is a regular expression pattern and must be at least 1 character 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 string that is interpreted as a Go regular expression + pattern by the controller to match systemd unit names. + Invalid regular expressions will cause a controller-level error at runtime. + Must be at least 1 character and at most 1024 characters. + maxLength: 1024 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: set + type: object + collectionPolicy: + description: |- + collectionPolicy declares whether the systemd collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the systemd collector is active and systemd unit statistics are collected. + When set to "DoNotCollect", the systemd collector is inactive and the collect field must not be set. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + type: object + x-kubernetes-validations: + - message: collect configuration is forbidden when collectionPolicy + is DoNotCollect + rule: self.collectionPolicy == 'Collect' || !has(self.collect) + 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. + Enable when debugging TCP connection behavior or capacity at the node level. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the tcpstat collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the tcpstat collector is active and TCP connection statistics are collected. + When set to "DoNotCollect", the tcpstat collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Each entry must be at least 1 character and at most 1024 characters long. + items: + description: |- + NodeExporterIgnoredNetworkDevice is a string that is interpreted as a Go regular expression + pattern by the controller to match network device names to exclude from node-exporter + metric collection for collectors such as netdev, netclass, and ethtool. + Invalid regular expressions will cause a controller-level error at runtime. + Must be at least 1 character and at most 1024 characters. + maxLength: 1024 + minLength: 1 + type: string + maxItems: 50 + minItems: 0 + 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 and the maximum value is 1024. + 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 + maximum: 1024 + minimum: 1 + type: integer + nodeSelector: + additionalProperties: + type: string + description: |- + nodeSelector defines the nodes on which the Pods are scheduled. + nodeSelector is optional. + + When omitted, this means the user has no opinion and the platform is left + to choose reasonable defaults. These defaults are subject to change over time. + The current default value is `kubernetes.io/os: linux`. + When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries. + maxProperties: 10 + minProperties: 1 + type: object + resources: + description: |- + resources defines the compute resource requests and limits for the node-exporter container. + 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 + 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: 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: 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: 5 + 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 openShiftStateMetricsConfig: description: |- openShiftStateMetricsConfig is an optional field that can be used to configure the openshift-state-metrics diff --git a/config/v1alpha1/zz_generated.swagger_doc_generated.go b/config/v1alpha1/zz_generated.swagger_doc_generated.go index 5e7eb780ea6..0b4eda01f4b 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{ "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.", "openShiftStateMetricsConfig": "openShiftStateMetricsConfig is an optional field that can be used to configure the openshift-state-metrics agent that runs in the openshift-monitoring namespace. The openshift-state-metrics agent generates metrics about the state of OpenShift-specific Kubernetes objects, such as routes, builds, and deployments. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", "telemeterClientConfig": "telemeterClientConfig is an optional field that can be used to configure the Telemeter Client component that runs in the openshift-monitoring namespace. The Telemeter Client collects selected monitoring metrics and forwards them to Red Hat for telemetry purposes. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. When set, at least one field must be specified within telemeterClientConfig.", + "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 { @@ -294,6 +295,148 @@ 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.", + "collectionPolicy": "collectionPolicy declares whether the buddyinfo collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the buddyinfo collector is active and memory fragmentation statistics are collected. When set to \"DoNotCollect\", 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 set to collect or not collect metrics. At least one collector must be specified.", + "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. Consider enabling when you need to observe CPU frequency scaling; expect higher CPU usage on many-core nodes when collectionPolicy is Collect.", + "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. Enable when debugging TCP connection behavior or capacity at the node level.", + "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. Enable when you need NIC driver-level ethtool metrics beyond generic netdev counters.", + "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. Turn off if you must reduce per-interface metric cardinality on hosts with many virtual interfaces.", + "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. Use statsGatherer when sysfs vs netlink implementation matters or when matching node_exporter tuning.", + "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. Enable when investigating kernel memory fragmentation; typically for advanced troubleshooting only.", + "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. Enable when you care about per-mount NFS client statistics.", + "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. Enable on nodes where KSM is in use and you want visibility into merging activity.", + "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. Enable for process/thread-level insight; can be expensive on busy nodes.", + "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. Enable when you need metrics for specific units; scope units carefully.", +} + +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.", + "collectionPolicy": "collectionPolicy declares whether the cpufreq collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the cpufreq collector is active and CPU frequency statistics are collected. When set to \"DoNotCollect\", 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.", + "collectionPolicy": "collectionPolicy declares whether the ethtool collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the ethtool collector is active and ethernet device statistics are collected. When set to \"DoNotCollect\", 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.", + "collectionPolicy": "collectionPolicy declares whether the ksmd collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the ksmd collector is active and kernel same-page merger statistics are collected. When set to \"DoNotCollect\", 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.", + "collectionPolicy": "collectionPolicy declares whether the mountstats collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the mountstats collector is active and NFS volume I/O statistics are collected. When set to \"DoNotCollect\", the mountstats collector is inactive.", +} + +func (NodeExporterCollectorMountStatsConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorMountStatsConfig +} + +var map_NodeExporterCollectorNetClassCollectConfig = map[string]string{ + "": "NodeExporterCollectorNetClassCollectConfig holds configuration options for the netclass collector when it is actively collecting metrics. At least one field must be specified.", + "statsGatherer": "statsGatherer selects which implementation the netclass collector uses to gather statistics (sysfs or netlink). statsGatherer is optional. Valid values are \"Sysfs\" and \"Netlink\". When set to \"Netlink\", the netlink implementation is used; when set to \"Sysfs\", the 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 Netlink.", +} + +func (NodeExporterCollectorNetClassCollectConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorNetClassCollectConfig +} + +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. When collectionPolicy is DoNotCollect, the collect field must not be set.", + "collectionPolicy": "collectionPolicy declares whether the netclass collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the netclass collector is active and network class information is collected. When set to \"DoNotCollect\", the netclass collector is inactive and the corresponding metrics become unavailable. When set to \"DoNotCollect\", the collect field must not be set.", + "collect": "collect contains configuration options that apply only when the netclass collector is actively collecting metrics (i.e. when collectionPolicy is Collect). collect is optional and may be omitted even when collectionPolicy is Collect. When collectionPolicy is DoNotCollect, this field must not be set. When set, at least one field must be specified within collect.", +} + +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.", + "collectionPolicy": "collectionPolicy declares whether the netdev collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the netdev collector is active and network device statistics are collected. When set to \"DoNotCollect\", 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.", + "collectionPolicy": "collectionPolicy declares whether the processes collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the processes collector is active and process/thread statistics are collected. When set to \"DoNotCollect\", the processes collector is inactive.", +} + +func (NodeExporterCollectorProcessesConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorProcessesConfig +} + +var map_NodeExporterCollectorSystemdCollectConfig = map[string]string{ + "": "NodeExporterCollectorSystemdCollectConfig holds configuration options for the systemd collector when it is actively collecting metrics. At least one field must be specified.", + "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 is a regular expression pattern and must be at least 1 character 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 (NodeExporterCollectorSystemdCollectConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorSystemdCollectConfig +} + +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. When collectionPolicy is DoNotCollect, the collect field must not be set.", + "collectionPolicy": "collectionPolicy declares whether the systemd collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the systemd collector is active and systemd unit statistics are collected. When set to \"DoNotCollect\", the systemd collector is inactive and the collect field must not be set.", + "collect": "collect contains configuration options that apply only when the systemd collector is actively collecting metrics (i.e. when collectionPolicy is Collect). collect is optional and may be omitted even when collectionPolicy is Collect. When collectionPolicy is DoNotCollect, this field must not be set. When set, at least one field must be specified within collect.", +} + +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.", + "collectionPolicy": "collectionPolicy declares whether the tcpstat collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the tcpstat collector is active and TCP connection statistics are collected. When set to \"DoNotCollect\", 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. At least one field must be specified.", + "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", + "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 and the maximum value is 1024. 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. Each entry must be at least 1 character and at most 1024 characters long.", +} + +func (NodeExporterConfig) SwaggerDoc() map[string]string { + return map_NodeExporterConfig +} + var map_OAuth2 = map[string]string{ "": "OAuth2 defines OAuth2 authentication settings for the remote write endpoint.", "clientId": "clientId defines the secret reference containing the OAuth2 client ID. The secret must exist in the openshift-monitoring namespace.", diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go index 1008cf3d394..ad7ad7b3244 100644 --- a/openapi/generated_openapi/zz_generated.openapi.go +++ b/openapi/generated_openapi/zz_generated.openapi.go @@ -488,6 +488,20 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/openshift/api/config/v1alpha1.MetadataConfig": schema_openshift_api_config_v1alpha1_MetadataConfig(ref), "github.com/openshift/api/config/v1alpha1.MetadataConfigCustom": schema_openshift_api_config_v1alpha1_MetadataConfigCustom(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.NodeExporterCollectorNetClassCollectConfig": schema_openshift_api_config_v1alpha1_NodeExporterCollectorNetClassCollectConfig(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.NodeExporterCollectorSystemdCollectConfig": schema_openshift_api_config_v1alpha1_NodeExporterCollectorSystemdCollectConfig(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.OAuth2": schema_openshift_api_config_v1alpha1_OAuth2(ref), "github.com/openshift/api/config/v1alpha1.OAuth2EndpointParam": schema_openshift_api_config_v1alpha1_OAuth2EndpointParam(ref), "github.com/openshift/api/config/v1alpha1.OpenShiftStateMetricsConfig": schema_openshift_api_config_v1alpha1_OpenShiftStateMetricsConfig(ref), @@ -23217,11 +23231,18 @@ func schema_openshift_api_config_v1alpha1_ClusterMonitoringSpec(ref common.Refer Ref: ref("github.com/openshift/api/config/v1alpha1.TelemeterClientConfig"), }, }, + "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.OpenShiftStateMetricsConfig", "github.com/openshift/api/config/v1alpha1.PrometheusConfig", "github.com/openshift/api/config/v1alpha1.PrometheusOperatorAdmissionWebhookConfig", "github.com/openshift/api/config/v1alpha1.PrometheusOperatorConfig", "github.com/openshift/api/config/v1alpha1.TelemeterClientConfig", "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.OpenShiftStateMetricsConfig", "github.com/openshift/api/config/v1alpha1.PrometheusConfig", "github.com/openshift/api/config/v1alpha1.PrometheusOperatorAdmissionWebhookConfig", "github.com/openshift/api/config/v1alpha1.PrometheusOperatorConfig", "github.com/openshift/api/config/v1alpha1.TelemeterClientConfig", "github.com/openshift/api/config/v1alpha1.UserDefinedMonitoring"}, } } @@ -23934,6 +23955,513 @@ 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{ + "collectionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "collectionPolicy declares whether the buddyinfo collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the buddyinfo collector is active and memory fragmentation statistics are collected. When set to \"DoNotCollect\", the buddyinfo collector is inactive.\n\nPossible enum values:\n - `\"Collect\"` means the collector is active and will produce metrics.\n - `\"DoNotCollect\"` means the collector is inactive and will not produce metrics.", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"Collect", "DoNotCollect"}, + }, + }, + }, + Required: []string{"collectionPolicy"}, + }, + }, + } +} + +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 set to collect or not collect metrics. At least one collector must be specified.", + 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. Consider enabling when you need to observe CPU frequency scaling; expect higher CPU usage on many-core nodes when collectionPolicy is Collect.", + 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. Enable when debugging TCP connection behavior or capacity at the node level.", + 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. Enable when you need NIC driver-level ethtool metrics beyond generic netdev counters.", + 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. Turn off if you must reduce per-interface metric cardinality on hosts with many virtual interfaces.", + 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. Use statsGatherer when sysfs vs netlink implementation matters or when matching node_exporter tuning.", + 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. Enable when investigating kernel memory fragmentation; typically for advanced troubleshooting only.", + 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. Enable when you care about per-mount NFS client statistics.", + 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. Enable on nodes where KSM is in use and you want visibility into merging activity.", + 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. Enable for process/thread-level insight; can be expensive on busy nodes.", + 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. Enable when you need metrics for specific units; scope units carefully.", + 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{ + "collectionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "collectionPolicy declares whether the cpufreq collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the cpufreq collector is active and CPU frequency statistics are collected. When set to \"DoNotCollect\", the cpufreq collector is inactive.\n\nPossible enum values:\n - `\"Collect\"` means the collector is active and will produce metrics.\n - `\"DoNotCollect\"` means the collector is inactive and will not produce metrics.", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"Collect", "DoNotCollect"}, + }, + }, + }, + Required: []string{"collectionPolicy"}, + }, + }, + } +} + +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{ + "collectionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "collectionPolicy declares whether the ethtool collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the ethtool collector is active and ethernet device statistics are collected. When set to \"DoNotCollect\", the ethtool collector is inactive.\n\nPossible enum values:\n - `\"Collect\"` means the collector is active and will produce metrics.\n - `\"DoNotCollect\"` means the collector is inactive and will not produce metrics.", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"Collect", "DoNotCollect"}, + }, + }, + }, + Required: []string{"collectionPolicy"}, + }, + }, + } +} + +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{ + "collectionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "collectionPolicy declares whether the ksmd collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the ksmd collector is active and kernel same-page merger statistics are collected. When set to \"DoNotCollect\", the ksmd collector is inactive.\n\nPossible enum values:\n - `\"Collect\"` means the collector is active and will produce metrics.\n - `\"DoNotCollect\"` means the collector is inactive and will not produce metrics.", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"Collect", "DoNotCollect"}, + }, + }, + }, + Required: []string{"collectionPolicy"}, + }, + }, + } +} + +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{ + "collectionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "collectionPolicy declares whether the mountstats collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the mountstats collector is active and NFS volume I/O statistics are collected. When set to \"DoNotCollect\", the mountstats collector is inactive.\n\nPossible enum values:\n - `\"Collect\"` means the collector is active and will produce metrics.\n - `\"DoNotCollect\"` means the collector is inactive and will not produce metrics.", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"Collect", "DoNotCollect"}, + }, + }, + }, + Required: []string{"collectionPolicy"}, + }, + }, + } +} + +func schema_openshift_api_config_v1alpha1_NodeExporterCollectorNetClassCollectConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeExporterCollectorNetClassCollectConfig holds configuration options for the netclass collector when it is actively collecting metrics. At least one field must be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "statsGatherer": { + SchemaProps: spec.SchemaProps{ + Description: "statsGatherer selects which implementation the netclass collector uses to gather statistics (sysfs or netlink). statsGatherer is optional. Valid values are \"Sysfs\" and \"Netlink\". When set to \"Netlink\", the netlink implementation is used; when set to \"Sysfs\", the 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 Netlink.\n\nPossible enum values:\n - `\"Netlink\"` uses the netlink-based implementation.\n - `\"Sysfs\"` uses the sysfs-based implementation.", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"Netlink", "Sysfs"}, + }, + }, + }, + }, + }, + } +} + +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. When collectionPolicy is DoNotCollect, the collect field must not be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "collectionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "collectionPolicy declares whether the netclass collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the netclass collector is active and network class information is collected. When set to \"DoNotCollect\", the netclass collector is inactive and the corresponding metrics become unavailable. When set to \"DoNotCollect\", the collect field must not be set.\n\nPossible enum values:\n - `\"Collect\"` means the collector is active and will produce metrics.\n - `\"DoNotCollect\"` means the collector is inactive and will not produce metrics.", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"Collect", "DoNotCollect"}, + }, + }, + "collect": { + SchemaProps: spec.SchemaProps{ + Description: "collect contains configuration options that apply only when the netclass collector is actively collecting metrics (i.e. when collectionPolicy is Collect). collect is optional and may be omitted even when collectionPolicy is Collect. When collectionPolicy is DoNotCollect, this field must not be set. When set, at least one field must be specified within collect.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1alpha1.NodeExporterCollectorNetClassCollectConfig"), + }, + }, + }, + Required: []string{"collectionPolicy"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "collectionPolicy", + "fields-to-discriminateBy": map[string]interface{}{ + "collect": "Collect", + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorNetClassCollectConfig"}, + } +} + +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{ + "collectionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "collectionPolicy declares whether the netdev collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the netdev collector is active and network device statistics are collected. When set to \"DoNotCollect\", the netdev collector is inactive and the corresponding metrics become unavailable.\n\nPossible enum values:\n - `\"Collect\"` means the collector is active and will produce metrics.\n - `\"DoNotCollect\"` means the collector is inactive and will not produce metrics.", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"Collect", "DoNotCollect"}, + }, + }, + }, + Required: []string{"collectionPolicy"}, + }, + }, + } +} + +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{ + "collectionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "collectionPolicy declares whether the processes collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the processes collector is active and process/thread statistics are collected. When set to \"DoNotCollect\", the processes collector is inactive.\n\nPossible enum values:\n - `\"Collect\"` means the collector is active and will produce metrics.\n - `\"DoNotCollect\"` means the collector is inactive and will not produce metrics.", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"Collect", "DoNotCollect"}, + }, + }, + }, + Required: []string{"collectionPolicy"}, + }, + }, + } +} + +func schema_openshift_api_config_v1alpha1_NodeExporterCollectorSystemdCollectConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeExporterCollectorSystemdCollectConfig holds configuration options for the systemd collector when it is actively collecting metrics. At least one field must be specified.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "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 is a regular expression pattern and must be at least 1 character 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: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +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. When collectionPolicy is DoNotCollect, the collect field must not be set.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "collectionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "collectionPolicy declares whether the systemd collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the systemd collector is active and systemd unit statistics are collected. When set to \"DoNotCollect\", the systemd collector is inactive and the collect field must not be set.\n\nPossible enum values:\n - `\"Collect\"` means the collector is active and will produce metrics.\n - `\"DoNotCollect\"` means the collector is inactive and will not produce metrics.", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"Collect", "DoNotCollect"}, + }, + }, + "collect": { + SchemaProps: spec.SchemaProps{ + Description: "collect contains configuration options that apply only when the systemd collector is actively collecting metrics (i.e. when collectionPolicy is Collect). collect is optional and may be omitted even when collectionPolicy is Collect. When collectionPolicy is DoNotCollect, this field must not be set. When set, at least one field must be specified within collect.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1alpha1.NodeExporterCollectorSystemdCollectConfig"), + }, + }, + }, + Required: []string{"collectionPolicy"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-unions": []interface{}{ + map[string]interface{}{ + "discriminator": "collectionPolicy", + "fields-to-discriminateBy": map[string]interface{}{ + "collect": "Collect", + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/config/v1alpha1.NodeExporterCollectorSystemdCollectConfig"}, + } +} + +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{ + "collectionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "collectionPolicy declares whether the tcpstat collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the tcpstat collector is active and TCP connection statistics are collected. When set to \"DoNotCollect\", the tcpstat collector is inactive.\n\nPossible enum values:\n - `\"Collect\"` means the collector is active and will produce metrics.\n - `\"DoNotCollect\"` means the collector is inactive and will not produce metrics.", + Type: []string{"string"}, + Format: "", + Enum: []interface{}{"Collect", "DoNotCollect"}, + }, + }, + }, + Required: []string{"collectionPolicy"}, + }, + }, + } +} + +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. At least one field must be specified.", + 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", + 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 and the maximum value is 1024. 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. Each entry must be at least 1 character and 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_OAuth2(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 4930fc25e20..2ea5ff3f5bb 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 @@ -1284,6 +1284,513 @@ 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. + Enable when investigating kernel memory fragmentation; typically for advanced troubleshooting only. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the buddyinfo collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the buddyinfo collector is active and memory fragmentation statistics are collected. + When set to "DoNotCollect", the buddyinfo collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Consider enabling when you need to observe CPU frequency scaling; expect higher CPU usage on + many-core nodes when collectionPolicy is Collect. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the cpufreq collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the cpufreq collector is active and CPU frequency statistics are collected. + When set to "DoNotCollect", the cpufreq collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Enable when you need NIC driver-level ethtool metrics beyond generic netdev counters. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the ethtool collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the ethtool collector is active and ethernet device statistics are collected. + When set to "DoNotCollect", the ethtool collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Enable on nodes where KSM is in use and you want visibility into merging activity. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the ksmd collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the ksmd collector is active and kernel same-page merger statistics are collected. + When set to "DoNotCollect", the ksmd collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Enable when you care about per-mount NFS client statistics. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the mountstats collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the mountstats collector is active and NFS volume I/O statistics are collected. + When set to "DoNotCollect", the mountstats collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Use statsGatherer when sysfs vs netlink implementation matters or when matching node_exporter tuning. + properties: + collect: + description: |- + collect contains configuration options that apply only when the netclass collector is actively collecting metrics + (i.e. when collectionPolicy is Collect). + collect is optional and may be omitted even when collectionPolicy is Collect. + When collectionPolicy is DoNotCollect, this field must not be set. + When set, at least one field must be specified within collect. + minProperties: 1 + properties: + statsGatherer: + description: |- + statsGatherer selects which implementation the netclass collector uses to gather statistics (sysfs or netlink). + statsGatherer is optional. + Valid values are "Sysfs" and "Netlink". + When set to "Netlink", the netlink implementation is used; when set to "Sysfs", the 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 Netlink. + enum: + - Sysfs + - Netlink + type: string + type: object + collectionPolicy: + description: |- + collectionPolicy declares whether the netclass collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the netclass collector is active and network class information is collected. + When set to "DoNotCollect", the netclass collector is inactive and the corresponding metrics become unavailable. + When set to "DoNotCollect", the collect field must not be set. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + type: object + x-kubernetes-validations: + - message: collect configuration is forbidden when collectionPolicy + is DoNotCollect + rule: self.collectionPolicy == 'Collect' || !has(self.collect) + 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. + Turn off if you must reduce per-interface metric cardinality on hosts with many virtual interfaces. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the netdev collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the netdev collector is active and network device statistics are collected. + When set to "DoNotCollect", the netdev collector is inactive and the corresponding metrics become unavailable. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Enable for process/thread-level insight; can be expensive on busy nodes. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the processes collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the processes collector is active and process/thread statistics are collected. + When set to "DoNotCollect", the processes collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Enable when you need metrics for specific units; scope units carefully. + properties: + collect: + description: |- + collect contains configuration options that apply only when the systemd collector is actively collecting metrics + (i.e. when collectionPolicy is Collect). + collect is optional and may be omitted even when collectionPolicy is Collect. + When collectionPolicy is DoNotCollect, this field must not be set. + When set, at least one field must be specified within collect. + minProperties: 1 + properties: + 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 is a regular expression pattern and must be at least 1 character 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 string that is interpreted as a Go regular expression + pattern by the controller to match systemd unit names. + Invalid regular expressions will cause a controller-level error at runtime. + Must be at least 1 character and at most 1024 characters. + maxLength: 1024 + minLength: 1 + type: string + maxItems: 50 + minItems: 1 + type: array + x-kubernetes-list-type: set + type: object + collectionPolicy: + description: |- + collectionPolicy declares whether the systemd collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the systemd collector is active and systemd unit statistics are collected. + When set to "DoNotCollect", the systemd collector is inactive and the collect field must not be set. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + type: object + x-kubernetes-validations: + - message: collect configuration is forbidden when collectionPolicy + is DoNotCollect + rule: self.collectionPolicy == 'Collect' || !has(self.collect) + 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. + Enable when debugging TCP connection behavior or capacity at the node level. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the tcpstat collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the tcpstat collector is active and TCP connection statistics are collected. + When set to "DoNotCollect", the tcpstat collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + 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. + Each entry must be at least 1 character and at most 1024 characters long. + items: + description: |- + NodeExporterIgnoredNetworkDevice is a string that is interpreted as a Go regular expression + pattern by the controller to match network device names to exclude from node-exporter + metric collection for collectors such as netdev, netclass, and ethtool. + Invalid regular expressions will cause a controller-level error at runtime. + Must be at least 1 character and at most 1024 characters. + maxLength: 1024 + minLength: 1 + type: string + maxItems: 50 + minItems: 0 + 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 and the maximum value is 1024. + 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 + maximum: 1024 + minimum: 1 + type: integer + nodeSelector: + additionalProperties: + type: string + description: |- + nodeSelector defines the nodes on which the Pods are scheduled. + nodeSelector is optional. + + When omitted, this means the user has no opinion and the platform is left + to choose reasonable defaults. These defaults are subject to change over time. + The current default value is `kubernetes.io/os: linux`. + When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries. + maxProperties: 10 + minProperties: 1 + type: object + resources: + description: |- + resources defines the compute resource requests and limits for the node-exporter container. + 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 + 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: 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: 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: 5 + 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 openShiftStateMetricsConfig: description: |- openShiftStateMetricsConfig is an optional field that can be used to configure the openshift-state-metrics