-
Notifications
You must be signed in to change notification settings - Fork 597
MON-4037: Add MonitoringPluginConfig to ClusterMonitoring API #2753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
danielmellado
wants to merge
1
commit into
openshift:master
Choose a base branch
from
danielmellado:mon_4037_monitoring_plugin_config
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -107,6 +107,13 @@ type ClusterMonitoringSpec struct { | |
| // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. | ||
| // +optional | ||
| PrometheusOperatorAdmissionWebhookConfig PrometheusOperatorAdmissionWebhookConfig `json:"prometheusOperatorAdmissionWebhookConfig,omitempty,omitzero"` | ||
| // monitoringPluginConfig is an optional field that can be used to configure the | ||
| // monitoring-plugin component that runs as a Deployment in the openshift-monitoring namespace. | ||
| // The monitoring-plugin is the OpenShift console web plugin for monitoring, providing the | ||
| // monitoring UI in the OpenShift web console. | ||
| // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. | ||
| // +optional | ||
| MonitoringPluginConfig MonitoringPluginConfig `json:"monitoringPluginConfig,omitempty,omitzero"` | ||
| } | ||
|
|
||
| // UserDefinedMonitoring config for user-defined projects. | ||
|
|
@@ -566,6 +573,79 @@ type PrometheusOperatorAdmissionWebhookConfig struct { | |
| TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` | ||
| } | ||
|
|
||
| // MonitoringPluginConfig provides configuration options for the monitoring-plugin component | ||
| // that runs as a Deployment in the `openshift-monitoring` namespace. The monitoring-plugin is the | ||
| // OpenShift console web plugin for monitoring, providing the monitoring UI in the OpenShift web console. | ||
| // +kubebuilder:validation:MinProperties=1 | ||
| type MonitoringPluginConfig struct { | ||
|
Comment on lines
+576
to
+580
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1. minproperties not documented MonitoringPluginConfig is validated with +kubebuilder:validation:MinProperties=1, but the API
comments do not document that an empty monitoringPluginConfig: {} is invalid. This violates the
requirement that validation markers and optional-field omitted behavior be fully documented for API
users.
Agent Prompt
|
||
| // 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 monitoring-plugin 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: 10m | ||
| // limit: null | ||
| // - name: memory | ||
| // request: 50Mi | ||
| // limit: null | ||
| // Maximum length for this list is 10. | ||
| // Minimum length for this list is 1. | ||
| // Each resource name must be unique within this list. | ||
| // +optional | ||
| // +listType=map | ||
| // +listMapKey=name | ||
| // +kubebuilder:validation:MaxItems=10 | ||
| // +kubebuilder:validation:MinItems=1 | ||
| Resources []ContainerResource `json:"resources,omitempty"` | ||
| // tolerations defines tolerations for the pods. | ||
| // tolerations is optional. | ||
| // | ||
| // When omitted, this means the user has no opinion and the platform is left | ||
| // to choose reasonable defaults. These defaults are subject to change over time. | ||
| // Defaults are empty/unset. | ||
| // 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"` | ||
| // topologySpreadConstraints defines rules for how monitoring-plugin Pods should be distributed | ||
| // across topology domains such as zones, nodes, or other user-defined labels. | ||
| // topologySpreadConstraints is optional. | ||
| // This helps improve high availability and resource efficiency by avoiding placing | ||
| // too many replicas in the same failure domain. | ||
| // | ||
| // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. | ||
| // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. | ||
| // Default is empty list. | ||
| // Maximum length for this list is 10. | ||
| // Minimum length for this list is 1. | ||
| // Entries must have unique topologyKey and whenUnsatisfiable pairs. | ||
| // +kubebuilder:validation:MaxItems=10 | ||
| // +kubebuilder:validation:MinItems=1 | ||
| // +listType=map | ||
| // +listMapKey=topologyKey | ||
| // +listMapKey=whenUnsatisfiable | ||
| // +optional | ||
| TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` | ||
| } | ||
|
|
||
| // AuditProfile defines the audit log level for the Metrics Server. | ||
| // +kubebuilder:validation:Enum=None;Metadata;Request;RequestResponse | ||
| type AuditProfile string | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the current default behavior?