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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,8 @@ tests:
units:
- "kubelet.service"
- "crio.service"
softirqs:
collectionPolicy: Collect
expected: |
apiVersion: config.openshift.io/v1alpha1
kind: ClusterMonitoring
Expand All @@ -1859,6 +1861,8 @@ tests:
units:
- "kubelet.service"
- "crio.service"
softirqs:
collectionPolicy: Collect
- name: Should be able to create NodeExporterConfig with all fields
initial: |
apiVersion: config.openshift.io/v1alpha1
Expand Down Expand Up @@ -2145,6 +2149,59 @@ tests:
collectionPolicy: Collect
collect: {}
expectedError: "spec.nodeExporterConfig.collectors.netClass.collect: Invalid value"
- name: Should accept softirqs collector with Collect
initial: |
apiVersion: config.openshift.io/v1alpha1
kind: ClusterMonitoring
spec:
nodeExporterConfig:
collectors:
softirqs:
collectionPolicy: Collect
expected: |
apiVersion: config.openshift.io/v1alpha1
kind: ClusterMonitoring
spec:
nodeExporterConfig:
collectors:
softirqs:
collectionPolicy: Collect
- name: Should accept softirqs collector with DoNotCollect
initial: |
apiVersion: config.openshift.io/v1alpha1
kind: ClusterMonitoring
spec:
nodeExporterConfig:
collectors:
softirqs:
collectionPolicy: DoNotCollect
expected: |
apiVersion: config.openshift.io/v1alpha1
kind: ClusterMonitoring
spec:
nodeExporterConfig:
collectors:
softirqs:
collectionPolicy: DoNotCollect
- name: Should reject softirqs collector with invalid collectionPolicy
initial: |
apiVersion: config.openshift.io/v1alpha1
kind: ClusterMonitoring
spec:
nodeExporterConfig:
collectors:
softirqs:
collectionPolicy: Invalid
expectedError: 'spec.nodeExporterConfig.collectors.softirqs.collectionPolicy: Unsupported value: "Invalid"'
- name: Should reject softirqs collector with empty collectionPolicy
initial: |
apiVersion: config.openshift.io/v1alpha1
kind: ClusterMonitoring
spec:
nodeExporterConfig:
collectors:
softirqs: {}
expectedError: 'spec.nodeExporterConfig.collectors.softirqs.collectionPolicy: Required value'
- name: Should reject NodeExporterConfig with zero request
initial: |
apiVersion: config.openshift.io/v1alpha1
Expand Down
22 changes: 22 additions & 0 deletions config/v1alpha1/types_cluster_monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,14 @@ type NodeExporterCollectorConfig struct {
// Enable when you need metrics for specific units; scope units carefully.
// +optional
Systemd NodeExporterCollectorSystemdConfig `json:"systemd,omitempty,omitzero"`
// 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.
// +optional
Softirqs NodeExporterCollectorSoftirqsConfig `json:"softirqs,omitempty,omitzero"`
}

// NodeExporterCollectorCpufreqConfig provides configuration for the cpufreq collector
Expand Down Expand Up @@ -665,6 +673,20 @@ type NodeExporterCollectorSystemdCollectConfig struct {
// +kubebuilder:validation:MaxLength=1024
type NodeExporterSystemdUnit string

// NodeExporterCollectorSoftirqsConfig provides configuration for the softirqs collector
// of the node-exporter agent. The softirqs collector exposes detailed softirq statistics
// from /proc/softirqs.
// It is disabled by default.
type NodeExporterCollectorSoftirqsConfig struct {
// collectionPolicy declares whether the softirqs collector collects metrics.
// This field is required.
// Valid values are "Collect" and "DoNotCollect".
// When set to "Collect", the softirqs collector is active and softirq statistics are collected.
// When set to "DoNotCollect", the softirqs 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1862,6 +1862,29 @@ spec:
required:
- collectionPolicy
type: object
softirqs:
description: |-
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.
properties:
collectionPolicy:
description: |-
collectionPolicy declares whether the softirqs collector collects metrics.
This field is required.
Valid values are "Collect" and "DoNotCollect".
When set to "Collect", the softirqs collector is active and softirq statistics are collected.
When set to "DoNotCollect", the softirqs 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
Expand Down
17 changes: 17 additions & 0 deletions config/v1alpha1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -1862,6 +1862,29 @@ spec:
required:
- collectionPolicy
type: object
softirqs:
description: |-
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.
properties:
collectionPolicy:
description: |-
collectionPolicy declares whether the softirqs collector collects metrics.
This field is required.
Valid values are "Collect" and "DoNotCollect".
When set to "Collect", the softirqs collector is active and softirq statistics are collected.
When set to "DoNotCollect", the softirqs 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
Expand Down
10 changes: 10 additions & 0 deletions config/v1alpha1/zz_generated.swagger_doc_generated.go

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

32 changes: 31 additions & 1 deletion openapi/generated_openapi/zz_generated.openapi.go

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

Loading