You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// metricsServerConfig is an optional field that can be used to configure the Kubernetes Metrics Server that runs in the openshift-monitoring namespace.
93
+
// Specifically, it can configure how the Metrics Server instance is deployed, pod scheduling, its audit policy and log verbosity.
94
+
// When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.
// AlertmanagerCustomConfig represents the configuration for a custom Alertmanager deployment.
@@ -153,7 +158,7 @@ type AlertmanagerCustomConfig struct {
153
158
// When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time.
154
159
// The current default value is `Info`.
155
160
// +optional
156
-
LogLevelLogLevel`json:"logLevel"`
161
+
LogLevelLogLevel`json:"logLevel,omitempty"`
157
162
// nodeSelector defines the nodes on which the Pods are scheduled
158
163
// nodeSelector is optional.
159
164
//
@@ -291,9 +296,10 @@ type ContainerResource struct {
291
296
// This field is required.
292
297
// name must consist only of alphanumeric characters, `-`, `_` and `.` and must start and end with an alphanumeric character.
293
298
// +required
299
+
// +kubebuilder:validation:MinLength=1
294
300
// +kubebuilder:validation:MaxLength=253
295
301
// +kubebuilder:validation:XValidation:rule="!format.qualifiedName().validate(self).hasValue()",message="name must consist only of alphanumeric characters, `-`, `_` and `.` and must start and end with an alphanumeric character"
296
-
Namestring`json:"name"`
302
+
Namestring`json:"name,omitempty"`
297
303
298
304
// request is the minimum amount of the resource required (e.g. "2Mi", "1Gi").
299
305
// This field is optional.
@@ -322,3 +328,135 @@ type ContainerResource struct {
322
328
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character."
323
329
// +kubebuilder:validation:MaxLength=63
324
330
typeSecretNamestring
331
+
332
+
// MetricsServerConfig provides configuration options for the Metrics Server instance
333
+
// that runs in the `openshift-monitoring` namespace. Use this configuration to control
334
+
// how the Metrics Server instance is deployed, how it logs, and how its pods are scheduled.
335
+
// +kubebuilder:validation:MinProperties=1
336
+
typeMetricsServerConfigstruct {
337
+
// audit defines the audit configuration used by the Metrics Server instance.
338
+
// audit is optional.
339
+
// When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time.
340
+
//The current default sets audit.profile to Metadata
341
+
// +optional
342
+
AuditAudit`json:"audit,omitempty,omitzero"`
343
+
// nodeSelector defines the nodes on which the Pods are scheduled
344
+
// nodeSelector is optional.
345
+
//
346
+
// When omitted, this means the user has no opinion and the platform is left
347
+
// to choose reasonable defaults. These defaults are subject to change over time.
348
+
// The current default value is `kubernetes.io/os: linux`.
// VerbosityLevelErrors means only critical messages and errors are logged.
440
+
VerbosityLevelErrorsVerbosityLevel="Errors"
441
+
// VerbosityLevelInfo means basic informational messages are logged.
442
+
VerbosityLevelInfoVerbosityLevel="Info"
443
+
// VerbosityLevelTrace means extended information useful for general debugging is logged.
444
+
VerbosityLevelTraceVerbosityLevel="Trace"
445
+
// VerbosityLevelTraceAll means detailed information about metric scraping operations is logged.
446
+
VerbosityLevelTraceAllVerbosityLevel="TraceAll"
447
+
)
448
+
449
+
// Audit profile configurations
450
+
typeAuditstruct {
451
+
// profile is a required field for configuring the audit log level of the Kubernetes Metrics Server.
452
+
// Allowed values are None, Metadata, Request, or RequestResponse.
453
+
// When set to None, audit logging is disabled and no audit events are recorded.
454
+
// When set to Metadata, only request metadata (such as requesting user, timestamp, resource, verb, etc.) is logged, but not the request or response body.
455
+
// When set to Request, event metadata and the request body are logged, but not the response body.
456
+
// When set to RequestResponse, event metadata, request body, and response body are all logged, providing the most detailed audit information.
0 commit comments