diff --git a/config/v1alpha1/types_cluster_monitoring.go b/config/v1alpha1/types_cluster_monitoring.go index d4846fd1cdb..9d6951892f4 100644 --- a/config/v1alpha1/types_cluster_monitoring.go +++ b/config/v1alpha1/types_cluster_monitoring.go @@ -466,6 +466,14 @@ type NodeExporterCollectorConfig struct { // Enable when you need visibility into kernel softirq processing across CPUs. // +optional Softirqs NodeExporterCollectorSoftirqsConfig `json:"softirqs,omitempty,omitzero"` + // zoneinfo configures the zoneinfo collector, which exposes per-zone memory page counts, + // watermarks, and protection thresholds from /proc/zoneinfo. + // zoneinfo 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 visibility into kernel memory zone allocation and pressure. + // +optional + Zoneinfo NodeExporterCollectorZoneinfoConfig `json:"zoneinfo,omitempty,omitzero"` } // NodeExporterCollectorCpufreqConfig provides configuration for the cpufreq collector @@ -689,6 +697,20 @@ type NodeExporterCollectorSoftirqsConfig struct { CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` } +// NodeExporterCollectorZoneinfoConfig provides configuration for the zoneinfo collector +// of the node-exporter agent. The zoneinfo collector exposes per-zone memory page counts, +// watermarks, and protection thresholds from /proc/zoneinfo. +// It is disabled by default. +type NodeExporterCollectorZoneinfoConfig struct { + // collectionPolicy declares whether the zoneinfo collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the zoneinfo collector is active and zone memory statistics are collected. + // When set to "DoNotCollect", the zoneinfo collector is inactive. + // +required + CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` +} + // MonitoringPluginConfig provides configuration options for the monitoring plugin // that runs as a dynamic plugin of the OpenShift web console. // The monitoring plugin provides the monitoring UI in the OpenShift web console 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 bb427426d04..2fcd9c7ca62 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 @@ -2436,6 +2436,29 @@ spec: required: - collectionPolicy type: object + zoneinfo: + description: |- + zoneinfo configures the zoneinfo collector, which exposes per-zone memory page counts, + watermarks, and protection thresholds from /proc/zoneinfo. + zoneinfo 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 visibility into kernel memory zone allocation and pressure. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the zoneinfo collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the zoneinfo collector is active and zone memory statistics are collected. + When set to "DoNotCollect", the zoneinfo collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + type: object type: object ignoredNetworkDevices: description: |- diff --git a/config/v1alpha1/zz_generated.deepcopy.go b/config/v1alpha1/zz_generated.deepcopy.go index 12dd0cd3127..e3959e60ae2 100644 --- a/config/v1alpha1/zz_generated.deepcopy.go +++ b/config/v1alpha1/zz_generated.deepcopy.go @@ -1024,6 +1024,7 @@ func (in *NodeExporterCollectorConfig) DeepCopyInto(out *NodeExporterCollectorCo out.Processes = in.Processes in.Systemd.DeepCopyInto(&out.Systemd) out.Softirqs = in.Softirqs + out.Zoneinfo = in.Zoneinfo return } @@ -1236,6 +1237,22 @@ func (in *NodeExporterCollectorTcpStatConfig) DeepCopy() *NodeExporterCollectorT return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorZoneinfoConfig) DeepCopyInto(out *NodeExporterCollectorZoneinfoConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorZoneinfoConfig. +func (in *NodeExporterCollectorZoneinfoConfig) DeepCopy() *NodeExporterCollectorZoneinfoConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorZoneinfoConfig) + 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 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 af278ae490c..b0ec657fa25 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 @@ -2436,6 +2436,29 @@ spec: required: - collectionPolicy type: object + zoneinfo: + description: |- + zoneinfo configures the zoneinfo collector, which exposes per-zone memory page counts, + watermarks, and protection thresholds from /proc/zoneinfo. + zoneinfo 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 visibility into kernel memory zone allocation and pressure. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the zoneinfo collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the zoneinfo collector is active and zone memory statistics are collected. + When set to "DoNotCollect", the zoneinfo collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + type: object type: object ignoredNetworkDevices: description: |- diff --git a/config/v1alpha1/zz_generated.model_name.go b/config/v1alpha1/zz_generated.model_name.go index 36a7803bf2f..50e8a250c66 100644 --- a/config/v1alpha1/zz_generated.model_name.go +++ b/config/v1alpha1/zz_generated.model_name.go @@ -285,6 +285,11 @@ func (in NodeExporterCollectorTcpStatConfig) OpenAPIModelName() string { return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorTcpStatConfig" } +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeExporterCollectorZoneinfoConfig) OpenAPIModelName() string { + return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorZoneinfoConfig" +} + // OpenAPIModelName returns the OpenAPI model name for this type. func (in NodeExporterConfig) OpenAPIModelName() string { return "com.github.openshift.api.config.v1alpha1.NodeExporterConfig" diff --git a/config/v1alpha1/zz_generated.swagger_doc_generated.go b/config/v1alpha1/zz_generated.swagger_doc_generated.go index 8f6cda1915a..b0fc9f949ea 100644 --- a/config/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/config/v1alpha1/zz_generated.swagger_doc_generated.go @@ -356,6 +356,7 @@ var map_NodeExporterCollectorConfig = map[string]string{ "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.", "softirqs": "softirqs configures the softirqs collector, which exposes detailed softirq statistics from /proc/softirqs. softirqs 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 visibility into kernel softirq processing across CPUs.", + "zoneinfo": "zoneinfo configures the zoneinfo collector, which exposes per-zone memory page counts, watermarks, and protection thresholds from /proc/zoneinfo. zoneinfo 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 visibility into kernel memory zone allocation and pressure.", } func (NodeExporterCollectorConfig) SwaggerDoc() map[string]string { @@ -472,6 +473,15 @@ func (NodeExporterCollectorTcpStatConfig) SwaggerDoc() map[string]string { return map_NodeExporterCollectorTcpStatConfig } +var map_NodeExporterCollectorZoneinfoConfig = map[string]string{ + "": "NodeExporterCollectorZoneinfoConfig provides configuration for the zoneinfo collector of the node-exporter agent. The zoneinfo collector exposes per-zone memory page counts, watermarks, and protection thresholds from /proc/zoneinfo. It is disabled by default.", + "collectionPolicy": "collectionPolicy declares whether the zoneinfo collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the zoneinfo collector is active and zone memory statistics are collected. When set to \"DoNotCollect\", the zoneinfo collector is inactive.", +} + +func (NodeExporterCollectorZoneinfoConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorZoneinfoConfig +} + 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.", "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", diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go index b1ba3010c5f..dd4246eb153 100644 --- a/openapi/generated_openapi/zz_generated.openapi.go +++ b/openapi/generated_openapi/zz_generated.openapi.go @@ -570,6 +570,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA configv1alpha1.NodeExporterCollectorSystemdCollectConfig{}.OpenAPIModelName(): schema_openshift_api_config_v1alpha1_NodeExporterCollectorSystemdCollectConfig(ref), configv1alpha1.NodeExporterCollectorSystemdConfig{}.OpenAPIModelName(): schema_openshift_api_config_v1alpha1_NodeExporterCollectorSystemdConfig(ref), configv1alpha1.NodeExporterCollectorTcpStatConfig{}.OpenAPIModelName(): schema_openshift_api_config_v1alpha1_NodeExporterCollectorTcpStatConfig(ref), + configv1alpha1.NodeExporterCollectorZoneinfoConfig{}.OpenAPIModelName(): schema_openshift_api_config_v1alpha1_NodeExporterCollectorZoneinfoConfig(ref), configv1alpha1.NodeExporterConfig{}.OpenAPIModelName(): schema_openshift_api_config_v1alpha1_NodeExporterConfig(ref), configv1alpha1.OAuth2{}.OpenAPIModelName(): schema_openshift_api_config_v1alpha1_OAuth2(ref), configv1alpha1.OAuth2EndpointParam{}.OpenAPIModelName(): schema_openshift_api_config_v1alpha1_OAuth2EndpointParam(ref), @@ -25242,11 +25243,18 @@ func schema_openshift_api_config_v1alpha1_NodeExporterCollectorConfig(ref common Ref: ref(configv1alpha1.NodeExporterCollectorSoftirqsConfig{}.OpenAPIModelName()), }, }, + "zoneinfo": { + SchemaProps: spec.SchemaProps{ + Description: "zoneinfo configures the zoneinfo collector, which exposes per-zone memory page counts, watermarks, and protection thresholds from /proc/zoneinfo. zoneinfo 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 visibility into kernel memory zone allocation and pressure.", + Default: map[string]interface{}{}, + Ref: ref(configv1alpha1.NodeExporterCollectorZoneinfoConfig{}.OpenAPIModelName()), + }, + }, }, }, }, Dependencies: []string{ - configv1alpha1.NodeExporterCollectorBuddyInfoConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorCpufreqConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorEthtoolConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorKSMDConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorMountStatsConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorNetClassConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorNetDevConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorProcessesConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorSoftirqsConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorSystemdConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorTcpStatConfig{}.OpenAPIModelName()}, + configv1alpha1.NodeExporterCollectorBuddyInfoConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorCpufreqConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorEthtoolConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorKSMDConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorMountStatsConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorNetClassConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorNetDevConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorProcessesConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorSoftirqsConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorSystemdConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorTcpStatConfig{}.OpenAPIModelName(), configv1alpha1.NodeExporterCollectorZoneinfoConfig{}.OpenAPIModelName()}, } } @@ -25566,6 +25574,28 @@ func schema_openshift_api_config_v1alpha1_NodeExporterCollectorTcpStatConfig(ref } } +func schema_openshift_api_config_v1alpha1_NodeExporterCollectorZoneinfoConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeExporterCollectorZoneinfoConfig provides configuration for the zoneinfo collector of the node-exporter agent. The zoneinfo collector exposes per-zone memory page counts, watermarks, and protection thresholds from /proc/zoneinfo. It is disabled by default.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "collectionPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "collectionPolicy declares whether the zoneinfo collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the zoneinfo collector is active and zone memory statistics are collected. When set to \"DoNotCollect\", the zoneinfo 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{ diff --git a/openapi/openapi.json b/openapi/openapi.json index ee6ecd22773..df6375453d6 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -13792,6 +13792,11 @@ "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": {}, "$ref": "#/definitions/com.github.openshift.api.config.v1alpha1.NodeExporterCollectorTcpStatConfig" + }, + "zoneinfo": { + "description": "zoneinfo configures the zoneinfo collector, which exposes per-zone memory page counts, watermarks, and protection thresholds from /proc/zoneinfo. zoneinfo 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 visibility into kernel memory zone allocation and pressure.", + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.config.v1alpha1.NodeExporterCollectorZoneinfoConfig" } } }, @@ -14020,6 +14025,23 @@ } } }, + "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorZoneinfoConfig": { + "description": "NodeExporterCollectorZoneinfoConfig provides configuration for the zoneinfo collector of the node-exporter agent. The zoneinfo collector exposes per-zone memory page counts, watermarks, and protection thresholds from /proc/zoneinfo. It is disabled by default.", + "type": "object", + "required": [ + "collectionPolicy" + ], + "properties": { + "collectionPolicy": { + "description": "collectionPolicy declares whether the zoneinfo collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the zoneinfo collector is active and zone memory statistics are collected. When set to \"DoNotCollect\", the zoneinfo 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", + "enum": [ + "Collect", + "DoNotCollect" + ] + } + } + }, "com.github.openshift.api.config.v1alpha1.NodeExporterConfig": { "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": "object", 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 bb427426d04..2fcd9c7ca62 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 @@ -2436,6 +2436,29 @@ spec: required: - collectionPolicy type: object + zoneinfo: + description: |- + zoneinfo configures the zoneinfo collector, which exposes per-zone memory page counts, + watermarks, and protection thresholds from /proc/zoneinfo. + zoneinfo 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 visibility into kernel memory zone allocation and pressure. + properties: + collectionPolicy: + description: |- + collectionPolicy declares whether the zoneinfo collector collects metrics. + This field is required. + Valid values are "Collect" and "DoNotCollect". + When set to "Collect", the zoneinfo collector is active and zone memory statistics are collected. + When set to "DoNotCollect", the zoneinfo collector is inactive. + enum: + - Collect + - DoNotCollect + type: string + required: + - collectionPolicy + type: object type: object ignoredNetworkDevices: description: |-